2021-01-05 17:05:55 +00:00
|
|
|
{ callPackage
|
2021-09-28 08:13:01 +00:00
|
|
|
, writeTextFile
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
let
|
|
|
|
source = callPackage ./source.nix { };
|
|
|
|
deps = callPackage ./deps.nix { };
|
|
|
|
in
|
2021-01-05 17:05:55 +00:00
|
|
|
rec {
|
2021-09-26 12:46:18 +00:00
|
|
|
resholve = callPackage ./resholve.nix {
|
2021-09-28 08:13:01 +00:00
|
|
|
inherit (source) rSrc version;
|
2021-09-26 12:46:18 +00:00
|
|
|
inherit (deps.oil) oildev;
|
|
|
|
};
|
2021-09-28 08:13:01 +00:00
|
|
|
resholve-utils = callPackage ./resholve-utils.nix {
|
2021-09-26 12:46:18 +00:00
|
|
|
inherit resholve;
|
|
|
|
};
|
2021-09-28 08:13:01 +00:00
|
|
|
resholvePackage = callPackage ./resholve-package.nix {
|
|
|
|
inherit resholve resholve-utils;
|
|
|
|
};
|
|
|
|
resholveScript = name: partialSolution: text:
|
|
|
|
writeTextFile {
|
|
|
|
inherit name text;
|
|
|
|
executable = true;
|
|
|
|
checkPhase = ''
|
|
|
|
(
|
|
|
|
PS4=$'\x1f'"\033[33m[resholve context]\033[0m "
|
|
|
|
set -x
|
|
|
|
${resholve-utils.makeInvocation name (partialSolution // {
|
|
|
|
scripts = [ "${placeholder "out"}" ];
|
|
|
|
})}
|
|
|
|
)
|
|
|
|
${partialSolution.interpreter} -n $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
resholveScriptBin = name: partialSolution: text:
|
|
|
|
writeTextFile rec {
|
|
|
|
inherit name text;
|
|
|
|
executable = true;
|
|
|
|
destination = "/bin/${name}";
|
|
|
|
checkPhase = ''
|
|
|
|
(
|
|
|
|
cd "$out"
|
|
|
|
PS4=$'\x1f'"\033[33m[resholve context]\033[0m "
|
|
|
|
set -x
|
|
|
|
: changing directory to $PWD
|
|
|
|
${resholve-utils.makeInvocation name (partialSolution // {
|
|
|
|
scripts = [ "bin/${name}" ];
|
|
|
|
})}
|
|
|
|
)
|
|
|
|
${partialSolution.interpreter} -n $out/bin/${name}
|
|
|
|
'';
|
|
|
|
};
|
2021-01-05 17:05:55 +00:00
|
|
|
}
|