nix-update: get rid of rec

So that nix-update-script can refer to nix-update itself.
This commit is contained in:
Anderson Torres
2024-09-17 16:48:14 -03:00
parent 23c316282e
commit f19ef08998

View File

@@ -8,7 +8,8 @@
python3Packages, python3Packages,
}: }:
python3Packages.buildPythonApplication rec { let
self = python3Packages.buildPythonApplication {
pname = "nix-update"; pname = "nix-update";
version = "1.5.1"; version = "1.5.1";
pyproject = true; pyproject = true;
@@ -16,7 +17,7 @@ python3Packages.buildPythonApplication rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Mic92"; owner = "Mic92";
repo = "nix-update"; repo = "nix-update";
rev = "refs/tags/${version}"; rev = "refs/tags/${self.version}";
hash = "sha256-JXls4EgMDAWtd736nXS2lYTUv9QIjRpkCTimxNtMN7Q="; hash = "sha256-JXls4EgMDAWtd736nXS2lYTUv9QIjRpkCTimxNtMN7Q=";
}; };
@@ -42,13 +43,13 @@ python3Packages.buildPythonApplication rec {
''; '';
passthru = { passthru = {
nix-update-script = callPackage ./nix-update-script.nix { }; nix-update-script = callPackage ./nix-update-script.nix { nix-update = self; };
}; };
meta = { meta = {
homepage = "https://github.com/Mic92/nix-update/"; homepage = "https://github.com/Mic92/nix-update/";
description = "Swiss-knife for updating nix packages"; description = "Swiss-knife for updating nix packages";
changelog = "https://github.com/Mic92/nix-update/releases/tag/${version}"; changelog = "https://github.com/Mic92/nix-update/releases/tag/${self.version}";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ maintainers = with lib.maintainers; [
figsoda figsoda
@@ -56,4 +57,6 @@ python3Packages.buildPythonApplication rec {
]; ];
mainProgram = "nix-update"; mainProgram = "nix-update";
}; };
} };
in
self