about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix')
-rw-r--r--nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix b/nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix
index 9897a6f2be0c..4d83fac79a5e 100644
--- a/nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/nixpkgs/pkgs/development/haskell-modules/configuration-nix.nix
@@ -305,7 +305,13 @@ self: super: builtins.intersectAttrs super {
   ghc-debug-brick  = enableSeparateBinOutput super.ghc-debug-brick;
   nixfmt  = enableSeparateBinOutput super.nixfmt;
   calligraphy = enableSeparateBinOutput super.calligraphy;
-  niv = enableSeparateBinOutput (self.generateOptparseApplicativeCompletions [ "niv" ] super.niv);
+  niv = overrideCabal (drv: {
+      buildTools = (drv.buildTools or []) ++ [ pkgs.buildPackages.makeWrapper ];
+      postInstall = ''
+        wrapProgram ''${!outputBin}/bin/niv --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.nix ]}
+      '';
+    })
+    (enableSeparateBinOutput (self.generateOptparseApplicativeCompletions [ "niv" ] super.niv));
   ghcid = enableSeparateBinOutput super.ghcid;
   ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu);
   hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] super.hnix;