From 36124b2861773d40e88c7907eb3919565ac9f5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 21 May 2020 07:52:25 +1000 Subject: [PATCH] nix-update: init at 0.1 --- .../package-management/nix-update/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/package-management/nix-update/default.nix diff --git a/pkgs/tools/package-management/nix-update/default.nix b/pkgs/tools/package-management/nix-update/default.nix new file mode 100644 index 000000000000..bd4ff86c9949 --- /dev/null +++ b/pkgs/tools/package-management/nix-update/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, nix +, nix-prefetch +}: + +buildPythonApplication rec { + pname = "nix-update"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "Mic92"; + repo = pname; + rev = version; + sha256 = "0mw31n7kqfr7fskkxp58b0wprxj1pj6n1zs6ymvvl548gs5rgn2s"; + }; + + makeWrapperArgs = [ + "--prefix" "PATH" ":" (lib.makeBinPath [ nix nix-prefetch ]) + ]; + + checkPhase = '' + $out/bin/nix-update --help + ''; + + meta = with lib; { + description = "Swiss-knife for updating nix packages"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = with maintainers; [ mic92 zowoq ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c60a8d72dd72..c26b834a1679 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25754,6 +25754,8 @@ in nix-query-tree-viewer = callPackage ../tools/nix/nix-query-tree-viewer { }; + nix-update = python3Packages.callPackage ../tools/package-management/nix-update { }; + nix-update-source = callPackage ../tools/package-management/nix-update-source {}; nix-script = callPackage ../tools/nix/nix-script {};