nixpkgs-immich/pkgs/tools/package-management/nix-update/default.nix
2024-09-17 10:23:40 -06:00

44 lines
958 B
Nix

{ lib
, python3
, fetchFromGitHub
, nix
, nix-prefetch-git
, nixpkgs-fmt
, nixpkgs-review
}:
python3.pkgs.buildPythonApplication rec {
pname = "nix-update";
version = "1.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Mic92";
repo = pname;
rev = version;
hash = "sha256-gldeiq/R7EIvMZ3tkedSSumBour47LFrwDEiNS9tSSA=";
};
nativeBuildInputs = [
python3.pkgs.setuptools
];
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ nix nix-prefetch-git nixpkgs-fmt nixpkgs-review ])
];
checkPhase = ''
$out/bin/nix-update --help >/dev/null
'';
meta = with lib; {
description = "Swiss-knife for updating nix packages";
inherit (src.meta) homepage;
changelog = "https://github.com/Mic92/nix-update/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda mic92 zowoq ];
mainProgram = "nix-update";
platforms = platforms.all;
};
}