1
0
Fork 0

more statix

This commit is contained in:
Malte Brandy 2022-03-08 03:22:34 +01:00
parent ce0dc51535
commit c64a62a060
2 changed files with 6 additions and 7 deletions

View file

@ -35,13 +35,12 @@ let
fetch_git = name: spec: let
ref =
if spec ? ref
then spec.ref
else if spec ? branch
spec.ref
or (if spec ? branch
then "refs/heads/${spec.branch}"
else if 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
builtins.fetchGit {
url = spec.repo;
@ -175,7 +174,7 @@ let
inherit (builtins) lessThan nixVersion fetchTarball;
in
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;
# fetchurl version that is compatible between all the versions of Nix
@ -187,7 +186,7 @@ let
inherit (builtins) lessThan nixVersion fetchurl;
in
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;
# Create the final "sources" from the config

@ -1 +1 @@
Subproject commit 80bc1996ca8e0d4b75183f6b76748806511fe6ec
Subproject commit 7fd92662dbc0af789fc1be44bc64ae2ec3871452