installShellFiles: add new tests install-bin and install-bin-output
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
installShellFiles,
|
||||
runCommandLocal,
|
||||
}:
|
||||
|
||||
runCommandLocal "install-shell-files--install-bin-output"
|
||||
{
|
||||
outputs = [
|
||||
"out"
|
||||
"bin"
|
||||
];
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
meta.platforms = lib.platforms.all;
|
||||
}
|
||||
''
|
||||
mkdir -p bin
|
||||
echo "echo hello za warudo" > bin/hello
|
||||
echo "echo amigo me gusta mucho" > bin/amigo
|
||||
|
||||
installBin bin/*
|
||||
|
||||
# assert it didn't go into $out
|
||||
[[ ! -f $out/bin/amigo ]]
|
||||
[[ ! -f $out/bin/hello ]]
|
||||
|
||||
cmp bin/amigo ''${!outputBin}/bin/amigo
|
||||
cmp bin/hello ''${!outputBin}/bin/hello
|
||||
|
||||
touch $out
|
||||
''
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
installShellFiles,
|
||||
runCommandLocal,
|
||||
}:
|
||||
|
||||
runCommandLocal "install-shell-files--install-bin"
|
||||
{
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
meta.platforms = lib.platforms.all;
|
||||
}
|
||||
''
|
||||
mkdir -p bin
|
||||
echo "echo hello za warudo" > bin/hello
|
||||
echo "echo amigo me gusta mucho" > bin/amigo
|
||||
|
||||
installBin bin/*
|
||||
|
||||
cmp bin/amigo $out/bin/amigo
|
||||
cmp bin/hello $out/bin/hello
|
||||
''
|
||||
Reference in New Issue
Block a user