aboutsummaryrefslogtreecommitdiff
path: root/tests/shell-hello.nix
diff options
context:
space:
mode:
authorMatthew Kenigsberg <matthewkenigsberg@gmail.com>2020-04-29 15:37:21 -0600
committerMatthew Kenigsberg <matthewkenigsberg@gmail.com>2020-04-30 08:31:37 -0600
commitf459ca547fda4b0ca477d895413e86b69a580ab0 (patch)
treed277c2008d364b3cedd022f8b484163e24f82bb2 /tests/shell-hello.nix
parent5d8504b9789ffebabe8226227c4061dd48354177 (diff)
rename run to shell in tests
Diffstat (limited to 'tests/shell-hello.nix')
-rw-r--r--tests/shell-hello.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/shell-hello.nix b/tests/shell-hello.nix
new file mode 100644
index 000000000..77dcbd2a9
--- /dev/null
+++ b/tests/shell-hello.nix
@@ -0,0 +1,17 @@
+with import ./config.nix;
+
+{
+ hello = mkDerivation {
+ name = "hello";
+ buildCommand =
+ ''
+ mkdir -p $out/bin
+ cat > $out/bin/hello <<EOF
+ #! ${shell}
+ who=\$1
+ echo "Hello \''${who:-World} from $out/bin/hello"
+ EOF
+ chmod +x $out/bin/hello
+ '';
+ };
+}