[Nix-dev] Understanding runtime dependencies
eric.sagnes at gmail.com
Wed Sep 2 14:45:32 CEST 2015
Thanks for the detailed explanation!
I sent a pull-request that should fix it.
On Wed, Sep 02, 2015 at 09:48:01AM +0000, Kirill Elagin wrote:
> The problem here is that `Wand-config` is just a plain dumb shell script.
> And it does invoke `pkg-config`.
> As you might imagine, whenever you run a shell script and it, in turn, runs
> a command, what happens is exactly the same as when you run run that
> command yourself: it is being looked up in $PATH, etc.
> You installed imagemagick, and its tools (including `Wand-config`) were
> added to your $PATH. It needed pkg-config during the build process, so
> pkg-config was in `buildInputs` and as a result, it _was_ added to $PATH
> during the build. But now it is not in your $PATH, that’s why `Wand-config`
> Long story short, that is an issue with imagemagick packaging. All the
> references to `pkg-config` should have been replaced with absolute paths
> somewhere during the build process. If you feel like fixing this, something
> like this
> should be done. In the `postPatch` phase, probably.
> On Wed, Sep 2, 2015 at 12:26 PM Eric Sagnes <eric.sagnes at gmail.com> wrote:
> > Hi,
> > When calling ImageMagick `Wand-config` program, I get the following error:
> > ~~~~
> > Wand-config --libs
> > [~/R]
> > /run/current-system/sw/bin/Wand-config: line 53: pkg-config: command not
> > found
> > ~~~~
> > >From what I understand (still new to Nix), runtime dependencies are
> > declared with `buildInputs`.
> > And the nix expression for imagemagick has `pkgconfig` in the
> > `buildInputs`,
> > so I am a little puzzled on how my system can have ImageMagick without
> > pkgconfig.
> > In case it matters, ImageMagick was installed globally with
> > configuration.nix and nix-rebuild using the unstable channel.
> > Cheers,
> > 
> > https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/graphics/ImageMagick/default.nix
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> Кирилл Елагин
More information about the nix-dev