Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
59 lines
1.5 KiB
Nix
59 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPackages,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
}:
|
|
|
|
let
|
|
emulatorAvailable = stdenv.hostPlatform.emulatorAvailable buildPackages;
|
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
|
in
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "npingler";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "9999years";
|
|
repo = "npingler";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-d34IGZ+Xdzknkmz+JemEEEYde+8zowuGOlGKlm7F3Jk=";
|
|
};
|
|
|
|
cargoHash = "sha256-Fs5LPy9dX2hRyMo/YASQesXQoklqYDV78eXnlecet0E=";
|
|
|
|
buildFeatures = [ "clap_mangen" ];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = lib.optionalString emulatorAvailable ''
|
|
manpages=$(mktemp -d)
|
|
${emulator} $out/bin/npingler util generate-man-pages "$manpages"
|
|
for manpage in "$manpages"/*; do
|
|
installManPage "$manpage"
|
|
done
|
|
|
|
installShellCompletion --cmd npingler \
|
|
--bash <(${emulator} $out/bin/npingler util generate-completions bash) \
|
|
--fish <(${emulator} $out/bin/npingler util generate-completions fish) \
|
|
--zsh <(${emulator} $out/bin/npingler util generate-completions zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "Nix profile manager for use with npins";
|
|
homepage = "https://github.com/9999years/npingler";
|
|
license = lib.licenses.mit;
|
|
maintainers = [
|
|
lib.maintainers._9999years
|
|
];
|
|
mainProgram = "npingler";
|
|
};
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
})
|