[Nix-dev] Custom packages and build-support functions

Eric Sagnes eric.sagnes at gmail.com
Wed Sep 2 10:13:16 CEST 2015


It worked, thanks!

On Wed, Sep 02, 2015 at 06:50:16AM +0000, Kirill Elagin wrote:
> `buildPecl` is defined in `top-level/php-packages.nix`, which is imported
> in `top-level/all-packages.nix` as `phpPackages`. So try replacing
> `buildPecl` with `phpPackages.buildPecl`.
> 
> On Wed, Sep 2, 2015 at 8:08 AM Eric Sagnes <eric.sagnes at gmail.com> wrote:
> 
> > Hi,
> >
> > While trying to add the image magick php extension to a container as a
> > custom package[1]
> > with the following separate nix expression:
> >
> > ~~~~
> > with import <nixpkgs> {};
> > buildPecl {
> >   version = "3.1.2";
> >   name = "imagick-${version}";
> >   sha256 = "14vclf2pqcgf3w8nzqbdw0b9v30q898344c84jdbw2sa62n6k1sj";
> >   configureFlags = "--with-imagick=${pkgs.imagemagick}";
> > }
> > ~~~~
> >
> > I got the following error
> > error: undefined variable ‘buildPecl’ at /etc/nixos/imagick-pecl.nix:2:1
> >
> > How can build-support functions be imported and used in custom packages?
> >
> > Cheers,
> >
> > [1]
> > https://nixos.org/nixos/manual/sec-package-management.html#sec-custom-packages
> > _______________________________________________
> > 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 mailing list