Skip to content

Commit 666a317

Browse files
committed
Bump nix inputs
1 parent 5f13cf2 commit 666a317

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

nix/sources.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": "",
66
"owner": "hercules-ci",
77
"repo": "gitignore.nix",
8-
"rev": "5b9e0ff9d3b551234b4f3eb3983744fa354b17f1",
9-
"sha256": "01l4phiqgw9xgaxr6jr456qmww6kzghqrnbc7aiiww3h6db5vw53",
8+
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
9+
"sha256": "07vg2i9va38zbld9abs9lzqblz193vc5wvqd6h7amkmwf66ljcgh",
1010
"type": "tarball",
11-
"url": "https://github.com/hercules-ci/gitignore.nix/archive/5b9e0ff9d3b551234b4f3eb3983744fa354b17f1.tar.gz",
11+
"url": "https://github.com/hercules-ci/gitignore.nix/archive/a20de23b925fd8264fd7fad6454652e142fd7f73.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"niv": {
@@ -17,10 +17,10 @@
1717
"homepage": "https://github.com/nmattia/niv",
1818
"owner": "nmattia",
1919
"repo": "niv",
20-
"rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c",
21-
"sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm",
20+
"rev": "689d0e5539eddd0b0f566aee7bb18629eee7df74",
21+
"sha256": "1rld3lk42l6b01f2gcrhq8qm9vry1awmfl29zmpiqda9dy89vbx0",
2222
"type": "tarball",
23-
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
23+
"url": "https://github.com/nmattia/niv/archive/689d0e5539eddd0b0f566aee7bb18629eee7df74.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
},
2626
"nixpkgs": {
@@ -29,10 +29,10 @@
2929
"homepage": "",
3030
"owner": "NixOS",
3131
"repo": "nixpkgs",
32-
"rev": "5efc8ca954272c4376ac929f4c5ffefcc20551d5",
33-
"sha256": "15xncc1afq8v78acrcv8xbfkd3ii147mv9a55823pdbqffzg0x54",
32+
"rev": "293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847",
33+
"sha256": "1m6smzjz3agkyc6dm83ffd8zr744m6jpjmffppvcdngk82mf3s3r",
3434
"type": "tarball",
35-
"url": "https://github.com/NixOS/nixpkgs/archive/5efc8ca954272c4376ac929f4c5ffefcc20551d5.tar.gz",
35+
"url": "https://github.com/NixOS/nixpkgs/archive/293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.tar.gz",
3636
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3737
}
3838
}

nix/sources.nix

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,28 @@ let
3131
if spec ? branch then "refs/heads/${spec.branch}" else
3232
if spec ? tag then "refs/tags/${spec.tag}" else
3333
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
34+
submodules = if spec ? submodules then spec.submodules else false;
35+
submoduleArg =
36+
let
37+
nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
38+
emptyArgWithWarning =
39+
if submodules == true
40+
then
41+
builtins.trace
42+
(
43+
"The niv input \"${name}\" uses submodules "
44+
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
45+
+ "does not support them"
46+
)
47+
{}
48+
else {};
49+
in
50+
if nixSupportsSubmodules
51+
then { inherit submodules; }
52+
else emptyArgWithWarning;
3453
in
35-
builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };
54+
builtins.fetchGit
55+
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
3656

3757
fetch_local = spec: spec.path;
3858

0 commit comments

Comments
 (0)