more statix
This commit is contained in:
parent
ce0dc51535
commit
c64a62a060
|
@ -35,13 +35,12 @@ let
|
||||||
|
|
||||||
fetch_git = name: spec: let
|
fetch_git = name: spec: let
|
||||||
ref =
|
ref =
|
||||||
if spec ? ref
|
spec.ref
|
||||||
then spec.ref
|
or (if spec ? branch
|
||||||
else if spec ? branch
|
|
||||||
then "refs/heads/${spec.branch}"
|
then "refs/heads/${spec.branch}"
|
||||||
else if spec ? tag
|
else if spec ? tag
|
||||||
then "refs/tags/${spec.tag}"
|
then "refs/tags/${spec.tag}"
|
||||||
else abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
|
else abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!");
|
||||||
in
|
in
|
||||||
builtins.fetchGit {
|
builtins.fetchGit {
|
||||||
url = spec.repo;
|
url = spec.repo;
|
||||||
|
@ -175,7 +174,7 @@ let
|
||||||
inherit (builtins) lessThan nixVersion fetchTarball;
|
inherit (builtins) lessThan nixVersion fetchTarball;
|
||||||
in
|
in
|
||||||
if lessThan nixVersion "1.12"
|
if lessThan nixVersion "1.12"
|
||||||
then fetchTarball ({inherit url;} // (optionalAttrs (!(name == null)) {inherit name;}))
|
then fetchTarball ({inherit url;} // (optionalAttrs (name != null) {inherit name;}))
|
||||||
else fetchTarball attrs;
|
else fetchTarball attrs;
|
||||||
|
|
||||||
# fetchurl version that is compatible between all the versions of Nix
|
# fetchurl version that is compatible between all the versions of Nix
|
||||||
|
@ -187,7 +186,7 @@ let
|
||||||
inherit (builtins) lessThan nixVersion fetchurl;
|
inherit (builtins) lessThan nixVersion fetchurl;
|
||||||
in
|
in
|
||||||
if lessThan nixVersion "1.12"
|
if lessThan nixVersion "1.12"
|
||||||
then fetchurl ({inherit url;} // (optionalAttrs (!(name == null)) {inherit name;}))
|
then fetchurl ({inherit url;} // (optionalAttrs (name != null) {inherit name;}))
|
||||||
else fetchurl attrs;
|
else fetchurl attrs;
|
||||||
|
|
||||||
# Create the final "sources" from the config
|
# Create the final "sources" from the config
|
||||||
|
|
2
private
2
private
|
@ -1 +1 @@
|
||||||
Subproject commit 80bc1996ca8e0d4b75183f6b76748806511fe6ec
|
Subproject commit 7fd92662dbc0af789fc1be44bc64ae2ec3871452
|
Loading…
Reference in a new issue