summary refs log tree commit diff
path: root/pkgs/tools/misc/nix-direnv
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/nix-direnv')
-rw-r--r--pkgs/tools/misc/nix-direnv/default.nix21
1 files changed, 10 insertions, 11 deletions
diff --git a/pkgs/tools/misc/nix-direnv/default.nix b/pkgs/tools/misc/nix-direnv/default.nix
index 9bdf39a52b6..93c7456bcb1 100644
--- a/pkgs/tools/misc/nix-direnv/default.nix
+++ b/pkgs/tools/misc/nix-direnv/default.nix
@@ -3,24 +3,23 @@
 , fetchFromGitHub
 , gnugrep
 , nix
-, enableFlakes ? null # deprecated
 }:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs:{
   pname = "nix-direnv";
-  version = "2.3.0";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "nix-community";
     repo = "nix-direnv";
-    rev = version;
-    sha256 = "sha256-Y9Yf/RJvfoFKS4ptVhPc9X0tQUPWSSxkS11r7wGge+8=";
+    rev = finalAttrs.version;
+    hash = "sha256-h49uz+/YDRwbusiVx6I3HP9P3UZROIOlwjlYYqRjesE=";
   };
 
   # Substitute instead of wrapping because the resulting file is
   # getting sourced, not executed:
   postPatch = ''
     sed -i "1a NIX_BIN_PREFIX=${nix}/bin/" direnvrc
-    substituteInPlace direnvrc --replace "grep" "${gnugrep}/bin/grep"
+    substituteInPlace direnvrc --replace "grep" "${lib.getExe gnugrep}"
   '';
 
   installPhase = ''
@@ -29,11 +28,11 @@ stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
-  meta = with lib; {
+  meta = {
     description = "A fast, persistent use_nix implementation for direnv";
     homepage    = "https://github.com/nix-community/nix-direnv";
-    license     = licenses.mit;
-    platforms   = platforms.unix;
-    maintainers = with maintainers; [ mic92 bbenne10 ];
+    license     = lib.licenses.mit;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ mic92 bbenne10 ];
   };
-}
+})