diff --git a/flake.nix b/flake.nix index 1c6fc34c..83ae7127 100644 --- a/flake.nix +++ b/flake.nix @@ -80,24 +80,22 @@ platforms = platforms.all; }; + components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" ]; + in rec { - overlay = final: prev: { - coriolis-vlsisapd = final.callPackage (import ./nix/vlsisapd.nix { inherit version meta; }) {}; - coriolis-lefdef = final.callPackage (import ./nix/lefdef.nix { inherit version meta; }) {}; - coriolis-bootstrap = final.callPackage (import ./nix/bootstrap.nix { inherit version meta; }) {}; - coriolis-hurricane = final.callPackage (import ./nix/hurricane.nix { inherit version meta; }) {}; - }; + overlay = final: prev: + builtins.foldl' + (acc: elem: acc // { + "coriolis-${elem}" = final.callPackage ( + import "${self}/nix/${elem}.nix" { inherit version meta; } + ) {}; + }) {} components; - packages = forAllSystems (system: - with nixpkgsFor.${system}; { - vlsisapd = coriolis-vlsisapd; - bootstrap = coriolis-bootstrap; - coloquinte = coriolis-coloquinte; - lefdef = coriolis-lefdef; - hurricane = coriolis-hurricane; - }); + packages = forAllSystems (system: builtins.foldl' (acc: elem: acc // { + ${elem} = nixpkgsFor.${system}.${"coriolis-${elem}"}; + }) {} components); defaultPackage = forAllSystems (system: self.packages.${system}.coriolis); devShell = defaultPackage; diff --git a/nix/bootstrap.nix b/nix/bootstrap.nix index 7e410005..3b475d3b 100644 --- a/nix/bootstrap.nix +++ b/nix/bootstrap.nix @@ -1,7 +1,6 @@ { version, meta }: -{ lib, stdenv, python2, cmake, boost, bison, flex -, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja }: +{ lib, stdenv, python2, cmake, ninja }: stdenv.mkDerivation { pname = "coriolis-bootstrap"; diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix index 85118e22..21d9b1c0 100644 --- a/nix/coloquinte.nix +++ b/nix/coloquinte.nix @@ -1,8 +1,6 @@ { version, meta }: -{ lib, stdenv, python2, cmake, boost, bison, flex -, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja -, coriolis-bootstrap, coriolis-vlsisapd }: +{ lib, stdenv, python2, cmake, boost, qt4, ninja, coriolis-bootstrap }: let boostWithPython = boost.override { enablePython = true; python = python2; }; in diff --git a/nix/hurricane.nix b/nix/hurricane.nix index 47d4cd95..8bcf8c2a 100644 --- a/nix/hurricane.nix +++ b/nix/hurricane.nix @@ -1,7 +1,7 @@ { version, meta }: { lib, stdenv, python2, cmake, boost, bison, flex -, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja +, libxml2, rapidjson, qt4, zlib, bzip2, ninja , coriolis-bootstrap, coriolis-vlsisapd }: let boostWithPython = boost.override { enablePython = true; python = python2; }; in diff --git a/nix/lefdef.nix b/nix/lefdef.nix index 2a973217..177f70b3 100644 --- a/nix/lefdef.nix +++ b/nix/lefdef.nix @@ -1,8 +1,7 @@ { version, meta }: { lib, stdenv, python2, cmake, boost, bison, flex -, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja -, coriolis-bootstrap, coriolis-vlsisapd }: +, libxml2, zlib, ninja, coriolis-bootstrap }: let boostWithPython = boost.override { enablePython = true; python = python2; }; in diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix index 9746caa4..2b19f57d 100644 --- a/nix/vlsisapd.nix +++ b/nix/vlsisapd.nix @@ -1,8 +1,7 @@ { version, meta }: { lib, stdenv, python2, cmake, boost, bison, flex -, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja -, coriolis-bootstrap }: +, libxml2, qt4, ninja, coriolis-bootstrap }: let boostWithPython = boost.override { enablePython = true; python = python2; }; in