diff --git a/nix/sources.nix b/nix/sources.nix index 08fbc1bf..83d461af 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -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 diff --git a/private b/private index 80bc1996..7fd92662 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 80bc1996ca8e0d4b75183f6b76748806511fe6ec +Subproject commit 7fd92662dbc0af789fc1be44bc64ae2ec3871452