Merge pull request #298492 from risicle/ris-niv-wrap-binary-nix

niv: wrap binary supplying runtime `nix` dependency in `PATH`
This commit is contained in:
Robert Scott 2024-03-27 19:40:22 +00:00 committed by GitHub
commit 83ab9c4e37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -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;