The latest release of libyamlcpp in nixpkgs does not build because it
uses an older version of boost than the one in nixpkgs and therefore
expects a particular header file which does not exist in the latest
boost anymore. For this reason, a later (git) version of libyamlcpp is
used here (which actually doesn't even require boost).
The substituteInPlace in the prePatch phase is needed because libevdev
places its headers in non-standard places, meaning Nix cannot normally
find them. The `cut` command removes the first two "-I" characters from
the output of `pkg-config`. This needs to be in the prePatch phase
because otherwise Nix will patch these lines to `/var/empty`, meaning
you would have less specific replacement (in case other lines are also
patched to `/var/empty`).
I wrote the patch. (I believe it is NixOS specific.)
We already have a patch feeling lonely inside the python-modules
directory and to have everything at one place let's actually move pyocr
into its own dedicated directory so it's easier to patch it up (which
we're going to).
Right now, the package fails to build because of a few test failures, so
I haven't tested this apart from evaluating.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Currently the closure-size difference between `ghostscript` and
`ghostscriptX` was ~140 vs. ~142 MB, which was wasteful, as the output
itself is ~40 MB. (x86_64-linux)
Also make ghostscriptX the full derivation, including CUPS support.
I wrote the patch. Unfortunately it's Nix specific because upstream
rejected it because Ubuntu Trusty's version of realpath doesn't seem to
have the `--relative-to` option. (Upstream used to use realpath before).
But for Nix, our version of realpath is recent enough. Also, upstream
will probably use realpath again anyway in May 2019 when Ubuntu Trusty
becomes unsupported, so this patch should probably be used.