> My question was: could I publish such a Nix expression, yet have it > benefit from (and refer to) packages from `all-packages.nix'?
Hopefully my answer fits your question.. all-package .nix is basically { <some opts> } : rec { pkg1 = mkDerivation{ buildInputs=[ dep dep ]; }; pkg2 = mkDerivation{ buildInputs=[ dep dep ]; }; ... <your package> }; Now you want to benefit from all-packages (thus using those dependencies as arguments to your derivation without adding <your package> at the place show above? You can do this using the 'with' syntax with (import <path to all-packages.nix>) {}: (import <your file>) { inherit stdenv fetchurl gmp readline } or perhaps more simple: let pkgs = (import <all-packages.nix>) {}; in (import <your file>) { inherit (pkgs) stdenv fetchurl gmp readline } (both is untestet.. but should work.. :) pay attention to the {} which means use default values for <some opts>. I'm currently modyfing all-packages.nix myself and adding the derivations there because I'm lazy and I want to commit them as soon as they do compile.. Marc _______________________________________________ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev