Merge pull request #114622 from aaschmid/fix/nix-direnv
nix-direnv: fix NIX_BIN_PREFIX substitution in built direnvrc
This commit is contained in:
commit
8445826ef5
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, gnugrep, nix }:
|
{ lib, stdenv, fetchFromGitHub, gnugrep, nix, nixFlakes }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nix-direnv";
|
pname = "nix-direnv";
|
||||||
|
@ -14,9 +14,8 @@ stdenv.mkDerivation rec {
|
||||||
# Substitute instead of wrapping because the resulting file is
|
# Substitute instead of wrapping because the resulting file is
|
||||||
# getting sourced, not executed:
|
# getting sourced, not executed:
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace direnvrc \
|
sed -i "1a NIX_BIN_PREFIX=${nixFlakes}/bin/" direnvrc
|
||||||
--replace "\''${NIX_BIN_PREFIX:-}" "\''${NIX_BIN_PREFIX:-${nix}/bin/}" \
|
substituteInPlace direnvrc --replace "grep" "${gnugrep}/bin/grep"
|
||||||
--replace "grep" "${gnugrep}/bin/grep"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
Loading…
Reference in New Issue