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

Eric Sagnes eric.sagnes at gmail.com
Wed Sep 2 07:08:04 CEST 2015


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


More information about the nix-dev mailing list