[Nix-dev] canon printer drivers (cnijfilter)

Nawal Husnoo nawal at husnoo.com
Wed Jun 21 08:36:43 CEST 2017


Thanks for that Matt!

I wonder if the versioning thing is a windows-related behaviour.

Could you say a few words about the link errors you had? Have you used
patchelf?

>* patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
*>*     --set-rpath $libPath:$out/lib \
*>*     $out/bin/cngpijmonmp250*

Another option I could live with is if we could create a buildFHSUserEnv -
I tried it with the binary canon drivers, but it turned out it's cups that
needs to be inside for the pesky things to be found, but then systemd
wouldn't let me restart cups.service inside a user env...

Cheers,

Nawal.



On 21 June 2017 at 01:49, Matt McHenry <matt at mchenryfamily.org> wrote:

> Hi Nawal,
>
> I see you've been trying to get canon's linux drivers working on nixos
> [1][2][3].  I've also tried my hand at this.  I think I've made more
> progress than you, but was never able to get it working, and eventually
> resigned myself to just printing with the gutenprint driver.  I'd be
> interested in continuing to hack at it as time permits, though.
>
> I got to the point of cups executing what I think is the correct chain of
> filters, all built from the source that my nix expression pulls from the
> Canon Japan website.  However, at least one of the filters is unable to
> load at least one dynamically linked library, so it fails.  I don't know
> much about shared libraries on linux in general or NixOS in particular, so
> I was mostly just thrashing around a lot.
>
> I've pushed what I have to the cnijfilter branch in my nixpkgs clone [4].
> To try it, just add pkgs.cnijfilter to services.printing.drivers in
> configuration.nix.  (I also tried adding cnijfilter to
> environment.systemPackages, that didn't seem to help.)
>
> I've gleaned a lot from the other distros builds [5][6][7].  In
> particular, the cnijfilter-common library does not follow a normal
> versioning pattern -- each version supports a certain set of printers.  So
> you don't want the latest, you want whatever matches up with your printer.
> (My printer is an MX-700, which uses the mp520 driver.  So I've been
> working on version 2.80 of cnijfilter-common.)  But my hope is that the
> overall structure of the build would be very portable between versions.
>
> It looks like you've worked from the debian packages -- perhaps looking in
> more detail at how they are built will give us some more clues?
>
> I'm not sure whether it makes more sense to open an issue to document this
> work, or keep discussing on the mailing list.
>
> [1] https://mailman.science.uu.nl/pipermail/nix-dev/2017-June/023942.html
> [2] https://mailman.science.uu.nl/pipermail/nix-dev/2017-June/023943.html
> [3] https://mailman.science.uu.nl/pipermail/nix-dev/2017-June/023946.html
>
> [4] https://github.com/jerith666/nixpkgs/tree/cnijfilter
>
> [5] https://bugs.gentoo.org/show_bug.cgi?id=130645
> [6] https://aur.archlinux.org/packages/cnijfilter-mp620/?comments=all
> [7] https://github.com/spremi/cnijfilter-source-3.80
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170621/b243ca86/attachment.html>


More information about the nix-dev mailing list