[Nix-dev] Customizing packages via overrideDerivation

Eelco Dolstra eelco.dolstra at logicblox.com
Fri Oct 18 13:47:06 CEST 2013


Hi,

On 17/10/13 20:30, Andrey Rogozhin wrote:

> I am trying to use an updated version of The Sleuth Kit and to achieve that I've
> put the following lines in the /etc/nixos/configuration.nix (and extracted the
> updated source of the package to /root/sleuthkit-4.1.2 directory):
> 
> environment.systemPackages =
>      [ ( pkgs.lib.overrideDerivation pkgs.sleuthkit (attrs: {
>          name = "sleuthkit-4.1.2";
>          src = "/root/sleuthkit-4.1.2";

This should be:

  src = /root/sleuthkit-4.1.2;

Otherwise this directory won't be copied to the Nix store, and the builder may
not be able to access it (especially when running in a chroot).

>        }))
>      ];

This should work in general, but it didn't work here, apparently because the
sleuthkit Nix expression used builderDefs instead of stdenv.mkDerivation.  I've
changed it to use stdenv.mkDerivation and now overrides should work fine.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list