mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
e7ec067b6b
This reverts commit b984d5d25f
.
30 lines
927 B
Nix
30 lines
927 B
Nix
{ 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 ];
|
|
};
|
|
}
|