makes icon indicating copy to clipboard operation
makes copied to clipboard

Support `nixpkgsBuildInputs` in `makeSearchPaths`

Open kamadorueda opened this issue 4 years ago • 0 comments

After trying to update to the latest commit of Nixpkgs I found some packages not to be self-contained via declarative setup code (normally a wrapper that expose a few env vars and then call the main code) but instead of $out/nix-support magic. This magic is normally triggered with a $ source $stdenv/setup)

Since here at Makes we don't use setup hooks because they are anti-modular, as the Nixpkgs documentation says:

image

We can instead offer a small attribute nixpkgsBuildInputs in makeSearchPaths to expose a compatibility layer. This compatibility layer can be achieved as simple as this:

{
   __envNixpkgsSrc = __nixpkgsSrc__;
   __envNixpkgsBuildInputs = [
     __nixpkgs__.gnugrep
     __nixpkgs__.python3Packages.chardet
     __nixpkgs__.rpl
   ];
   __envNixpkgsInitialPath = [ __nixpkgs__.coreutils ];
}
export buildInputs="${__envNixpkgsBuildInputs}"
export initialPath="${__envNixpkgsInitialPath}"
source "${__envNixpkgsSrc}/pkgs/stdenv/generic/setup.sh"

In the order of evaluation, nixpkgs should come first, then makes, so makes overrides nixpkgs

kamadorueda avatar Oct 12 '21 15:10 kamadorueda