[Nix-dev] printing on nix
Nawal Husnoo
nawal at husnoo.com
Mon Jun 19 23:54:11 CEST 2017
Hi,
I've got the default.nix below, and I run it using nix-shell. I opened
firefox, and went to 127.0.0.1:631 and added a printer, and selected the
ppd file from /opt/share/ppd/canonmp250.ppd.
Unfortunately, when I try to print a test page I get the error message:
Idle - "File
"/nix/store/wy6c4mlp6zhjj4j3cjwrhwfi4ba9bxab-cups-progs/lib/cups/filter/pstocanonij"
not available: No such file or directory"
The file lives at /opt/lib/cups/filter/pstocanonij.
How do I override cups path in nix?
thanks,
Nawal.
{ pkgs ? import <nixpkgs> {}}:
(pkgs.buildFHSUserEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs; [
udev
alsaLib
gtk2-x11
patchelf
binutils
popt
cups
dpkg
cairo
pango
fontconfig
glib
dpkg
atk
gdk_pixbuf
libxml2
libtiff
firefox
]) ++ (with pkgs.xorg; [
libX11
libXcursor
libXrandr
libXext
libXinerama
libXrender
libXi
libXfixes
]);
multiPkgs = pkgs: (with pkgs; [
]);
extraBuildCommands = ''
echo "instaling environment for cups printing with canon mp 250..."
ls -lh $out/
mkdir -p $out/opt/bin/
mkdir -p $out/opt/lib/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-common/usr/bin/*
$out/opt/bin/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-common/usr/share/*
$out/opt/share/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-common/usr/lib/*
$out/opt/lib/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-mp250series/usr/bin/*
$out/opt/bin/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-mp250series/usr/share/*
$out/opt/share/
cp -r
/home/nawal/data/nixos/user/pkgs/canon/tmp/cnijfilter-mp250series/usr/lib/*
$out/opt/lib/
ln -s $out/opt/lib/libcnbpcmcm356.so.8.0.1 $out/opt/lib/libcnbpcmcm356.so
ln -s $out/opt/lib/libcnbpcnclbjcmd356.so.3.3.0
$out/opt/lib/libcnbpcnclbjcmd356.so
ln -s $out/opt/lib/libcnbpess356.so.3.3.3 $out/opt/lib/libcnbpess356.so
ln -s $out/opt/lib/libcnnet.so.1.2.0 $out/opt/lib/libcnnet.so
ln -s $out/opt/lib/libcnbpcnclapi356.so.3.5.0
$out/opt/lib/libcnbpcnclapi356.so
ln -s $out/opt/lib/libcnbpcnclui356.so.3.6.0
$out/opt/lib/libcnbpcnclui356.so
ln -s $out/opt/lib/libcnbpo356.so.1.0.2 $out/opt/lib/libcnbpo356.so
echo "OUT=$out"
'';
profile = ''
export LD_LIBRARY_PATH=$out/opt/lib:$LD_LIBRARY_PATH
export PATH=$out/opt/bin:$PATH
export TZDIR=/etc/zoneinfo
'';
runScript = ''
bash
'';
}).env
#${dpkg}/bin/dpkg -x ./debs/cnijfilter-common_3.40-1_amd64.deb
tmp/cnijfilter-common
#${dpkg}/bin/dpkg -x ./debs/cnijfilter-mp250series_3.40-1_amd64.deb
tmp/cnijfilter-mp250series
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170619/d6a7a460/attachment.html>
More information about the nix-dev
mailing list