diff options
author | Naïm Favier <n@monade.li> | 2021-12-19 01:32:35 +0100 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-12-27 20:30:01 -0500 |
commit | f2065d81ad9d25bbe581aef5c4c80845d7bb3041 (patch) | |
tree | 029b352507dee029ccc802af4ef1ad6e70a1ab77 /pkgs/games/vdrift | |
parent | 4aaf4c256b94f8789e116473e7f86201002ecf2f (diff) |
stdenv/generic: introduce shellDryRun
Add `shellDryRun` to the generic stdenv and substitute it for uses of `${stdenv.shell} -n`. The point of this layer of abstraction is to add the flag `-O extglob`, which resolves #126344 in a more direct way.
Diffstat (limited to 'pkgs/games/vdrift')
-rw-r--r-- | pkgs/games/vdrift/default.nix | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/pkgs/games/vdrift/default.nix b/pkgs/games/vdrift/default.nix index 04f65cf793795..19397794649b9 100644 --- a/pkgs/games/vdrift/default.nix +++ b/pkgs/games/vdrift/default.nix @@ -12,7 +12,7 @@ , bullet , curl , gettext -, writeTextFile +, writeShellScriptBin , data ? fetchsvn { url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data"; @@ -54,21 +54,15 @@ let }; }; wrappedName = "vdrift-${version}-with-data-${toString data.rev}"; -in writeTextFile { +in +(writeShellScriptBin "vdrift" '' + export VDRIFT_DATA_DIRECTORY="${data}" + exec ${bin}/bin/vdrift "$@" +'').overrideAttrs (_: { name = wrappedName; - text = '' - export VDRIFT_DATA_DIRECTORY="${data}" - exec ${bin}/bin/vdrift "$@" - ''; - destination = "/bin/vdrift"; - executable = true; - checkPhase = '' - ${stdenv.shell} -n $out/bin/vdrift - ''; -} // { meta = bin.meta // { hydraPlatforms = [ ]; }; unwrapped = bin; inherit bin data; -} +}) |