forked from mirrors/nixpkgs
Implement patches.nix to override parts of a derivation
This commit is contained in:
parent
e47428d0e2
commit
172e55c7fc
|
@ -7,6 +7,14 @@
|
|||
|
||||
let
|
||||
libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
|
||||
patches = import ./patches.nix;
|
||||
lib = stdenv.lib;
|
||||
baseName = (builtins.parseDrvName name).name;
|
||||
patch = if builtins.hasAttr baseName patches
|
||||
then
|
||||
builtins.getAttr baseName patches
|
||||
else
|
||||
{};
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "chicken-${name}";
|
||||
|
@ -37,4 +45,4 @@ stdenv.mkDerivation ({
|
|||
--prefix PATH : "$out/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
|
||||
done
|
||||
'';
|
||||
} // (builtins.removeAttrs args ["name" "buildInputs"]))
|
||||
} // (builtins.removeAttrs args ["name" "buildInputs"]) // patch)
|
||||
|
|
10
pkgs/development/compilers/chicken/patches.nix
Normal file
10
pkgs/development/compilers/chicken/patches.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
setup-helper = {
|
||||
preBuild = ''
|
||||
substituteInPlace setup-helper.setup \
|
||||
--replace "(chicken-home)" \"$out/share/\"
|
||||
|
||||
cat setup-helper.setup
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue