Implement patches.nix to override parts of a derivation
This commit is contained in:
parent
e47428d0e2
commit
172e55c7fc
@ -7,6 +7,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
|
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
|
in
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "chicken-${name}";
|
name = "chicken-${name}";
|
||||||
@ -37,4 +45,4 @@ stdenv.mkDerivation ({
|
|||||||
--prefix PATH : "$out/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
|
--prefix PATH : "$out/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
|
||||||
done
|
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…
x
Reference in New Issue
Block a user