-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272255 from drupol/nh-init-at-unstable-2023-12-02
nh: init at 3.4.12
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19228,6 +19228,12 @@ | |
githubId = 118959; | ||
name = "VinyMeuh"; | ||
}; | ||
viperML = { | ||
email = "[email protected]"; | ||
github = "viperML"; | ||
githubId = 11395853; | ||
name = "Fernando Ayats"; | ||
}; | ||
viraptor = { | ||
email = "[email protected]"; | ||
github = "viraptor"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ lib | ||
, rustPlatform | ||
, installShellFiles | ||
, makeWrapper | ||
, fetchFromGitHub | ||
, nvd | ||
, use-nom ? true | ||
, nix-output-monitor ? null | ||
}: | ||
|
||
assert use-nom -> nix-output-monitor != null; | ||
|
||
let | ||
version = "3.4.12"; | ||
runtimeDeps = [ nvd ] ++ lib.optionals use-nom [ nix-output-monitor ]; | ||
in | ||
rustPlatform.buildRustPackage { | ||
inherit version; | ||
pname = "nh"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "ViperML"; | ||
repo = "nh"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ="; | ||
}; | ||
|
||
strictDeps = true; | ||
|
||
nativeBuildInputs = [ | ||
installShellFiles | ||
makeWrapper | ||
]; | ||
|
||
preFixup = '' | ||
mkdir completions | ||
$out/bin/nh completions --shell bash > completions/nh.bash | ||
$out/bin/nh completions --shell zsh > completions/nh.zsh | ||
$out/bin/nh completions --shell fish > completions/nh.fish | ||
installShellCompletion completions/* | ||
''; | ||
|
||
postFixup = '' | ||
wrapProgram $out/bin/nh \ | ||
--prefix PATH : ${lib.makeBinPath runtimeDeps} \ | ||
${lib.optionalString use-nom "--set-default NH_NOM 1"} | ||
''; | ||
|
||
cargoHash = "sha256-Ul4DM8WmKvKG32zBXzpdzHZknpTQAVvrxFcEd/C1buA="; | ||
|
||
meta = { | ||
description = "Yet another nix cli helper"; | ||
homepage = "https://github.com/ViperML/nh"; | ||
license = lib.licenses.eupl12; | ||
mainProgram = "nh"; | ||
maintainers = with lib.maintainers; [ drupol viperML ]; | ||
}; | ||
} |