Skip to content

Commit

Permalink
Cleaned up release.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
taktoa committed Feb 28, 2017
1 parent 386a94b commit 11b1196
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions release.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{ nixpkgs ? <nixpkgs> }:

let
fn = system:
let
pkgs = import nixpkgs { config = {}; inherit system; };
in {
toxvpn.${system} = pkgs.callPackage ./default.nix {};
};
pkgsFromSystem = system: (import nixpkgs { config = {}; inherit system; });
makeJob = (s: { ${s} = (pkgsFromSystem s).callPackage ./default.nix {}; });
nativePkgs = import nixpkgs {};
makeJobs = nativePkgs.lib.foldl (total: next: total // (fn next)) {};
in makeJobs [ "x86_64-linux" "x86_64-darwin" ]
merge = a: b: a // b;
mergeList = builtins.foldl' merge {};
makeJobs = systems: mergeList (map makeJob systems);
in { toxvpn = makeJobs [ "x86_64-linux" "x86_64-darwin" ]; }

0 comments on commit 11b1196

Please sign in to comment.