diff options
author | Peter Hoeg <peter@hoeg.com> | 2021-07-05 18:29:16 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2021-07-05 19:24:08 +0800 |
commit | 11b1684c8e8bed0a00ceaaeb03891a0dcc687f5c (patch) | |
tree | 4f2b1c17aa42c25d8e1d6e980f53eedbad158811 /pkgs | |
parent | b7f6d6d3441742e699f52ca61a15d1d92de8128a (diff) |
janet: the nix sandbox doesn't have /usr/bin/env
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/interpreters/janet/default.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/janet/default.nix b/pkgs/development/interpreters/janet/default.nix index c0438d1e0076..35631174e260 100644 --- a/pkgs/development/interpreters/janet/default.nix +++ b/pkgs/development/interpreters/janet/default.nix @@ -11,7 +11,20 @@ stdenv.mkDerivation rec { sha256 = "sha256-TzJbHmHIySlf3asQ02HOdehMR+s0KkPifBiaQ4FvFCg="; }; + # we don't have /usr/bin/env in the sandbox, so substitute for a proper, + # absolute path to janet + postPatch = '' + substituteInPlace jpm \ + --replace '/usr/bin/env janet' $out/bin/janet \ + --replace /usr/local/lib/janet $out/lib \ + --replace /usr/local $out + + substituteInPlace janet.1 \ + --replace /usr/local/lib/janet $out/lib + ''; + nativeBuildInputs = [ meson ninja ]; + mesonFlags = [ "-Dgit_hash=release" ]; doCheck = true; @@ -20,7 +33,7 @@ stdenv.mkDerivation rec { description = "Janet programming language"; homepage = "https://janet-lang.org/"; license = licenses.mit; + maintainers = with maintainers; [ andrewchambers peterhoeg ]; platforms = platforms.all; - maintainers = with maintainers; [ andrewchambers ]; }; } |