Skip to content

Commit

Permalink
Update sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cprussin committed Dec 8, 2019
1 parent 42bf2d1 commit 74a6016
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
18 changes: 9 additions & 9 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"homepage": "",
"owner": "rycee",
"repo": "home-manager",
"rev": "dff5f07952e61da708dc8b348ea677414e992215",
"sha256": "16ibf367ay6dkwv6grrkpx8nf0nz3jlr3xxpjv4zjj0v3imwlq6b",
"rev": "5e7a4c55ed110ff3c9d16906d9feeb710e4d0859",
"sha256": "1pnswdidlh8kapqjqsl5jyr09mfwv14h9p1krqj743pfxkbp6i0y",
"type": "tarball",
"url": "https://github.com/rycee/home-manager/archive/dff5f07952e61da708dc8b348ea677414e992215.tar.gz",
"url": "https://github.com/rycee/home-manager/archive/5e7a4c55ed110ff3c9d16906d9feeb710e4d0859.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
Expand All @@ -29,10 +29,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "444c1ad4896ace10b97ab5becede1ceeced0a90c",
"sha256": "199nhdwlnk4wn4kgqyjq9z5cwlajjq7j3i4f54ihc1l9b9rggfd8",
"rev": "22e1f901df0c747aa61cbe31b23e12975822b2cd",
"sha256": "17d848pvh94qndzzwz8k7lb1vfgbbhqzrdf9mcqxn1n8mnwa1b89",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/444c1ad4896ace10b97ab5becede1ceeced0a90c.tar.gz",
"url": "https://github.com/nmattia/niv/archive/22e1f901df0c747aa61cbe31b23e12975822b2cd.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nix-linter": {
Expand All @@ -53,10 +53,10 @@
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs-channels",
"rev": "d3a8243e58360cda164b54c4c5fe40efc97d342d",
"sha256": "0xdyf67bj69z3088laxfvfrfswj2rn58w8ab1lbadxf3fhg5r0aq",
"rev": "808d3c6d12386009e1d1b8e8461d1e8d8fdc5ff1",
"sha256": "07d910k8q6q25vk67k2v8dnpn9b41mvc0rzqwlx9zddxqrdxa9bz",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/d3a8243e58360cda164b54c4c5fe40efc97d342d.tar.gz",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/808d3c6d12386009e1d1b8e8461d1e8d8fdc5ff1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"notify-send": {
Expand Down
6 changes: 5 additions & 1 deletion nix/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ let
else
pkgs.fetchzip { inherit (spec) url sha256; };

fetch_git = spec:
builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };

fetch_builtin-tarball = spec:
builtins.trace
''
Expand Down Expand Up @@ -80,10 +83,11 @@ let
abort "ERROR: niv spec ${name} does not have a 'type' attribute"
else if spec.type == "file" then fetch_file spec
else if spec.type == "tarball" then fetch_tarball spec
else if spec.type == "git" then fetch_git spec
else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec
else if spec.type == "builtin-url" then fetch_builtin-url spec
else
abort "ERROR: niv spec ${name} has unknown type ${builtins.fromJSON spec.type}";
abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";

# Ports of functions for older nix versions

Expand Down

0 comments on commit 74a6016

Please sign in to comment.