Skip to content

Commit

Permalink
Travis fix for old nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Schmolck authored and JaimeLennox committed May 4, 2019
1 parent 7df5003 commit 006713e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions nix/sources.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Read in the json spec for packages we want (so it can be auto-updated).
# niv: no_update
with builtins;
mapAttrs
(_: spec: spec // { outPath = fetchTarball { inherit (spec) url sha256; }; })
(fromJSON (readFile ./sources.json))

# make travis happy, reasonably new nix doesn't need this
let mapAttrs = builtins.mapAttrs or
(f: set:
builtins.listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (builtins.attrNames set)));
in with builtins;
mapAttrs
(_: spec: spec // { outPath = fetchTarball { inherit (spec) url sha256; }; })
(fromJSON (readFile ./sources.json))

0 comments on commit 006713e

Please sign in to comment.