nixpkgs/pkgs/by-name/ni/nix-update/package.nix
2024-09-19 18:13:24 +02:00

62 lines
1.2 KiB
Nix

{
lib,
callPackage,
fetchFromGitHub,
nix,
nix-prefetch-git,
nixpkgs-review,
python3Packages,
}:
let
self = python3Packages.buildPythonApplication {
pname = "nix-update";
version = "1.5.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Mic92";
repo = "nix-update";
rev = "refs/tags/${self.version}";
hash = "sha256-6kR4UEBZvbQNoR3l8/It5ZTCC+mB14jzj7MNnFoQJwE=";
};
build-system = [ python3Packages.setuptools ];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [
nix
nix-prefetch-git
nixpkgs-review
])
];
checkPhase = ''
runHook preCheck
$out/bin/nix-update --help >/dev/null
runHook postCheck
'';
passthru = {
nix-update-script = callPackage ./nix-update-script.nix { nix-update = self; };
};
meta = {
homepage = "https://github.com/Mic92/nix-update/";
description = "Swiss-knife for updating nix packages";
changelog = "https://github.com/Mic92/nix-update/releases/tag/${self.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
mic92
];
mainProgram = "nix-update";
};
};
in
self