Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've not used Guix, but looking at those slides, the ability to take the build definition of the "hello" program, inherit everything but change the version, looks very interesting.

I'm not aware of a way to do that in Nix, but I think it's more a consequence that the convention is to call

    stdenv.mkDerivation { descriptor }
(where the descriptor includes things like the upstream url, version, etc.)

without providing a direct handle to the descriptor (which one might inherit and modify just the upstream url, for example).

(In practice, I find it an order of magnitude easier to create custom packages in Nix compared to .deb.)



> I've not used Guix, but looking at those slides, the ability to take the build definition of the "hello" program, inherit everything but change the version, looks very interesting.

To do this with any derivation in in nixpkgs, call pkgs.lib.overrideDerivation on it, passing the relevant new attributes. This'll inherit the old attributes, only modifying the ones you supply. This is described in the manual: http://nixos.org/nixos/manual/#sec-customising-packages


Excellent, thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: