[Nix-dev] Customizing packages via overrideDerivation

Andrey Rogozhin arogozhin at gmail.com
Fri Oct 18 18:51:09 CEST 2013


Hi,

On 10/18/13, Eelco Dolstra <eelco.dolstra at logicblox.com> wrote:
> 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.

Thanks, Eelco! I've just tried to fetch a fresh installation CD and
did a fresh install with the updated expression as you advised. The
result was the same - e.g. old sleuthkit 3.2.2 has been installed. I
also tried to fetch a development source tree via nixos-checkout and
build with 'nixos-rebuild -I' to no avail. Should I wait until your
changes propagate to the new version of the installation CD
image/repository or I can use your changes earlier somehow?

-- 
Sincerely,
Andrey Rogozhin.


More information about the nix-dev mailing list