add nix-prefetch-source (#21734)
This commit is contained in:
parent
6aae00edfc
commit
ca38ef79e9
29
pkgs/tools/package-management/nix-update-source/default.nix
Normal file
29
pkgs/tools/package-management/nix-update-source/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts }:
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
|
version = "0.2.1";
|
||||||
|
name = "nix-update-source-${version}";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "timbertson";
|
||||||
|
repo = "nix-update-source";
|
||||||
|
rev = "version-${version}";
|
||||||
|
sha256 = "1w3aj0kjp8zhxkzqxnm5srrsqsvrmxhn4sqkr4kjffh61jg8jq8a";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ nix-prefetch-scripts ];
|
||||||
|
passthru = {
|
||||||
|
fetch = path:
|
||||||
|
let
|
||||||
|
fetchers = {
|
||||||
|
# whitelist of allowed fetchers
|
||||||
|
inherit (pkgs) fetchgit fetchurl fetchFromGitHub;
|
||||||
|
};
|
||||||
|
json = lib.importJSON path;
|
||||||
|
fetchFn = builtins.getAttr json.fetch.fn fetchers;
|
||||||
|
src = fetchFn json.fetch.args;
|
||||||
|
in
|
||||||
|
json // { inherit src; };
|
||||||
|
};
|
||||||
|
meta = {
|
||||||
|
description = "Utility to autimate updating of nix derivation sources";
|
||||||
|
maintainers = with lib.maintainers; [ timbertson ];
|
||||||
|
};
|
||||||
|
}
|
@ -17597,6 +17597,8 @@ in
|
|||||||
nix-prefetch-zip
|
nix-prefetch-zip
|
||||||
nix-prefetch-scripts;
|
nix-prefetch-scripts;
|
||||||
|
|
||||||
|
nix-update-source = callPackage ../tools/package-management/nix-update-source {};
|
||||||
|
|
||||||
nix-template-rpm = callPackage ../build-support/templaterpm { inherit (pythonPackages) python toposort; };
|
nix-template-rpm = callPackage ../build-support/templaterpm { inherit (pythonPackages) python toposort; };
|
||||||
|
|
||||||
nix-repl = callPackage ../tools/package-management/nix-repl { };
|
nix-repl = callPackage ../tools/package-management/nix-repl { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user