don’t use content-addressed derivations (for now)

This commit is contained in:
Charlotte 🦝 Delenk 2023-02-05 10:29:13 +01:00
parent 52a9aedf51
commit bf388af66e
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -1,4 +1,4 @@
system: { nixpkgs, ... } @ args: rec { system: {nixpkgs, ...} @ args: rec {
inherit (builtins) toFile; inherit (builtins) toFile;
allPrebuilds = builtins.path { allPrebuilds = builtins.path {
@ -8,21 +8,18 @@ system: { nixpkgs, ... } @ args: rec {
prebuilts = "${allPrebuilds}/${system}"; prebuilts = "${allPrebuilds}/${system}";
baseDerivation = { script, ... } @args: builtins.derivation (args // { baseDerivation = {script, ...} @ args:
__contentAddressed = true; builtins.derivation (args
outputHashMode = "recursive"; // {
outputHashAlgo = "sha256"; inherit system;
inherit system; builder = "${prebuilts}/busybox";
builder = "${prebuilts}/busybox"; PATH = "${prebuilts}";
args = [ args = [
"sh" "sh"
(toFile "${args.name}-builder.sh" ( (toFile "${args.name}-builder.sh" ''
'' set -ex
set -ex eval "$script"
export PATH=${prebuilts} '')
eval "$script" ];
'' });
))
];
});
} }