mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
build-remote.sh: Test LegacySSHStore
This commit is contained in:
parent
de2641ae99
commit
b7ccf7ae2a
6 changed files with 51 additions and 21 deletions
|
@ -1,23 +1,39 @@
|
|||
{ busybox }:
|
||||
|
||||
with import ./config.nix;
|
||||
|
||||
let
|
||||
|
||||
mkDerivation = args:
|
||||
derivation ({
|
||||
inherit system;
|
||||
builder = busybox;
|
||||
args = ["sh" "-e" args.builder or (builtins.toFile "builder-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
|
||||
} // removeAttrs args ["builder" "meta"])
|
||||
// { meta = args.meta or {}; };
|
||||
|
||||
input1 = mkDerivation {
|
||||
name = "build-hook-input-1";
|
||||
buildCommand = "mkdir $out; echo FOO > $out/foo";
|
||||
shell = busybox;
|
||||
name = "build-remote-input-1";
|
||||
buildCommand = "echo FOO > $out";
|
||||
requiredSystemFeatures = ["foo"];
|
||||
};
|
||||
|
||||
input2 = mkDerivation {
|
||||
name = "build-hook-input-2";
|
||||
buildCommand = "mkdir $out; echo BAR > $out/bar";
|
||||
shell = busybox;
|
||||
name = "build-remote-input-2";
|
||||
buildCommand = "echo BAR > $out";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
mkDerivation {
|
||||
name = "build-hook";
|
||||
builder = ./dependencies.builder0.sh;
|
||||
input1 = " " + input1 + "/.";
|
||||
input2 = " ${input2}/.";
|
||||
shell = busybox;
|
||||
name = "build-remote";
|
||||
buildCommand =
|
||||
''
|
||||
read x < ${input1}
|
||||
read y < ${input2}
|
||||
echo $x$y > $out
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue