From 82b6604e2be5861fdecff8601c09d50f02bba9ec Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 16 Aug 2021 17:06:47 +0000
Subject: [PATCH 01/94] wip

---
 flake.lock                        | 27 +++++++++++
 flake.nix                         | 80 +++++++++++++++++++++++++++++++
 lefdef/src/def/def/CMakeLists.txt |  2 +-
 lefdef/src/lef/lef/CMakeLists.txt |  4 +-
 4 files changed, 110 insertions(+), 3 deletions(-)
 create mode 100644 flake.lock
 create mode 100644 flake.nix

diff --git a/flake.lock b/flake.lock
new file mode 100644
index 00000000..c92ec499
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
+{
+  "nodes": {
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1628776130,
+        "narHash": "sha256-EyzdilgzoO8YCgck1lkOF1Bp+QVEazJBtuG5GkVY6xg=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "ad6e733d633802620b5eec9be91e837973eac18a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-21.05",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000..94c9eb77
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,80 @@
+{
+  description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
+
+  # Nixpkgs / NixOS version to use.
+  inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.05";
+
+  outputs = { self, nixpkgs }:
+    let
+
+      # Generate a user-friendly version numer.
+      version = builtins.substring 0 8 self.lastModifiedDate;
+
+      # System types to support.
+      supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
+
+      # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
+      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
+
+      # Nixpkgs instantiated for supported system types.
+      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
+
+      coriolis =
+        { lib, stdenv, python2, cmake, boost, bison, flex, libxml2, rapidjson, which, qt4 }:
+        let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+        stdenv.mkDerivation {
+          name = "coriolis-${version}";
+
+          src = ./.;
+
+          postPatch = ''
+            patchShebangs .
+            export HOME=/build
+            mkdir -p /build/coriolis-2.x/src
+            dir="$PWD"
+            mv "$PWD" -T /build/coriolis-2.x/src/coriolis
+          '';
+
+          configurePhase = "runHook preConfigure; runHook postConfigure";
+
+          hardeningDisable = [ "format" ];
+
+          buildPhase = ''
+            runHook preBuild
+            ./bootstrap/ccb.py --project=coriolis --make="-j$NIX_BUILD_CORES install"
+            runHook postBuild
+          '';
+
+          installPhase = "true";
+
+          checkPhase = "true";
+
+          buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 ];
+          nativeBuildInputs = [ cmake bison flex which ];
+
+          meta = with lib; {
+            description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
+            homepage    = "http://coriolis.lip6.fr/";
+            license     = licenses.gpl3;
+            platforms   = platforms.all;
+          };
+        };
+
+    in
+
+    rec {
+      overlay = final: prev: {
+        coriolis = final.callPackage coriolis {};
+      };
+
+      packages = forAllSystems (system:
+        {
+          inherit (nixpkgsFor.${system}) coriolis;
+        });
+
+      defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
+      devShell = defaultPackage;
+
+      hydraJobs.coriolis = self.defaultPackage;
+    };
+}
diff --git a/lefdef/src/def/def/CMakeLists.txt b/lefdef/src/def/def/CMakeLists.txt
index 227ff104..92aab5cf 100644
--- a/lefdef/src/def/def/CMakeLists.txt
+++ b/lefdef/src/def/def/CMakeLists.txt
@@ -81,7 +81,7 @@
           add_custom_command ( OUTPUT   def.tab.cpp
                                DEPENDS  ${DefParserGrammar}
                                COMMAND  ${BISON_EXECUTABLE} -v -p defyy -d ${DefParserGrammar} -o def.tab.cpp 
-                               COMMAND  mv def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h
+                               COMMAND  cp def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h
                               #COMMAND  mv def.tab.cpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.cpp
                                COMMENT  "Generating DEF parser (bison)"
                              )
diff --git a/lefdef/src/lef/lef/CMakeLists.txt b/lefdef/src/lef/lef/CMakeLists.txt
index e347cf03..3cb07de1 100644
--- a/lefdef/src/lef/lef/CMakeLists.txt
+++ b/lefdef/src/lef/lef/CMakeLists.txt
@@ -61,8 +61,8 @@
           add_custom_command ( OUTPUT   lef.tab.cpp
                                DEPENDS  ${LefParserGrammar}
                                COMMAND  ${BISON_EXECUTABLE} -v -p lefyy -d ${LefParserGrammar} -o lef.tab.cpp 
-                               COMMAND  mv lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h
-                              #COMMAND  mv lef.tab.cpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.cpp
+                               COMMAND  cp lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h
+                               #COMMAND  mv lef.tab.cpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.cpp
                                COMMENT  "Generating LEF parser (bison)"
                              )
  set_source_files_properties ( lef.tab.cpp GENERATED )

From 435168931ef1e2e3cbb87b24612757ebadcb82ef Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 16 Aug 2021 19:06:13 +0000
Subject: [PATCH 02/94] bad hack

---
 vlsisapd/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt
index 15eeb37d..e4f22882 100644
--- a/vlsisapd/CMakeLists.txt
+++ b/vlsisapd/CMakeLists.txt
@@ -14,7 +14,8 @@
 
  message(STATUS "Boost_NO_SYSTEM_PATHS: ${Boost_NO_SYSTEM_PATHS}")
  set_cmake_policies()
- setup_boost(program_options python regex)
+ find_package(Boost 1.35.0 REQUIRED COMPONENTS program_options regex)
+ #setup_boost(program_options python regex)
 
  find_package(LibXml2 REQUIRED)
  find_package(PythonSitePackages REQUIRED)

From 5a536b93b46701fbb228b3268f9e6c6aadb9281f Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 16 Aug 2021 19:50:39 +0000
Subject: [PATCH 03/94] Got it working?

---
 bootstrap/cmake_modules/FindBootstrap.cmake | 4 ++--
 flake.nix                                   | 5 ++++-
 vlsisapd/CMakeLists.txt                     | 3 +--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake
index bc67996f..332a8ae2 100644
--- a/bootstrap/cmake_modules/FindBootstrap.cmake
+++ b/bootstrap/cmake_modules/FindBootstrap.cmake
@@ -196,9 +196,9 @@
    else(ARGC LESS 1)
      foreach(component ${ARGV})
        if(${component} STREQUAL "python")
-         set(component ${component}${Boost_PYVER})
+       else()
+	       set(components ${components} ${component})
        endif()
-       set(components ${components} ${component})
      endforeach()
      
      find_package(Boost 1.35.0 COMPONENTS ${components} system)
diff --git a/flake.nix b/flake.nix
index 94c9eb77..91408064 100644
--- a/flake.nix
+++ b/flake.nix
@@ -45,7 +45,10 @@
             runHook postBuild
           '';
 
-          installPhase = "true";
+          installPhase = ''
+            mkdir $out
+            mv /build/coriolis-2.x/*.* -t $out
+          '';
 
           checkPhase = "true";
 
diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt
index e4f22882..15eeb37d 100644
--- a/vlsisapd/CMakeLists.txt
+++ b/vlsisapd/CMakeLists.txt
@@ -14,8 +14,7 @@
 
  message(STATUS "Boost_NO_SYSTEM_PATHS: ${Boost_NO_SYSTEM_PATHS}")
  set_cmake_policies()
- find_package(Boost 1.35.0 REQUIRED COMPONENTS program_options regex)
- #setup_boost(program_options python regex)
+ setup_boost(program_options python regex)
 
  find_package(LibXml2 REQUIRED)
  find_package(PythonSitePackages REQUIRED)

From 3bef114e97617369d9210c0865a62ab72695dc6d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sat, 21 Aug 2021 22:09:39 +0000
Subject: [PATCH 04/94] Use CMake 2.8

---
 flake.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index 91408064..3bafaf80 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,7 +20,7 @@
       nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
 
       coriolis =
-        { lib, stdenv, python2, cmake, boost, bison, flex, libxml2, rapidjson, which, qt4 }:
+        { lib, stdenv, python2, cmake_2_8, boost, bison, flex, libxml2, rapidjson, which, qt4 }:
         let boostWithPython = boost.override { enablePython = true; python = python2; }; in
         stdenv.mkDerivation {
           name = "coriolis-${version}";
@@ -53,7 +53,7 @@
           checkPhase = "true";
 
           buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 ];
-          nativeBuildInputs = [ cmake bison flex which ];
+          nativeBuildInputs = [ cmake_2_8 bison flex which ];
 
           meta = with lib; {
             description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";

From be6260ab64bf2cd322db080642503248cc267829 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 22 Aug 2021 05:47:36 +0000
Subject: [PATCH 05/94] temporary commit

---
 flake.nix | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index 3bafaf80..7f56207f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,7 +20,8 @@
       nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
 
       coriolis =
-        { lib, stdenv, python2, cmake_2_8, boost, bison, flex, libxml2, rapidjson, which, qt4 }:
+        { lib, stdenv, python2, cmake_2_8, boost, bison, flex
+        , libxml2, rapidjson, which, qt4, zlib, bzip2 }:
         let boostWithPython = boost.override { enablePython = true; python = python2; }; in
         stdenv.mkDerivation {
           name = "coriolis-${version}";
@@ -52,7 +53,7 @@
 
           checkPhase = "true";
 
-          buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 ];
+          buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 zlib bzip2 ];
           nativeBuildInputs = [ cmake_2_8 bison flex which ];
 
           meta = with lib; {

From 7c5679408f58bdfde5de013ac55263ff57ae81c9 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 22 Aug 2021 10:54:22 +0000
Subject: [PATCH 06/94] Get vlsisapd and bootstrap building!

---
 flake.nix         | 30 ++++++++++++++++++++++++------
 nix/bootstrap.nix | 15 +++++++++++++++
 nix/vlsisapd.nix  | 20 ++++++++++++++++++++
 3 files changed, 59 insertions(+), 6 deletions(-)
 create mode 100644 nix/bootstrap.nix
 create mode 100644 nix/vlsisapd.nix

diff --git a/flake.nix b/flake.nix
index 7f56207f..6d1d38fc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,6 +19,7 @@
       # Nixpkgs instantiated for supported system types.
       nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
 
+      /*
       coriolis =
         { lib, stdenv, python2, cmake_2_8, boost, bison, flex
         , libxml2, rapidjson, which, qt4, zlib, bzip2 }:
@@ -29,14 +30,21 @@
           src = ./.;
 
           postPatch = ''
-            patchShebangs .
             export HOME=/build
             mkdir -p /build/coriolis-2.x/src
             dir="$PWD"
             mv "$PWD" -T /build/coriolis-2.x/src/coriolis
+
+            patchShebangs .
+            fixCmakeFiles .
           '';
 
-          configurePhase = "runHook preConfigure; runHook postConfigure";
+          configurePhase = ''
+            runHook preConfigure
+            makeCmakeFindLibs
+            export LDFLAGS="$NIX_LDFLAGS"
+            runHook postConfigure
+          '';
 
           hardeningDisable = [ "format" ];
 
@@ -63,22 +71,32 @@
             platforms   = platforms.all;
           };
         };
+      */
+
+      meta = with nixpkgs.lib; {
+        description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
+        homepage    = "http://coriolis.lip6.fr/";
+        license     = licenses.gpl3;
+        platforms   = platforms.all;
+      };
 
     in
 
     rec {
       overlay = final: prev: {
-        coriolis = final.callPackage coriolis {};
+        coriolis-vlsisapd = final.callPackage (import ./nix/vlsisapd.nix { inherit version meta; }) {};
+        coriolis-bootstrap = final.callPackage (import ./nix/bootstrap.nix { inherit version meta; }) {};
       };
 
       packages = forAllSystems (system:
-        {
-          inherit (nixpkgsFor.${system}) coriolis;
+        with nixpkgsFor.${system}; {
+          vlsisapd = coriolis-vlsisapd;
+          bootstrap = coriolis-bootstrap;
         });
 
       defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
       devShell = defaultPackage;
 
-      hydraJobs.coriolis = self.defaultPackage;
+      #hydraJobs.coriolis = self.defaultPackage;
     };
 }
diff --git a/nix/bootstrap.nix b/nix/bootstrap.nix
new file mode 100644
index 00000000..7e410005
--- /dev/null
+++ b/nix/bootstrap.nix
@@ -0,0 +1,15 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja }:
+
+stdenv.mkDerivation {
+  pname = "coriolis-bootstrap";
+
+  src = ../bootstrap;
+
+  buildInputs = [ python2 ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
new file mode 100644
index 00000000..9746caa4
--- /dev/null
+++ b/nix/vlsisapd.nix
@@ -0,0 +1,20 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja
+, coriolis-bootstrap }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-vlsisapd";
+
+  src = ../vlsisapd;
+
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
+
+  buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 8c9353f791058c7e20d1da28a5ec50198f5ee011 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 22 Aug 2021 11:17:47 +0000
Subject: [PATCH 07/94] hurricane builds

---
 flake.nix         |  2 ++
 nix/hurricane.nix | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 nix/hurricane.nix

diff --git a/flake.nix b/flake.nix
index 6d1d38fc..d1f49e0f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -86,12 +86,14 @@
       overlay = final: prev: {
         coriolis-vlsisapd = final.callPackage (import ./nix/vlsisapd.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; }) {};
       };
 
       packages = forAllSystems (system:
         with nixpkgsFor.${system}; {
           vlsisapd = coriolis-vlsisapd;
           bootstrap = coriolis-bootstrap;
+          hurricane = coriolis-hurricane;
         });
 
       defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
new file mode 100644
index 00000000..47d4cd95
--- /dev/null
+++ b/nix/hurricane.nix
@@ -0,0 +1,20 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja
+, coriolis-bootstrap, coriolis-vlsisapd }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-hurricane";
+
+  src = ../hurricane;
+
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules;${coriolis-vlsisapd}/share/cmake/Modules" ];
+
+  buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 bzip2 coriolis-vlsisapd rapidjson ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 985ae3edde476506e5945202ecb848d63bd6c4cc Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 22 Aug 2021 11:40:56 +0000
Subject: [PATCH 08/94] coloquinte and lefdef

---
 flake.nix          |  3 +++
 nix/coloquinte.nix | 20 ++++++++++++++++++++
 nix/lefdef.nix     | 22 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 nix/coloquinte.nix
 create mode 100644 nix/lefdef.nix

diff --git a/flake.nix b/flake.nix
index d1f49e0f..1c6fc34c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -85,6 +85,7 @@
     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; }) {};
       };
@@ -93,6 +94,8 @@
         with nixpkgsFor.${system}; {
           vlsisapd = coriolis-vlsisapd;
           bootstrap = coriolis-bootstrap;
+          coloquinte = coriolis-coloquinte;
+          lefdef = coriolis-lefdef;
           hurricane = coriolis-hurricane;
         });
 
diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
new file mode 100644
index 00000000..85118e22
--- /dev/null
+++ b/nix/coloquinte.nix
@@ -0,0 +1,20 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja
+, coriolis-bootstrap, coriolis-vlsisapd }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-coloquinte";
+
+  src = ../coloquinte;
+
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
+
+  buildInputs = [ boostWithPython coriolis-bootstrap qt4 ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}
diff --git a/nix/lefdef.nix b/nix/lefdef.nix
new file mode 100644
index 00000000..2a973217
--- /dev/null
+++ b/nix/lefdef.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja
+, coriolis-bootstrap, coriolis-vlsisapd }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-lefdef";
+
+  src = ../lefdef;
+
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
+
+  buildInputs = [ python2 boostWithPython coriolis-bootstrap bison flex zlib ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From a7ecaeaa366a1aad0fa1208925bb258cf43a415e Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 23 Aug 2021 08:44:07 +0000
Subject: [PATCH 09/94] Cleanup

---
 flake.nix          | 26 ++++++++++++--------------
 nix/bootstrap.nix  |  3 +--
 nix/coloquinte.nix |  4 +---
 nix/hurricane.nix  |  2 +-
 nix/lefdef.nix     |  3 +--
 nix/vlsisapd.nix   |  3 +--
 6 files changed, 17 insertions(+), 24 deletions(-)

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
 

From 68400d9437f44b1632d469aadbcc762a9d3a4fa2 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 23 Aug 2021 08:44:29 +0000
Subject: [PATCH 10/94] crlcore work

---
 flake.nix       |  2 +-
 nix/crlcore.nix | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 nix/crlcore.nix

diff --git a/flake.nix b/flake.nix
index 83ae7127..b5ba32c8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,7 +80,7 @@
         platforms   = platforms.all;
       };
 
-      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" ];
+      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" ];
 
     in
 
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
new file mode 100644
index 00000000..9eef5268
--- /dev/null
+++ b/nix/crlcore.nix
@@ -0,0 +1,31 @@
+{ version, meta }:
+
+{ lib, stdenv, python2, cmake, boost, bison, flex
+, libxml2, rapidjson, qt4, zlib, bzip2, ninja
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-lefdef }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-crlcore";
+
+  src = ../crlcore;
+
+  cmakeFlags = [
+    (
+      "-DCMAKE_MODULE_PATH="
+        + "${coriolis-bootstrap}/share/cmake/Modules"
+        + ";${coriolis-vlsisapd}/share/cmake/Modules"
+        + ";${coriolis-hurricane}/share/cmake/Modules"
+    )
+  ];
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap coriolis-lefdef
+    coriolis-hurricane coriolis-vlsisapd libxml2 bison flex qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 9aa450e8af47cc2b8b9f80fce5f16f6c3db32e88 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 26 Aug 2021 16:14:25 +0000
Subject: [PATCH 11/94] crlcore

---
 vlsisapd/cmake_modules/FindVLSISAPD.cmake | 26 +----------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/vlsisapd/cmake_modules/FindVLSISAPD.cmake b/vlsisapd/cmake_modules/FindVLSISAPD.cmake
index 35621cc1..7bad25d9 100644
--- a/vlsisapd/cmake_modules/FindVLSISAPD.cmake
+++ b/vlsisapd/cmake_modules/FindVLSISAPD.cmake
@@ -5,10 +5,9 @@
 #  VLSISAPD_INCLUDE_DIR - the VLSISAPD include directory
 #  VLSISAPD_LIBRARIES   - The libraries needed to use VLSISAPD
 
- set(VLSISAPD_FOUND FALSE)
+ set(VLSISAPD_FOUND TRUE)
  setup_search_dir(CORIOLIS)
 
- if(CORIOLIS_DIR_SEARCH)
   #MESSAGE("--   CORIOLIS_DIR_SEARCH: ${CORIOLIS_DIR_SEARCH}")
 
   # Utilities
@@ -58,27 +57,4 @@
     FIND_LIBRARY(CONFIGURATION_LIBRARY     NAMES configuration                                PATHS ${CORIOLIS_DIR_SEARCH} PATH_SUFFIXES lib64 lib)
     SET_FOUND   (CONFIGURATION)
     MESSAGE("--   Configuration: ${CONFIGURATION_LIBRARY}")
-    
-    IF(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
-        SET(VLSISAPD_FOUND TRUE)
-    ELSE(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
-        SET(VLSISAPD_FOUND FALSE)
-    ENDIF(AGDS_FOUND OR CIF_FOUND OR OPENCHAMS_FOUND OR DTR_FOUND OR SPICE_FOUND)
-ELSE(CORIOLIS_DIR_SEARCH)
-    MESSAGE("-- Cannot find VLSISAPD_LIBRARIES since CORIOLIS_DIR_SEARCH is not defined.")
-ENDIF(CORIOLIS_DIR_SEARCH)
-
-IF (NOT VLSISAPD_FOUND)
-    SET(VLSISAPD_MESSAGE
-    "VLSISAPD libraries were not found. Make sure CORIOLIS_TOP env variable is set.")
-    IF (NOT VLSISAPD_FIND_QUIETLY)
-        MESSAGE(STATUS "${VLSISAPD_MESSAGE}")
-    ELSE(NOT VLSISAPD_FIND_QUIETLY)
-        IF(VLSISAPD_FIND_REQUIRED)
-            MESSAGE(FATAL_ERROR "${VLSISAPD_MESSAGE}")
-        ENDIF(VLSISAPD_FIND_REQUIRED)
-    ENDIF(NOT VLSISAPD_FIND_QUIETLY)
-ELSE (NOT VLSISAPD_FOUND)
-    MESSAGE(STATUS "VLSISAPD library was found in ${CORIOLIS_DIR_SEARCH}")
-ENDIF (NOT VLSISAPD_FOUND)
 

From 83eb8b4a6b1e2f4e4f1c4c2473547fa8de30b9ab Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 26 Aug 2021 16:23:26 +0000
Subject: [PATCH 12/94] cumulus

---
 flake.nix       |  2 +-
 nix/cumulus.nix | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 nix/cumulus.nix

diff --git a/flake.nix b/flake.nix
index b5ba32c8..65b23603 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,7 +80,7 @@
         platforms   = platforms.all;
       };
 
-      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" ];
+      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" ];
 
     in
 
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
new file mode 100644
index 00000000..a5284027
--- /dev/null
+++ b/nix/cumulus.nix
@@ -0,0 +1,26 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore }:
+
+stdenv.mkDerivation {
+  pname = "coriolis-cumulus";
+
+  src = ../cumulus;
+
+  cmakeFlags = [
+    (
+      "-DCMAKE_MODULE_PATH="
+        + "${coriolis-bootstrap}/share/cmake/Modules"
+        + ";${coriolis-vlsisapd}/share/cmake/Modules"
+        + ";${coriolis-hurricane}/share/cmake/Modules"
+        + ";${coriolis-crlcore}/share/cmake/Modules"
+    )
+  ];
+
+  buildInputs = [ python2 coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From a5187f34b92a6921ea2f82726440139f6fb0f167 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 26 Aug 2021 16:44:45 +0000
Subject: [PATCH 13/94] flute

---
 flake.nix                    |  2 +-
 flute/src/3.1/CMakeLists.txt |  2 +-
 nix/crlcore.nix              |  3 +--
 nix/flute.nix                | 28 ++++++++++++++++++++++++++++
 4 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 nix/flute.nix

diff --git a/flake.nix b/flake.nix
index 65b23603..f37da1d9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,7 +80,7 @@
         platforms   = platforms.all;
       };
 
-      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" ];
+      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" "flute" ];
 
     in
 
diff --git a/flute/src/3.1/CMakeLists.txt b/flute/src/3.1/CMakeLists.txt
index 8609ce4f..79f0a9c0 100644
--- a/flute/src/3.1/CMakeLists.txt
+++ b/flute/src/3.1/CMakeLists.txt
@@ -1,7 +1,7 @@
 # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<flute/src/3.1>" -*-
 
    include_directories( ${FLUTE_SOURCE_DIR}/src/3.1
-                        ${CORIOLIS_LIBRARIES}
+                        ${CRLCORE_INCLUDE_PATH}
                         ${HURRICANE_INCLUDE_DIR}
                         ${CONFIGURATION_INCLUDE_DIR} 
                         ${PYTHON_INCLUDE_PATH}
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 9eef5268..ea34db99 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,7 +1,6 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, boost, bison, flex
-, libxml2, rapidjson, qt4, zlib, bzip2, ninja
+{ lib, stdenv, python2, cmake, boost, bison, flex, libxml2, qt4, ninja
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-lefdef }:
 
diff --git a/nix/flute.nix b/nix/flute.nix
new file mode 100644
index 00000000..0d398ff0
--- /dev/null
+++ b/nix/flute.nix
@@ -0,0 +1,28 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-flute";
+
+  src = ../flute;
+
+  cmakeFlags = [
+    (
+      "-DCMAKE_MODULE_PATH="
+        + "${coriolis-bootstrap}/share/cmake/Modules"
+        + ";${coriolis-vlsisapd}/share/cmake/Modules"
+        + ";${coriolis-hurricane}/share/cmake/Modules"
+        + ";${coriolis-crlcore}/share/cmake/Modules"
+    )
+  ];
+
+  buildInputs = [ python2 boostWithPython coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 4dff6fd6c3d6ca812a554fab13d3abdbd2ec28ad Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 14:26:33 +0000
Subject: [PATCH 14/94] etesian and anabatic

---
 anabatic/src/CMakeLists.txt              |  1 +
 crlcore/cmake_modules/FindCORIOLIS.cmake |  2 +
 etesian/cmake_modules/FindETESIAN.cmake  |  3 ++
 flake.nix                                | 69 ++++--------------------
 nix/anabatic.nix                         | 23 ++++++++
 nix/coloquinte.nix                       |  2 -
 nix/crlcore.nix                          |  9 ----
 nix/cumulus.nix                          | 10 ----
 nix/etesian.nix                          | 22 ++++++++
 nix/flute.nix                            | 10 ----
 nix/hurricane.nix                        |  2 -
 nix/lefdef.nix                           |  2 -
 nix/vlsisapd.nix                         |  2 -
 13 files changed, 62 insertions(+), 95 deletions(-)
 create mode 100644 nix/anabatic.nix
 create mode 100644 nix/etesian.nix

diff --git a/anabatic/src/CMakeLists.txt b/anabatic/src/CMakeLists.txt
index 7597035f..0752d5f1 100644
--- a/anabatic/src/CMakeLists.txt
+++ b/anabatic/src/CMakeLists.txt
@@ -6,6 +6,7 @@ endif ( CHECK_DETERMINISM )
 
    include_directories( ${ANABATIC_SOURCE_DIR}/src
                         ${CORIOLIS_INCLUDE_DIR} 
+                        ${ETESIAN_INCLUDE_DIR} 
                         ${HURRICANE_INCLUDE_DIR} 
                         ${CONFIGURATION_INCLUDE_DIR} 
                         ${FLUTE_INCLUDE_DIR} 
diff --git a/crlcore/cmake_modules/FindCORIOLIS.cmake b/crlcore/cmake_modules/FindCORIOLIS.cmake
index d630ae0b..c4bf4637 100644
--- a/crlcore/cmake_modules/FindCORIOLIS.cmake
+++ b/crlcore/cmake_modules/FindCORIOLIS.cmake
@@ -63,3 +63,5 @@ IF(UNIX)
   HURRICANE_CHECK_LIBRARIES(CORIOLIS_PYTHON ${CORIOLIS_FIND_REQUIRED})
 
 ENDIF(UNIX)
+
+SET(CORIOLIS_INCLUDE_DIR "${CRLCORE_INCLUDE_PATH}")
diff --git a/etesian/cmake_modules/FindETESIAN.cmake b/etesian/cmake_modules/FindETESIAN.cmake
index b0508d93..8c6a04df 100644
--- a/etesian/cmake_modules/FindETESIAN.cmake
+++ b/etesian/cmake_modules/FindETESIAN.cmake
@@ -5,6 +5,7 @@
 #  ETESIAN_INCLUDE_DIR - the path to where the Coriolis include files are.
 #  ETESIAN_LIBRARIES   - The path to where the Coriolis library files are.
 
+find_package(COLOQUINTE REQUIRED)
 
 SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
 
@@ -24,6 +25,8 @@ IF(UNIX)
     # Help the user find it if we cannot.
     DOC "The ${ETESIAN_INCLUDE_PATH_DESCRIPTION}"
   )
+	SET(ETESIAN_INCLUDE_PATH "${ETESIAN_INCLUDE_PATH};${COLOQUINTE_INCLUDE_DIR}")
+	MESSAGE("djaa${ETESIAN_INCLUDE_PATH};${COLOQUINTE_INCLUDE_DIR}djau")
 
   FIND_LIBRARY(ETESIAN_LIBRARY_PATH
     NAMES etesian
diff --git a/flake.nix b/flake.nix
index f37da1d9..f81aba29 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,7 +8,8 @@
     let
 
       # Generate a user-friendly version numer.
-      version = builtins.substring 0 8 self.lastModifiedDate;
+      #version = builtins.substring 0 8 self.lastModifiedDate;
+      version = "unstable";
 
       # System types to support.
       supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
@@ -19,60 +20,6 @@
       # Nixpkgs instantiated for supported system types.
       nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
 
-      /*
-      coriolis =
-        { lib, stdenv, python2, cmake_2_8, boost, bison, flex
-        , libxml2, rapidjson, which, qt4, zlib, bzip2 }:
-        let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-        stdenv.mkDerivation {
-          name = "coriolis-${version}";
-
-          src = ./.;
-
-          postPatch = ''
-            export HOME=/build
-            mkdir -p /build/coriolis-2.x/src
-            dir="$PWD"
-            mv "$PWD" -T /build/coriolis-2.x/src/coriolis
-
-            patchShebangs .
-            fixCmakeFiles .
-          '';
-
-          configurePhase = ''
-            runHook preConfigure
-            makeCmakeFindLibs
-            export LDFLAGS="$NIX_LDFLAGS"
-            runHook postConfigure
-          '';
-
-          hardeningDisable = [ "format" ];
-
-          buildPhase = ''
-            runHook preBuild
-            ./bootstrap/ccb.py --project=coriolis --make="-j$NIX_BUILD_CORES install"
-            runHook postBuild
-          '';
-
-          installPhase = ''
-            mkdir $out
-            mv /build/coriolis-2.x/*.* -t $out
-          '';
-
-          checkPhase = "true";
-
-          buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 zlib bzip2 ];
-          nativeBuildInputs = [ cmake_2_8 bison flex which ];
-
-          meta = with lib; {
-            description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
-            homepage    = "http://coriolis.lip6.fr/";
-            license     = licenses.gpl3;
-            platforms   = platforms.all;
-          };
-        };
-      */
-
       meta = with nixpkgs.lib; {
         description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
         homepage    = "http://coriolis.lip6.fr/";
@@ -80,7 +27,13 @@
         platforms   = platforms.all;
       };
 
-      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" "flute" ];
+      override = drv: drv.overrideAttrs (o: {
+        preConfigure = ''
+          cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
+        '' + (o.preConfigure or "");
+      });
+
+      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" "flute" "etesian" "anabatic" "coloquinte" ];
 
     in
 
@@ -88,9 +41,9 @@
       overlay = final: prev:
         builtins.foldl'
           (acc: elem: acc // {
-            "coriolis-${elem}" = final.callPackage (
+            "coriolis-${elem}" = override (final.callPackage (
               import "${self}/nix/${elem}.nix" { inherit version meta; }
-            ) {};
+            ) {});
           }) {} components;
 
       packages = forAllSystems (system: builtins.foldl' (acc: elem: acc // {
diff --git a/nix/anabatic.nix b/nix/anabatic.nix
new file mode 100644
index 00000000..b0db117e
--- /dev/null
+++ b/nix/anabatic.nix
@@ -0,0 +1,23 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-etesian, qt4
+, coriolis-flute }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-anabatic";
+
+  src = ../anabatic;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-etesian qt4 coriolis-flute
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}
diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
index 21d9b1c0..f8b581d8 100644
--- a/nix/coloquinte.nix
+++ b/nix/coloquinte.nix
@@ -9,8 +9,6 @@ stdenv.mkDerivation {
 
   src = ../coloquinte;
 
-  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
-
   buildInputs = [ boostWithPython coriolis-bootstrap qt4 ];
   nativeBuildInputs = [ cmake ninja ];
 
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index ea34db99..f0f38fea 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -11,15 +11,6 @@ stdenv.mkDerivation {
 
   src = ../crlcore;
 
-  cmakeFlags = [
-    (
-      "-DCMAKE_MODULE_PATH="
-        + "${coriolis-bootstrap}/share/cmake/Modules"
-        + ";${coriolis-vlsisapd}/share/cmake/Modules"
-        + ";${coriolis-hurricane}/share/cmake/Modules"
-    )
-  ];
-
   buildInputs = [
     python2 boostWithPython coriolis-bootstrap coriolis-lefdef
     coriolis-hurricane coriolis-vlsisapd libxml2 bison flex qt4
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
index a5284027..3d93902e 100644
--- a/nix/cumulus.nix
+++ b/nix/cumulus.nix
@@ -9,16 +9,6 @@ stdenv.mkDerivation {
 
   src = ../cumulus;
 
-  cmakeFlags = [
-    (
-      "-DCMAKE_MODULE_PATH="
-        + "${coriolis-bootstrap}/share/cmake/Modules"
-        + ";${coriolis-vlsisapd}/share/cmake/Modules"
-        + ";${coriolis-hurricane}/share/cmake/Modules"
-        + ";${coriolis-crlcore}/share/cmake/Modules"
-    )
-  ];
-
   buildInputs = [ python2 coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
   nativeBuildInputs = [ cmake ninja ];
 
diff --git a/nix/etesian.nix b/nix/etesian.nix
new file mode 100644
index 00000000..f1abc703
--- /dev/null
+++ b/nix/etesian.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-coloquinte, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-etesian";
+
+  src = ../etesian;
+
+  buildInputs = [
+    qt4 python2 boostWithPython coriolis-bootstrap coriolis-vlsisapd
+    coriolis-hurricane coriolis-coloquinte coriolis-crlcore
+  ];
+  propagatedBuildInputs = [ coriolis-coloquinte ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}
diff --git a/nix/flute.nix b/nix/flute.nix
index 0d398ff0..780d0be3 100644
--- a/nix/flute.nix
+++ b/nix/flute.nix
@@ -11,16 +11,6 @@ stdenv.mkDerivation {
 
   src = ../flute;
 
-  cmakeFlags = [
-    (
-      "-DCMAKE_MODULE_PATH="
-        + "${coriolis-bootstrap}/share/cmake/Modules"
-        + ";${coriolis-vlsisapd}/share/cmake/Modules"
-        + ";${coriolis-hurricane}/share/cmake/Modules"
-        + ";${coriolis-crlcore}/share/cmake/Modules"
-    )
-  ];
-
   buildInputs = [ python2 boostWithPython coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
   nativeBuildInputs = [ cmake ninja ];
 
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 8bcf8c2a..99647c3b 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -11,8 +11,6 @@ stdenv.mkDerivation {
 
   src = ../hurricane;
 
-  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules;${coriolis-vlsisapd}/share/cmake/Modules" ];
-
   buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 bzip2 coriolis-vlsisapd rapidjson ];
   nativeBuildInputs = [ cmake ninja ];
 
diff --git a/nix/lefdef.nix b/nix/lefdef.nix
index 177f70b3..1d703a66 100644
--- a/nix/lefdef.nix
+++ b/nix/lefdef.nix
@@ -12,8 +12,6 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
-
   buildInputs = [ python2 boostWithPython coriolis-bootstrap bison flex zlib ];
   nativeBuildInputs = [ cmake ninja ];
 
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index 2b19f57d..fa17ed9a 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -10,8 +10,6 @@ stdenv.mkDerivation {
 
   src = ../vlsisapd;
 
-  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
-
   buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
   nativeBuildInputs = [ cmake ninja ];
 

From 72b46d78023070150e538f5a9b2e3faa861fb73c Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 14:36:23 +0000
Subject: [PATCH 15/94] katana

---
 anabatic/cmake_modules/FindANABATIC.cmake |  2 +-
 flake.nix                                 |  6 +++++-
 katana/src/CMakeLists.txt                 |  2 ++
 nix/katana.nix                            | 25 +++++++++++++++++++++++
 4 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 nix/katana.nix

diff --git a/anabatic/cmake_modules/FindANABATIC.cmake b/anabatic/cmake_modules/FindANABATIC.cmake
index 340b9800..ced01cb3 100644
--- a/anabatic/cmake_modules/FindANABATIC.cmake
+++ b/anabatic/cmake_modules/FindANABATIC.cmake
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(ANABATIC_INCLUDE_PATH NAMES anabatic/AnabaticEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${ANABATIC_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/flake.nix b/flake.nix
index f81aba29..33a12077 100644
--- a/flake.nix
+++ b/flake.nix
@@ -33,7 +33,11 @@
         '' + (o.preConfigure or "");
       });
 
-      components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" "flute" "etesian" "anabatic" "coloquinte" ];
+      components = [
+        "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
+        "cumulus" "flute" "etesian" "anabatic" "coloquinte"
+        "katana"
+      ];
 
     in
 
diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt
index 55adf67d..fa989cdb 100644
--- a/katana/src/CMakeLists.txt
+++ b/katana/src/CMakeLists.txt
@@ -2,6 +2,8 @@
 
 #              include( ${QT_USE_FILE} )
    include_directories( ${KATANA_SOURCE_DIR}/src
+                        ${ANABATIC_INCLUDE_DIR} 
+                        ${ETESIAN_INCLUDE_DIR} 
                         ${CORIOLIS_INCLUDE_DIR} 
                         ${HURRICANE_INCLUDE_DIR} 
                         ${CONFIGURATION_INCLUDE_DIR} 
diff --git a/nix/katana.nix b/nix/katana.nix
new file mode 100644
index 00000000..198b6c84
--- /dev/null
+++ b/nix/katana.nix
@@ -0,0 +1,25 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-etesian, qt4
+, coriolis-flute, coriolis-anabatic
+, coriolis-lefdef, libxml2 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-katana";
+
+  src = ../katana;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-etesian qt4 coriolis-flute coriolis-anabatic
+    coriolis-lefdef libxml2
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From c253ef4ed7a651725ec8fb2c1ee1f38393e9c1ae Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 14:49:00 +0000
Subject: [PATCH 16/94] bora

---
 bora/src/CMakeLists.txt               |  2 ++
 flake.nix                             |  2 +-
 katana/cmake_modules/FindKATANA.cmake |  2 +-
 nix/bora.nix                          | 25 +++++++++++++++++++++++++
 4 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 nix/bora.nix

diff --git a/bora/src/CMakeLists.txt b/bora/src/CMakeLists.txt
index 1f7444bc..7be6544f 100644
--- a/bora/src/CMakeLists.txt
+++ b/bora/src/CMakeLists.txt
@@ -1,6 +1,8 @@
 # -*- explicit-buffer-name: "CMakeLists.txt<bora/src>" -*-
 
    include_directories( ${BORA_SOURCE_DIR}/src
+                        ${ANABATIC_INCLUDE_DIR}
+                        ${KATANA_INCLUDE_DIR}
                         ${CORIOLIS_INCLUDE_DIR} 
                         ${HURRICANE_INCLUDE_DIR} 
                         ${CONFIGURATION_INCLUDE_DIR} 
diff --git a/flake.nix b/flake.nix
index 33a12077..08a1568e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
-        "katana"
+        "katana" "bora"
       ];
 
     in
diff --git a/katana/cmake_modules/FindKATANA.cmake b/katana/cmake_modules/FindKATANA.cmake
index 0b579749..1243f0d5 100644
--- a/katana/cmake_modules/FindKATANA.cmake
+++ b/katana/cmake_modules/FindKATANA.cmake
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(KATANA_INCLUDE_PATH NAMES katana/KatanaEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${KATANA_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/nix/bora.nix b/nix/bora.nix
new file mode 100644
index 00000000..f8907bb2
--- /dev/null
+++ b/nix/bora.nix
@@ -0,0 +1,25 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, qt4, coriolis-katana
+, coriolis-flute, coriolis-anabatic
+, coriolis-lefdef, qwt6_qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-bora";
+
+  src = ../bora;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-katana qt4 coriolis-flute coriolis-anabatic
+    coriolis-lefdef qwt6_qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 9110d58ef253cc1961d3f1e4432300b6316b0caf Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 15:07:38 +0000
Subject: [PATCH 17/94] equinox

---
 flake.nix       |  2 +-
 nix/equinox.nix | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 nix/equinox.nix

diff --git a/flake.nix b/flake.nix
index 08a1568e..b6b9b7ec 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
-        "katana" "bora"
+        "katana" "bora" "equinox"
       ];
 
     in
diff --git a/nix/equinox.nix b/nix/equinox.nix
new file mode 100644
index 00000000..79dff9b3
--- /dev/null
+++ b/nix/equinox.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-equinox";
+
+  src = ../equinox;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 867df820f54edccd23330219fa0fad445c32e981 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 15:10:28 +0000
Subject: [PATCH 18/94] knik

---
 flake.nix    |  2 +-
 nix/knik.nix | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 nix/knik.nix

diff --git a/flake.nix b/flake.nix
index b6b9b7ec..40b04727 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
-        "katana" "bora" "equinox"
+        "katana" "bora" "equinox" "knik"
       ];
 
     in
diff --git a/nix/knik.nix b/nix/knik.nix
new file mode 100644
index 00000000..73aee664
--- /dev/null
+++ b/nix/knik.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-flute, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-knik";
+
+  src = ../knik;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-flute qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 552e54731ab94744b70d462a91e47cc681a203e7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 15:16:06 +0000
Subject: [PATCH 19/94] katabatic

---
 flake.nix                         |  2 +-
 katabatic/src/CMakeLists.txt      |  1 +
 knik/cmake_modules/FindKNIK.cmake |  2 +-
 nix/katabatic.nix                 | 23 +++++++++++++++++++++++
 4 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 nix/katabatic.nix

diff --git a/flake.nix b/flake.nix
index 40b04727..e090d5a2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
-        "katana" "bora" "equinox" "knik"
+        "katana" "bora" "equinox" "knik" "katabatic"
       ];
 
     in
diff --git a/katabatic/src/CMakeLists.txt b/katabatic/src/CMakeLists.txt
index fc9ac3fa..890d1f9a 100644
--- a/katabatic/src/CMakeLists.txt
+++ b/katabatic/src/CMakeLists.txt
@@ -8,6 +8,7 @@ endif ( CHECK_DETERMINISM )
    include_directories( ${KATABATIC_SOURCE_DIR}/src
                         ${CORIOLIS_INCLUDE_DIR} 
                         ${HURRICANE_INCLUDE_DIR} 
+                        ${KNIK_INCLUDE_DIR} 
                         ${CONFIGURATION_INCLUDE_DIR} 
                         ${Boost_INCLUDE_DIRS}
                         ${QtX_INCLUDE_DIR}
diff --git a/knik/cmake_modules/FindKNIK.cmake b/knik/cmake_modules/FindKNIK.cmake
index f7a3e496..4551267c 100644
--- a/knik/cmake_modules/FindKNIK.cmake
+++ b/knik/cmake_modules/FindKNIK.cmake
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(KNIK_INCLUDE_PATH NAMES knik/KnikEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${KNIK_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
new file mode 100644
index 00000000..8a0d2c91
--- /dev/null
+++ b/nix/katabatic.nix
@@ -0,0 +1,23 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-flute, coriolis-knik
+, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-katabatic";
+
+  src = ../katabatic;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-flute coriolis-knik qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From 99cf78f58066f0e0072dcf1cc28f03a85181c16d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 15:27:53 +0000
Subject: [PATCH 20/94] ispd work

---
 flake.nix               |  2 +-
 ispd/CMakeLists.txt     |  2 +-
 ispd/src/CMakeLists.txt |  2 ++
 nix/ispd.nix            | 24 ++++++++++++++++++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 nix/ispd.nix

diff --git a/flake.nix b/flake.nix
index e090d5a2..8cdc7bf4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
-        "katana" "bora" "equinox" "knik" "katabatic"
+        "katana" "bora" "equinox" "knik" "katabatic" "ispd"
       ];
 
     in
diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt
index ae3e5c96..b4d8b602 100644
--- a/ispd/CMakeLists.txt
+++ b/ispd/CMakeLists.txt
@@ -23,7 +23,7 @@
  find_package(CORIOLIS REQUIRED)
  find_package(KNIK REQUIRED)
  find_package(LEFDEF REQUIRED)
-#find_package(KATABATIC REQUIRED)
+ find_package(KATABATIC REQUIRED)
 #find_package(KITE REQUIRED)
 #find_package(EQUINOX REQUIRED)
 #find_package(SOLSTICE REQUIRED)
diff --git a/ispd/src/CMakeLists.txt b/ispd/src/CMakeLists.txt
index 2cb0567f..2bbe7a5d 100644
--- a/ispd/src/CMakeLists.txt
+++ b/ispd/src/CMakeLists.txt
@@ -1,6 +1,8 @@
 
                include ( ${QT_USE_FILE} )
    include_directories ( ${Boost_INCLUDE_DIRS}
+                         ${KNIK_INCLUDE_DIR}
+                         ${KATABATIC_INCLUDE_DIR}
                          ${HURRICANE_INCLUDE_DIR}
                          ${CORIOLIS_INCLUDE_DIR}
                        )
diff --git a/nix/ispd.nix b/nix/ispd.nix
new file mode 100644
index 00000000..b9e2d859
--- /dev/null
+++ b/nix/ispd.nix
@@ -0,0 +1,24 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-flute, coriolis-knik
+, coriolis-lefdef, coriolis-katabatic, libxml2, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-ispd";
+
+  src = ../ispd;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap libxml2
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-flute coriolis-knik coriolis-lefdef
+    coriolis-katabatic qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From dcc0e6aebf0346a8e75638cc9a4bf6bb5197a2a0 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:15:28 +0000
Subject: [PATCH 21/94] include/coriolis -> include/coriolis2

---
 anabatic/cmake_modules/FindANABATIC.cmake                     | 2 +-
 coloquinte/cmake_modules/FindCOLOQUINTE.cmake                 | 2 +-
 crlcore/cmake_modules/FindCORIOLIS.cmake                      | 2 +-
 .../code/engine/smurf/cmake_modules/FindETESIAN.cmake         | 4 ++--
 equinox/cmake_modules/FindEQUINOX.cmake                       | 4 ++--
 etesian/cmake_modules/FindETESIAN.cmake                       | 2 +-
 flute/cmake_modules/FindFLUTE.cmake                           | 2 +-
 katabatic/cmake_modules/FindKATABATIC.cmake                   | 4 ++--
 katana/cmake_modules/FindKATANA.cmake                         | 2 +-
 kite/cmake_modules/FindKITE.cmake                             | 4 ++--
 knik/cmake_modules/FindKNIK.cmake                             | 2 +-
 mauka/cmake_modules/FindMAUKA.cmake                           | 2 +-
 metis/cmake_modules/FindMETIS.cmake                           | 2 +-
 nimbus/cmake_modules/FindNIMBUS.cmake                         | 2 +-
 solstice/cmake_modules/FindSOLSTICE.cmake                     | 4 ++--
 unicorn/cmake_modules/FindUNICORN.cmake                       | 2 +-
 16 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/anabatic/cmake_modules/FindANABATIC.cmake b/anabatic/cmake_modules/FindANABATIC.cmake
index ced01cb3..975ec80b 100644
--- a/anabatic/cmake_modules/FindANABATIC.cmake
+++ b/anabatic/cmake_modules/FindANABATIC.cmake
@@ -6,7 +6,7 @@
 #  ANABATIC_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(ANABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(ANABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(ANABATIC_DIR_MESSAGE "Set the ANABATIC_INCLUDE_DIR cmake cache entry to the ${ANABATIC_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/coloquinte/cmake_modules/FindCOLOQUINTE.cmake b/coloquinte/cmake_modules/FindCOLOQUINTE.cmake
index 8a4d1516..ed057107 100644
--- a/coloquinte/cmake_modules/FindCOLOQUINTE.cmake
+++ b/coloquinte/cmake_modules/FindCOLOQUINTE.cmake
@@ -6,7 +6,7 @@
 #  COLOQUINTE_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(COLOQUINTE_INCLUDE_PATH_DESCRIPTION "directory containing the Coloquinte include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(COLOQUINTE_INCLUDE_PATH_DESCRIPTION "directory containing the Coloquinte include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(COLOQUINTE_DIR_MESSAGE "Set the COLOQUINTE_INCLUDE_DIR cmake cache entry to the ${COLOQUINTE_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/crlcore/cmake_modules/FindCORIOLIS.cmake b/crlcore/cmake_modules/FindCORIOLIS.cmake
index c4bf4637..b9b32db3 100644
--- a/crlcore/cmake_modules/FindCORIOLIS.cmake
+++ b/crlcore/cmake_modules/FindCORIOLIS.cmake
@@ -5,7 +5,7 @@
 #  CRLCORE_INCLUDE_DIR - the path to where the Coriolis include files are.
 #  CRLCORE_LIBRARIES   - The path to where the Coriolis library files are.
 
-SET(CORIOLIS_INCLUDE_PATH_DESCRIPTION "directory containing the Coriolis include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(CORIOLIS_INCLUDE_PATH_DESCRIPTION "directory containing the Coriolis include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 SET(CORIOLIS_DIR_MESSAGE "Set the CORIOLIS_INCLUDE_DIR cmake cache entry to the ${CORIOLIS_INCLUDE_PATH_DESCRIPTION}")
 
 # don't even bother under WIN32
diff --git a/documentation/examples/code/engine/smurf/cmake_modules/FindETESIAN.cmake b/documentation/examples/code/engine/smurf/cmake_modules/FindETESIAN.cmake
index 6280bdb0..28836124 100644
--- a/documentation/examples/code/engine/smurf/cmake_modules/FindETESIAN.cmake
+++ b/documentation/examples/code/engine/smurf/cmake_modules/FindETESIAN.cmake
@@ -6,7 +6,7 @@
 #  SMURF_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(SMURF_INCLUDE_PATH_DESCRIPTION "directory containing the Smurf include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(SMURF_INCLUDE_PATH_DESCRIPTION "directory containing the Smurf include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(SMURF_DIR_MESSAGE "Set the SMURF_INCLUDE_DIR cmake cache entry to the ${SMURF_INCLUDE_PATH_DESCRIPTION}")
 
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(SMURF_INCLUDE_PATH NAMES smurf/SmurfEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${SMURF_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/equinox/cmake_modules/FindEQUINOX.cmake b/equinox/cmake_modules/FindEQUINOX.cmake
index bd2196c2..b3cc1867 100644
--- a/equinox/cmake_modules/FindEQUINOX.cmake
+++ b/equinox/cmake_modules/FindEQUINOX.cmake
@@ -6,7 +6,7 @@
 #  EQUINOX_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(EQUINOX_INCLUDE_PATH_DESCRIPTION "directory containing the Equinox include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(EQUINOX_INCLUDE_PATH_DESCRIPTION "directory containing the Equinox include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(EQUINOX_DIR_MESSAGE "Set the EQUINOX_INCLUDE_DIR cmake cache entry to the ${EQUINOX_INCLUDE_PATH_DESCRIPTION}")
 
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(EQUINOX_INCLUDE_PATH NAMES equinox/Equi.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${EQUINOX_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/etesian/cmake_modules/FindETESIAN.cmake b/etesian/cmake_modules/FindETESIAN.cmake
index 8c6a04df..68a6a6ce 100644
--- a/etesian/cmake_modules/FindETESIAN.cmake
+++ b/etesian/cmake_modules/FindETESIAN.cmake
@@ -7,7 +7,7 @@
 
 find_package(COLOQUINTE REQUIRED)
 
-SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(ETESIAN_DIR_MESSAGE "Set the ETESIAN_INCLUDE_DIR cmake cache entry to the ${ETESIAN_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/flute/cmake_modules/FindFLUTE.cmake b/flute/cmake_modules/FindFLUTE.cmake
index 0e8d910b..230cae15 100644
--- a/flute/cmake_modules/FindFLUTE.cmake
+++ b/flute/cmake_modules/FindFLUTE.cmake
@@ -6,7 +6,7 @@
 #  FLUTE_LIBRARIES - The path to where the Coriolis library files are.
 
 
-set( FLUTE_INCLUDE_PATH_DESCRIPTION "The directory containing the FLUTE include files. E.g /usr/local/include/coriolis/flute/3.1 or /soc/coriolis2/include/coriolis/flute/3.1" )
+set( FLUTE_INCLUDE_PATH_DESCRIPTION "The directory containing the FLUTE include files. E.g /usr/local/include/coriolis2/flute/3.1 or /soc/coriolis2/include/coriolis2/flute/3.1" )
 set( FLUTE_DIR_MESSAGE              "Set the FLUTE_INCLUDE_DIR cmake cache entry to the ${FLUTE_INCLUDE_PATH_DESCRIPTION}" )
 
 if( UNIX )
diff --git a/katabatic/cmake_modules/FindKATABATIC.cmake b/katabatic/cmake_modules/FindKATABATIC.cmake
index 3421298b..4168313b 100644
--- a/katabatic/cmake_modules/FindKATABATIC.cmake
+++ b/katabatic/cmake_modules/FindKATABATIC.cmake
@@ -6,7 +6,7 @@
 #  KATABATIC_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(KATABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(KATABATIC_INCLUDE_PATH_DESCRIPTION "directory containing the Katabatic include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(KATABATIC_DIR_MESSAGE "Set the KATABATIC_INCLUDE_DIR cmake cache entry to the ${KATABATIC_INCLUDE_PATH_DESCRIPTION}")
 
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(KATABATIC_INCLUDE_PATH NAMES katabatic/KatabaticEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${KATABATIC_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/katana/cmake_modules/FindKATANA.cmake b/katana/cmake_modules/FindKATANA.cmake
index 1243f0d5..d1d2d298 100644
--- a/katana/cmake_modules/FindKATANA.cmake
+++ b/katana/cmake_modules/FindKATANA.cmake
@@ -6,7 +6,7 @@
 #  KATANA_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(KATANA_INCLUDE_PATH_DESCRIPTION "directory containing the Katana include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(KATANA_INCLUDE_PATH_DESCRIPTION "directory containing the Katana include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(KATANA_DIR_MESSAGE "Set the KATANA_INCLUDE_DIR cmake cache entry to the ${KATANA_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/kite/cmake_modules/FindKITE.cmake b/kite/cmake_modules/FindKITE.cmake
index d103d841..40c2672e 100644
--- a/kite/cmake_modules/FindKITE.cmake
+++ b/kite/cmake_modules/FindKITE.cmake
@@ -6,7 +6,7 @@
 #  KITE_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(KITE_INCLUDE_PATH_DESCRIPTION "directory containing the Kite include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(KITE_INCLUDE_PATH_DESCRIPTION "directory containing the Kite include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(KITE_DIR_MESSAGE "Set the KITE_INCLUDE_DIR cmake cache entry to the ${KITE_INCLUDE_PATH_DESCRIPTION}")
 
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(KITE_INCLUDE_PATH NAMES kite/KiteEngine.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${KITE_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/knik/cmake_modules/FindKNIK.cmake b/knik/cmake_modules/FindKNIK.cmake
index 4551267c..5d8d829d 100644
--- a/knik/cmake_modules/FindKNIK.cmake
+++ b/knik/cmake_modules/FindKNIK.cmake
@@ -6,7 +6,7 @@
 #  KNIK_LIBRARIES - The path to where the Coriolis library files are.
 
 
-SET(KNIK_INCLUDE_PATH_DESCRIPTION "directory containing the Knik/flute include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(KNIK_INCLUDE_PATH_DESCRIPTION "directory containing the Knik/flute include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(KNIK_DIR_MESSAGE "Set the KNIK_INCLUDE_DIR cmake cache entry to the ${KNIK_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/mauka/cmake_modules/FindMAUKA.cmake b/mauka/cmake_modules/FindMAUKA.cmake
index 1fa27e56..8094040d 100644
--- a/mauka/cmake_modules/FindMAUKA.cmake
+++ b/mauka/cmake_modules/FindMAUKA.cmake
@@ -6,7 +6,7 @@
 #  MAUKA_LIBRARIES - The path to where the Coriolis library files are.
 
 
-SET(MAUKA_INCLUDE_PATH_DESCRIPTION "directory containing the Mauka/flute include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(MAUKA_INCLUDE_PATH_DESCRIPTION "directory containing the Mauka/flute include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(MAUKA_DIR_MESSAGE "Set the MAUKA_INCLUDE_DIR cmake cache entry to the ${MAUKA_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/metis/cmake_modules/FindMETIS.cmake b/metis/cmake_modules/FindMETIS.cmake
index f2431655..042c0bbc 100644
--- a/metis/cmake_modules/FindMETIS.cmake
+++ b/metis/cmake_modules/FindMETIS.cmake
@@ -6,7 +6,7 @@
 #  METIS_LIBRARIES - The path to where the Coriolis library files are.
 
 
-SET(METIS_INCLUDE_PATH_DESCRIPTION "directory containing the Metis/hmetis include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(METIS_INCLUDE_PATH_DESCRIPTION "directory containing the Metis/hmetis include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(METIS_DIR_MESSAGE "Set the METIS_INCLUDE_DIR cmake cache entry to the ${METIS_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/nimbus/cmake_modules/FindNIMBUS.cmake b/nimbus/cmake_modules/FindNIMBUS.cmake
index fba6a1f7..6fefeba6 100644
--- a/nimbus/cmake_modules/FindNIMBUS.cmake
+++ b/nimbus/cmake_modules/FindNIMBUS.cmake
@@ -6,7 +6,7 @@
 #  NIMBUS_LIBRARIES - The path to where the Coriolis library files are.
 
 
-SET(NIMBUS_INCLUDE_PATH_DESCRIPTION "directory containing the Nimbus include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(NIMBUS_INCLUDE_PATH_DESCRIPTION "directory containing the Nimbus include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(NIMBUS_DIR_MESSAGE "Set the NIMBUS_INCLUDE_DIR cmake cache entry to the ${NIMBUS_INCLUDE_PATH_DESCRIPTION}")
 
diff --git a/solstice/cmake_modules/FindSOLSTICE.cmake b/solstice/cmake_modules/FindSOLSTICE.cmake
index e66b3e18..1d896f50 100644
--- a/solstice/cmake_modules/FindSOLSTICE.cmake
+++ b/solstice/cmake_modules/FindSOLSTICE.cmake
@@ -6,7 +6,7 @@
 #  SOLSTICE_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(SOLSTICE_INCLUDE_PATH_DESCRIPTION "directory containing the Solstice include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(SOLSTICE_INCLUDE_PATH_DESCRIPTION "directory containing the Solstice include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(SOLSTICE_DIR_MESSAGE "Set the SOLSTICE_INCLUDE_DIR cmake cache entry to the ${SOLSTICE_INCLUDE_PATH_DESCRIPTION}")
 
@@ -18,7 +18,7 @@ IF(UNIX)
   FIND_PATH(SOLSTICE_INCLUDE_PATH NAMES solstice/Equi.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
-    PATH_SUFFIXES include/coriolis
+    PATH_SUFFIXES include/coriolis2
     # Help the user find it if we cannot.
     DOC "The ${SOLSTICE_INCLUDE_PATH_DESCRIPTION}"
   )
diff --git a/unicorn/cmake_modules/FindUNICORN.cmake b/unicorn/cmake_modules/FindUNICORN.cmake
index 1e12c04d..ede0a1e3 100644
--- a/unicorn/cmake_modules/FindUNICORN.cmake
+++ b/unicorn/cmake_modules/FindUNICORN.cmake
@@ -6,7 +6,7 @@
 #  UNICORN_LIBRARIES   - The path to where the Coriolis library files are.
 
 
-SET(UNICORN_INCLUDE_PATH_DESCRIPTION "directory containing the Unicorn include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
+SET(UNICORN_INCLUDE_PATH_DESCRIPTION "directory containing the Unicorn include files. E.g /usr/local/include/coriolis2 or /asim/coriolis/include/coriolis2")
 
 SET(UNICORN_DIR_MESSAGE "Set the UNICORN_INCLUDE_DIR cmake cache entry to the ${UNICORN_INCLUDE_PATH_DESCRIPTION}")
 

From 024b4b232f3f7e7acd78943ebbbe7603e4db893e Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:23:35 +0000
Subject: [PATCH 22/94] ispd

---
 nix/ispd.nix | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nix/ispd.nix b/nix/ispd.nix
index b9e2d859..3aae59b0 100644
--- a/nix/ispd.nix
+++ b/nix/ispd.nix
@@ -20,5 +20,7 @@ stdenv.mkDerivation {
   ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { broken = true; };
 }

From d6837972aac1b4300325344241f60dc7a2fc0c95 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:29:24 +0000
Subject: [PATCH 23/94] karakaze

---
 flake.nix        |  1 +
 nix/karakaze.nix | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 nix/karakaze.nix

diff --git a/flake.nix b/flake.nix
index 8cdc7bf4..cd7732b6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,6 +37,7 @@
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
+        "karakaze"
       ];
 
     in
diff --git a/nix/karakaze.nix b/nix/karakaze.nix
new file mode 100644
index 00000000..19b0df6b
--- /dev/null
+++ b/nix/karakaze.nix
@@ -0,0 +1,18 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane }:
+
+stdenv.mkDerivation {
+  pname = "coriolis-karakaze";
+
+  src = ../karakaze;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd
+    coriolis-crlcore coriolis-hurricane qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From b6336a02493dbfb72b5f417ba2d47a847e804bfc Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:36:55 +0000
Subject: [PATCH 24/94] kite

---
 flake.nix               |  2 +-
 kite/src/CMakeLists.txt |  2 ++
 nix/kite.nix            | 24 ++++++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 nix/kite.nix

diff --git a/flake.nix b/flake.nix
index cd7732b6..93c22677 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
-        "karakaze"
+        "karakaze" "kite"
       ];
 
     in
diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt
index 2c05d319..1940c6f2 100644
--- a/kite/src/CMakeLists.txt
+++ b/kite/src/CMakeLists.txt
@@ -3,6 +3,8 @@
 #              include( ${QT_USE_FILE} )
    include_directories( ${KITE_SOURCE_DIR}/src
                         ${CORIOLIS_INCLUDE_DIR} 
+                        ${KNIK_INCLUDE_DIR}
+                        ${KATABATIC_INCLUDE_DIR}
                         ${HURRICANE_INCLUDE_DIR} 
                         ${CONFIGURATION_INCLUDE_DIR} 
                         ${FLUTE_INCLUDE_DIR} 
diff --git a/nix/kite.nix b/nix/kite.nix
new file mode 100644
index 00000000..f6eef440
--- /dev/null
+++ b/nix/kite.nix
@@ -0,0 +1,24 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-lefdef, coriolis-knik, coriolis-katabatic
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, qt4, coriolis-flute, libxml2 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-kite";
+
+  src = ../kite;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
+    coriolis-lefdef
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From d7fe45acd8df4b53a2ac89aaeb333ca65f87b2e5 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:40:10 +0000
Subject: [PATCH 25/94] nimbus

---
 flake.nix      |  2 +-
 nix/nimbus.nix | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 nix/nimbus.nix

diff --git a/flake.nix b/flake.nix
index 93c22677..6f8f35ca 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
-        "karakaze" "kite"
+        "karakaze" "kite" "nimbus"
       ];
 
     in
diff --git a/nix/nimbus.nix b/nix/nimbus.nix
new file mode 100644
index 00000000..a05e6ed5
--- /dev/null
+++ b/nix/nimbus.nix
@@ -0,0 +1,23 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, doxygen, boost }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-nimbus";
+
+  src = ../nimbus;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd
+    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version;
+
+  meta = meta // { broken = true; };
+}

From 2c4f143e15a53327a589e9e1a8345dffa03d6d75 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:43:24 +0000
Subject: [PATCH 26/94] metis, mauka

---
 flake.nix     |  2 +-
 nix/mauka.nix | 24 ++++++++++++++++++++++++
 nix/metis.nix | 23 +++++++++++++++++++++++
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 nix/mauka.nix
 create mode 100644 nix/metis.nix

diff --git a/flake.nix b/flake.nix
index 6f8f35ca..f2791a06 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
-        "karakaze" "kite" "nimbus"
+        "karakaze" "kite" "nimbus" "metis" "mauka"
       ];
 
     in
diff --git a/nix/mauka.nix b/nix/mauka.nix
new file mode 100644
index 00000000..3663c3be
--- /dev/null
+++ b/nix/mauka.nix
@@ -0,0 +1,24 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-nimbus, coriolis-metis, doxygen, boost }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-mauka";
+
+  src = ../mauka;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
+    coriolis-metis
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version;
+
+  meta = meta // { broken = true; };
+}
diff --git a/nix/metis.nix b/nix/metis.nix
new file mode 100644
index 00000000..1871dc00
--- /dev/null
+++ b/nix/metis.nix
@@ -0,0 +1,23 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-nimbus, doxygen, boost }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-metis";
+
+  src = ../metis;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version;
+
+  meta = meta // { broken = true; };
+}

From ffdff0b77a71879979e11605310e523ae7646367 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 16:44:57 +0000
Subject: [PATCH 27/94] oroshi

---
 flake.nix      |  2 +-
 nix/oroshi.nix | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 nix/oroshi.nix

diff --git a/flake.nix b/flake.nix
index f2791a06..bb6671d8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
-        "karakaze" "kite" "nimbus" "metis" "mauka"
+        "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
       ];
 
     in
diff --git a/nix/oroshi.nix b/nix/oroshi.nix
new file mode 100644
index 00000000..9aba7b57
--- /dev/null
+++ b/nix/oroshi.nix
@@ -0,0 +1,21 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, doxygen, boost }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-oroshi";
+
+  src = ../oroshi;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd
+    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version meta;
+}

From 644805db36aac8e03aee3ce1307632b4228e29c8 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 17:07:48 +0000
Subject: [PATCH 28/94] solstice

---
 equinox/cmake_modules/FindEQUINOX.cmake |  2 +-
 flake.nix                               |  1 +
 nix/solstice.nix                        | 22 ++++++++++++++++++++++
 solstice/CMakeLists.txt                 |  3 ++-
 solstice/src/CMakeLists.txt             |  1 +
 5 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 nix/solstice.nix

diff --git a/equinox/cmake_modules/FindEQUINOX.cmake b/equinox/cmake_modules/FindEQUINOX.cmake
index b3cc1867..1e300e35 100644
--- a/equinox/cmake_modules/FindEQUINOX.cmake
+++ b/equinox/cmake_modules/FindEQUINOX.cmake
@@ -39,8 +39,8 @@ IF(UNIX)
     DOC "The ${EQUINOX_INCLUDE_PATH_DESCRIPTION}"
   )
 
-  SET_LIBRARIES_PATH(EQUINOX EQUINOX)
   SET_LIBRARIES_PATH(EQUINOX INTERVALTREE)
+  SET_LIBRARIES_PATH(EQUINOX EQUINOX)
   HURRICANE_CHECK_LIBRARIES(EQUINOX)
 
 ENDIF(UNIX)
diff --git a/flake.nix b/flake.nix
index bb6671d8..9fd37764 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,6 +38,7 @@
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
+        "solstice"
       ];
 
     in
diff --git a/nix/solstice.nix b/nix/solstice.nix
new file mode 100644
index 00000000..0fe42350
--- /dev/null
+++ b/nix/solstice.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-equinox, boost }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-solstice";
+
+  src = ../solstice;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd
+    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
+    coriolis-equinox
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}
diff --git a/solstice/CMakeLists.txt b/solstice/CMakeLists.txt
index 91c8bca9..62eabe4f 100644
--- a/solstice/CMakeLists.txt
+++ b/solstice/CMakeLists.txt
@@ -19,6 +19,7 @@
  find_package(HURRICANE REQUIRED)
  find_package(CORIOLIS REQUIRED)
  find_package(EQUINOX REQUIRED)
- 
+
+
  add_subdirectory(src)
  add_subdirectory(cmake_modules)
diff --git a/solstice/src/CMakeLists.txt b/solstice/src/CMakeLists.txt
index 2e3fec5f..ab8d8805 100644
--- a/solstice/src/CMakeLists.txt
+++ b/solstice/src/CMakeLists.txt
@@ -3,6 +3,7 @@
 
    include_directories ( ${SOLSTICE_SOURCE_DIR}/src
                          ${HURRICANE_INCLUDE_DIR}
+                         ${EQUINOX_INCLUDE_DIR}
                          ${CORIOLIS_INCLUDE_DIR}
                          ${UTILITIES_INCLUDE_DIR}
                          ${QtX_INCLUDE_DIR}

From 8ead337bd80b2a202c78ef3182de56bcc9d8558a Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 17:15:30 +0000
Subject: [PATCH 29/94] stratus1

---
 flake.nix        |  2 +-
 nix/stratus1.nix | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 nix/stratus1.nix

diff --git a/flake.nix b/flake.nix
index 9fd37764..14eb7fa4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,7 +38,7 @@
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
-        "solstice"
+        "solstice" "stratus1"
       ];
 
     in
diff --git a/nix/stratus1.nix b/nix/stratus1.nix
new file mode 100644
index 00000000..8e2647f3
--- /dev/null
+++ b/nix/stratus1.nix
@@ -0,0 +1,18 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane }:
+
+stdenv.mkDerivation {
+  pname = "coriolis-stratus1";
+
+  src = ../stratus1;
+
+  buildInputs = [
+    python2 coriolis-bootstrap coriolis-vlsisapd
+    coriolis-crlcore coriolis-hurricane qt4
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From c47e89ce26a5ff1698a7c3f5aee6d159457749f9 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 17:18:34 +0000
Subject: [PATCH 30/94] tutorial

---
 flake.nix        |  2 +-
 nix/tutorial.nix | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 nix/tutorial.nix

diff --git a/flake.nix b/flake.nix
index 14eb7fa4..643c81b1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,7 +38,7 @@
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
-        "solstice" "stratus1"
+        "solstice" "stratus1" "tutorial"
       ];
 
     in
diff --git a/nix/tutorial.nix b/nix/tutorial.nix
new file mode 100644
index 00000000..bc925e2a
--- /dev/null
+++ b/nix/tutorial.nix
@@ -0,0 +1,23 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, qt4, coriolis-lefdef, libxml2
+, doxygen }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-tutorial";
+
+  src = ../tutorial;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-lefdef libxml2 qt4
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version meta;
+}

From ed96a0b2e487b9784aa0e1df75a3823269427dc7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 17:20:48 +0000
Subject: [PATCH 31/94] Build documentation

---
 nix/anabatic.nix   | 4 ++--
 nix/bora.nix       | 4 ++--
 nix/coloquinte.nix | 4 ++--
 nix/crlcore.nix    | 4 ++--
 nix/etesian.nix    | 4 ++--
 nix/hurricane.nix  | 4 ++--
 nix/katabatic.nix  | 4 ++--
 nix/katana.nix     | 4 ++--
 nix/kite.nix       | 4 ++--
 nix/vlsisapd.nix   | 4 ++--
 10 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/nix/anabatic.nix b/nix/anabatic.nix
index b0db117e..690fbbb1 100644
--- a/nix/anabatic.nix
+++ b/nix/anabatic.nix
@@ -3,7 +3,7 @@
 { lib, stdenv, cmake, ninja, python2, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-etesian, qt4
-, coriolis-flute }:
+, coriolis-flute, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     coriolis-etesian qt4 coriolis-flute
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/bora.nix b/nix/bora.nix
index f8907bb2..216f5cfb 100644
--- a/nix/bora.nix
+++ b/nix/bora.nix
@@ -4,7 +4,7 @@
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, qt4, coriolis-katana
 , coriolis-flute, coriolis-anabatic
-, coriolis-lefdef, qwt6_qt4 }:
+, coriolis-lefdef, qwt6_qt4, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
     coriolis-katana qt4 coriolis-flute coriolis-anabatic
     coriolis-lefdef qwt6_qt4
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
index f8b581d8..b3748290 100644
--- a/nix/coloquinte.nix
+++ b/nix/coloquinte.nix
@@ -1,6 +1,6 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, boost, qt4, ninja, coriolis-bootstrap }:
+{ lib, stdenv, python2, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
   src = ../coloquinte;
 
   buildInputs = [ boostWithPython coriolis-bootstrap qt4 ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index f0f38fea..d99ad31c 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -2,7 +2,7 @@
 
 { lib, stdenv, python2, cmake, boost, bison, flex, libxml2, qt4, ninja
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-lefdef }:
+, coriolis-lefdef, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
     python2 boostWithPython coriolis-bootstrap coriolis-lefdef
     coriolis-hurricane coriolis-vlsisapd libxml2 bison flex qt4
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/etesian.nix b/nix/etesian.nix
index f1abc703..d255ce99 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -2,7 +2,7 @@
 
 { lib, stdenv, cmake, ninja, python2, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, coriolis-coloquinte, qt4 }:
+, coriolis-crlcore, coriolis-coloquinte, qt4, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
     coriolis-hurricane coriolis-coloquinte coriolis-crlcore
   ];
   propagatedBuildInputs = [ coriolis-coloquinte ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 99647c3b..63a4c97d 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -2,7 +2,7 @@
 
 { lib, stdenv, python2, cmake, boost, bison, flex
 , libxml2, rapidjson, qt4, zlib, bzip2, ninja
-, coriolis-bootstrap, coriolis-vlsisapd }:
+, coriolis-bootstrap, coriolis-vlsisapd, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../hurricane;
 
   buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 bzip2 coriolis-vlsisapd rapidjson ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
index 8a0d2c91..78aa1934 100644
--- a/nix/katabatic.nix
+++ b/nix/katabatic.nix
@@ -3,7 +3,7 @@
 { lib, stdenv, cmake, ninja, python2, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-flute, coriolis-knik
-, qt4 }:
+, qt4, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     coriolis-flute coriolis-knik qt4
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/katana.nix b/nix/katana.nix
index 198b6c84..61a0d2ab 100644
--- a/nix/katana.nix
+++ b/nix/katana.nix
@@ -4,7 +4,7 @@
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-etesian, qt4
 , coriolis-flute, coriolis-anabatic
-, coriolis-lefdef, libxml2 }:
+, coriolis-lefdef, libxml2, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
     coriolis-etesian qt4 coriolis-flute coriolis-anabatic
     coriolis-lefdef libxml2
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/kite.nix b/nix/kite.nix
index f6eef440..2f31edea 100644
--- a/nix/kite.nix
+++ b/nix/kite.nix
@@ -3,7 +3,7 @@
 { lib, stdenv, cmake, ninja, python2, boost
 , coriolis-lefdef, coriolis-knik, coriolis-katabatic
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, qt4, coriolis-flute, libxml2 }:
+, coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
     coriolis-lefdef
   ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index fa17ed9a..6665da7e 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, python2, cmake, boost, bison, flex
-, libxml2, qt4, ninja, coriolis-bootstrap }:
+, libxml2, qt4, ninja, coriolis-bootstrap, doxygen }:
 
 let boostWithPython = boost.override { enablePython = true; python = python2; }; in
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   src = ../vlsisapd;
 
   buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
 }

From 11311072a22fd272ecf0532a147d2c0efb83f4ae Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 19:48:19 +0000
Subject: [PATCH 32/94] unicorn

---
 flake.nix                                 |  2 +-
 nix/unicorn.nix                           | 29 +++++++++++++++++++++++
 solstice/cmake_modules/FindSOLSTICE.cmake |  2 +-
 unicorn/CMakeLists.txt                    |  4 ++--
 unicorn/src/CMakeLists.txt                |  8 +++++++
 5 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 nix/unicorn.nix

diff --git a/flake.nix b/flake.nix
index 643c81b1..66401d49 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,7 +38,7 @@
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
-        "solstice" "stratus1" "tutorial"
+        "solstice" "stratus1" "tutorial" "unicorn"
       ];
 
     in
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
new file mode 100644
index 00000000..95bdfe8d
--- /dev/null
+++ b/nix/unicorn.nix
@@ -0,0 +1,29 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, qt4, coriolis-katana
+, coriolis-flute, coriolis-anabatic, coriolis-coloquinte
+, coriolis-lefdef, coriolis-knik, coriolis-kite
+, coriolis-katabatic, coriolis-etesian, coriolis-equinox
+, coriolis-solstice, libxml2, doxygen }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-unicorn";
+
+  src = ../unicorn;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-katana qt4 coriolis-flute coriolis-anabatic
+    coriolis-lefdef libxml2 coriolis-knik coriolis-kite
+    coriolis-katabatic coriolis-etesian coriolis-equinox
+    coriolis-solstice
+  ];
+  nativeBuildInputs = [ cmake ninja doxygen ];
+
+  inherit version meta;
+}
diff --git a/solstice/cmake_modules/FindSOLSTICE.cmake b/solstice/cmake_modules/FindSOLSTICE.cmake
index 1d896f50..afdb640f 100644
--- a/solstice/cmake_modules/FindSOLSTICE.cmake
+++ b/solstice/cmake_modules/FindSOLSTICE.cmake
@@ -15,7 +15,7 @@ IF(UNIX)
   #
   # Look for an installation.
   #
-  FIND_PATH(SOLSTICE_INCLUDE_PATH NAMES solstice/Equi.h PATHS
+  FIND_PATH(SOLSTICE_INCLUDE_PATH NAMES solstice/Brick.h PATHS
     # Look in other places.
     ${CORIOLIS_DIR_SEARCH}
     PATH_SUFFIXES include/coriolis2
diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt
index 590fa7b2..1955fa46 100644
--- a/unicorn/CMakeLists.txt
+++ b/unicorn/CMakeLists.txt
@@ -36,8 +36,8 @@
  find_package(KNIK               REQUIRED)
  find_package(KATABATIC          REQUIRED)
  find_package(KITE               REQUIRED)
-#find_package(EQUINOX            REQUIRED)
-#find_package(SOLSTICE           REQUIRED)
+ find_package(EQUINOX            REQUIRED)
+ find_package(SOLSTICE           REQUIRED)
  find_package(Doxygen)
 
  if(WITH_OPENMP)
diff --git a/unicorn/src/CMakeLists.txt b/unicorn/src/CMakeLists.txt
index fcb98b4b..760afe73 100644
--- a/unicorn/src/CMakeLists.txt
+++ b/unicorn/src/CMakeLists.txt
@@ -3,6 +3,14 @@
 #              include( ${QT_USE_FILE} )
    include_directories( ${UNICORN_SOURCE_DIR}/src
                         ${HURRICANE_INCLUDE_DIR}
+                        ${KNIK_INCLUDE_DIR}
+                        ${KATABATIC_INCLUDE_DIR}
+                        ${SOLSTICE_INCLUDE_DIR}
+                        ${EQUINOX_INCLUDE_DIR}
+                        ${KITE_INCLUDE_DIR}
+                        ${ETESIAN_INCLUDE_DIR}
+                        ${ANABATIC_INCLUDE_DIR}
+                        ${KATANA_INCLUDE_DIR}
                         ${CORIOLIS_INCLUDE_DIR}
                         ${BOOKSHELF_INCLUDE_DIR}
                         ${CONFIGURATION_INCLUDE_DIR}

From 9e21326d03e2fedebb11a19dba63560762a5aa00 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 19:56:12 +0000
Subject: [PATCH 33/94] documentation

---
 flake.nix             |  2 +-
 nix/documentation.nix | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 nix/documentation.nix

diff --git a/flake.nix b/flake.nix
index 66401d49..9e65c679 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,7 +38,7 @@
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
-        "solstice" "stratus1" "tutorial" "unicorn"
+        "solstice" "stratus1" "tutorial" "unicorn" "documentation"
       ];
 
     in
diff --git a/nix/documentation.nix b/nix/documentation.nix
new file mode 100644
index 00000000..83bf172c
--- /dev/null
+++ b/nix/documentation.nix
@@ -0,0 +1,18 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, coriolis-bootstrap, python3Packages }:
+
+stdenv.mkDerivation {
+  pname = "coriolis-documentation";
+
+  src = ../documentation;
+
+  cmakeFlags = [ "-DBUILD_DOC=ON" ];
+
+  buildInputs = [];
+  nativeBuildInputs = [ cmake ninja coriolis-bootstrap python3Packages.pelican ];
+
+  inherit version;
+
+  meta = meta // { broken = true; };
+}

From 7ecd0ce2feebc33ee7b4d820bb10ca68995a5f83 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 20:00:36 +0000
Subject: [PATCH 34/94] unittests

---
 flake.nix         |  1 +
 nix/unittests.nix | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 nix/unittests.nix

diff --git a/flake.nix b/flake.nix
index 9e65c679..49d683dc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,6 +39,7 @@
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
         "solstice" "stratus1" "tutorial" "unicorn" "documentation"
+        "unittests"
       ];
 
     in
diff --git a/nix/unittests.nix b/nix/unittests.nix
new file mode 100644
index 00000000..42877e32
--- /dev/null
+++ b/nix/unittests.nix
@@ -0,0 +1,22 @@
+{ version, meta }:
+
+{ lib, stdenv, cmake, ninja, python2, boost
+, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-crlcore, coriolis-lefdef, qt4 }:
+
+let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+
+stdenv.mkDerivation {
+  pname = "coriolis-unittests";
+
+  src = ../unittests;
+
+  buildInputs = [
+    python2 boostWithPython coriolis-bootstrap qt4
+    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-lefdef
+  ];
+  nativeBuildInputs = [ cmake ninja ];
+
+  inherit version meta;
+}

From ceffebde2e11f76d17b6bb3030f3cfd0ba4f5972 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 20:08:48 +0000
Subject: [PATCH 35/94] -DBUILD_DOC=ON

---
 flake.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/flake.nix b/flake.nix
index 49d683dc..ce3ba7d2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -31,6 +31,7 @@
         preConfigure = ''
           cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
         '' + (o.preConfigure or "");
+        cmakeFlags = [ "-DBUILD_DOC=ON" ] ++ (o.cmakeFlags or []);
       });
 
       components = [

From 18c4ebdb8688ba150ef1fbfccd0c682ee0afdf32 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 27 Aug 2021 20:18:09 +0000
Subject: [PATCH 36/94] Set version and default package

---
 flake.nix | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/flake.nix b/flake.nix
index ce3ba7d2..789b979a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,8 +8,7 @@
     let
 
       # Generate a user-friendly version numer.
-      #version = builtins.substring 0 8 self.lastModifiedDate;
-      version = "unstable";
+      version = builtins.substring 0 8 self.lastModifiedDate;
 
       # System types to support.
       supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
@@ -58,7 +57,7 @@
         ${elem} = nixpkgsFor.${system}.${"coriolis-${elem}"};
       }) {} components);
 
-      defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
+      defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
       devShell = defaultPackage;
 
       #hydraJobs.coriolis = self.defaultPackage;

From e1975b45eaa0a5394f56c0103f78efeb8f794d9d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 15:31:41 +0000
Subject: [PATCH 37/94] Fix linking with boost python

---
 bootstrap/cmake_modules/FindBootstrap.cmake | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake
index 332a8ae2..bf7ac00c 100644
--- a/bootstrap/cmake_modules/FindBootstrap.cmake
+++ b/bootstrap/cmake_modules/FindBootstrap.cmake
@@ -39,15 +39,6 @@
    message("-- Distribution is ${DISTRIBUTION}")
  endmacro(check_distribution)
 
-#
-# Specific setup for MacOS X.
-#
- if(WITH_MACPORTS)
-   set(Boost_PYVER "27")
- else()
-   set(Boost_PYVER "")
- endif()
-
 #
 # Get the svn revision version and configure a svn.h.in file based on this version
 # The include directory name is passed as argument
@@ -196,8 +187,9 @@
    else(ARGC LESS 1)
      foreach(component ${ARGV})
        if(${component} STREQUAL "python")
+         set(components ${components} ${component}27)
        else()
-	       set(components ${components} ${component})
+         set(components ${components} ${component})
        endif()
      endforeach()
      

From 7105a5aea485633630664e9f6a1162624bb9faa7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 15:33:53 +0000
Subject: [PATCH 38/94] Make vlsisapd accessible through Python!

---
 flake.nix        | 10 +++++++++-
 nix/vlsisapd.nix | 13 +++++++------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/flake.nix b/flake.nix
index 789b979a..9863aa27 100644
--- a/flake.nix
+++ b/flake.nix
@@ -58,7 +58,15 @@
       }) {} components);
 
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
-      devShell = defaultPackage;
+
+      devShell = forAllSystems (system:
+        let
+          pkgs = nixpkgsFor.${system};
+          env = pkgs.python2.buildEnv.override {
+            extraLibs = [ pkgs.coriolis-vlsisapd ];
+          };
+        in env.env
+      );
 
       #hydraJobs.coriolis = self.defaultPackage;
     };
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index 6665da7e..2e35e2cc 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -1,17 +1,18 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, boost, bison, flex
-, libxml2, qt4, ninja, coriolis-bootstrap, doxygen }:
+{ lib, stdenv, cmake, boost, bison, flex
+, libxml2, qt4, ninja, coriolis-bootstrap, doxygen
+, python2Packages }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; }; in
 
-stdenv.mkDerivation {
+python2Packages.toPythonModule (stdenv.mkDerivation {
   pname = "coriolis-vlsisapd";
 
   src = ../vlsisapd;
 
-  buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
+  buildInputs = [ python2Packages.python boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
   nativeBuildInputs = [ cmake ninja doxygen ];
 
   inherit version meta;
-}
+})

From 41665edfed216d43273b7150265f455f8cafb213 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 17:36:58 +0000
Subject: [PATCH 39/94] Add generic helper

---
 flake.nix        |  9 ++++++++-
 nix/generic.nix  | 33 +++++++++++++++++++++++++++++++++
 nix/vlsisapd.nix | 29 +++++++++++------------------
 3 files changed, 52 insertions(+), 19 deletions(-)
 create mode 100644 nix/generic.nix

diff --git a/flake.nix b/flake.nix
index 9863aa27..21771781 100644
--- a/flake.nix
+++ b/flake.nix
@@ -33,6 +33,10 @@
         cmakeFlags = [ "-DBUILD_DOC=ON" ] ++ (o.cmakeFlags or []);
       });
 
+      generic = import ./nix/generic.nix { inherit version meta; };
+
+      # not generic: solstice lefdef equinox knik coloquinte bootstrap
+
       components = [
         "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
         "cumulus" "flute" "etesian" "anabatic" "coloquinte"
@@ -42,6 +46,8 @@
         "unittests"
       ];
 
+      commonArgs = { inherit version meta generic; };
+
     in
 
     rec {
@@ -49,7 +55,8 @@
         builtins.foldl'
           (acc: elem: acc // {
             "coriolis-${elem}" = override (final.callPackage (
-              import "${self}/nix/${elem}.nix" { inherit version meta; }
+              let f = import (./nix + "/${elem}.nix"); in
+              f (builtins.intersectAttrs (builtins.functionArgs f) commonArgs)
             ) {});
           }) {} components;
 
diff --git a/nix/generic.nix b/nix/generic.nix
new file mode 100644
index 00000000..469f609f
--- /dev/null
+++ b/nix/generic.nix
@@ -0,0 +1,33 @@
+{ version, meta }:
+
+let f =
+  { lib, stdenv, cmake, ninja, boost
+  , coriolis-bootstrap, python2Packages }:
+  { name
+  , src
+  , buildInputs ? []
+  , nativeBuildInputs ? []
+  , pythonImportsCheck
+  }:
+  let
+    boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
+    drv = stdenv.mkDerivation {
+      pname = "coriolis-${name}";
+
+      buildInputs = [ python2Packages.python boostWithPython coriolis-bootstrap ] ++ buildInputs;
+      nativeBuildInputs = [ cmake ninja python2Packages.pythonImportsCheckHook ] ++ nativeBuildInputs;
+
+      preInstall = ''
+          export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
+      '';
+
+      inherit version meta src pythonImportsCheck;
+    };
+  in python2Packages.toPythonModule drv;
+in
+
+pkg:
+{
+  __functionArgs = builtins.functionArgs f // builtins.functionArgs pkg;
+  __functor = self: args: f (builtins.intersectAttrs (builtins.functionArgs f) args) (pkg (builtins.intersectAttrs (builtins.functionArgs pkg) args));
+}
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index 2e35e2cc..51b99378 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -1,18 +1,11 @@
-{ version, meta }:
-
-{ lib, stdenv, cmake, boost, bison, flex
-, libxml2, qt4, ninja, coriolis-bootstrap, doxygen
-, python2Packages }:
-
-let boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; }; in
-
-python2Packages.toPythonModule (stdenv.mkDerivation {
-  pname = "coriolis-vlsisapd";
-
-  src = ../vlsisapd;
-
-  buildInputs = [ python2Packages.python boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-})
+{ version, meta, generic, ... }:
+let pkg =
+  { libxml2, qt4, bison, flex, doxygen }:
+  {
+    name = "vlsisapd";
+    src = ../vlsisapd;
+    buildInputs = [ libxml2 qt4 ];
+    nativeBuildInputs = [ bison flex doxygen ];
+    pythonImportsCheck = [ "SPICE" "LIBERTY" "DTR" "Cfg" "CIF" "AGDS" ];
+  };
+in generic pkg

From c7df1e6ac9e64942bf682417b308cc0e914480f5 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 17:46:28 +0000
Subject: [PATCH 40/94] hurricane

---
 nix/hurricane.nix | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 63a4c97d..5aebcf6e 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -1,18 +1,12 @@
-{ version, meta }:
+{ version, meta, generic, ... }:
 
-{ lib, stdenv, python2, cmake, boost, bison, flex
-, libxml2, rapidjson, qt4, zlib, bzip2, ninja
-, coriolis-bootstrap, coriolis-vlsisapd, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-hurricane";
-
-  src = ../hurricane;
-
-  buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 bzip2 coriolis-vlsisapd rapidjson ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+let pkg =
+  { libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen, coriolis-vlsisapd }:
+  {
+    name = "hurricane";
+    src = ../hurricane;
+    buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ];
+    nativeBuildInputs = [ bison flex doxygen ];
+    pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg2" "Analog" ];
+  };
+in generic pkg

From 7661abe6e1ba8dbfdaa7c174109b431d2132d211 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 18:25:21 +0000
Subject: [PATCH 41/94] Try to get crlcore working

---
 flake.nix       |  2 +-
 nix/crlcore.nix | 33 ++++++++++++---------------------
 nix/generic.nix |  7 +++++--
 3 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/flake.nix b/flake.nix
index 21771781..2c64cb55 100644
--- a/flake.nix
+++ b/flake.nix
@@ -70,7 +70,7 @@
         let
           pkgs = nixpkgsFor.${system};
           env = pkgs.python2.buildEnv.override {
-            extraLibs = [ pkgs.coriolis-vlsisapd ];
+            extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) [ "vlsisapd" "hurricane" "crlcore" ];
           };
         in env.env
       );
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index d99ad31c..88697e8e 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,21 +1,12 @@
-{ version, meta }:
-
-{ lib, stdenv, python2, cmake, boost, bison, flex, libxml2, qt4, ninja
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-lefdef, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-crlcore";
-
-  src = ../crlcore;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap coriolis-lefdef
-    coriolis-hurricane coriolis-vlsisapd libxml2 bison flex qt4
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+{ version, meta, generic, ... }:
+let pkg =
+  { libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
+  , coriolis-lefdef, coriolis-hurricane }:
+  {
+    name = "crlcore";
+    src = ../crlcore;
+    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane ];
+    nativeBuildInputs = [ bison flex doxygen ];
+    pythonImportsCheck = [ "CRL" "Constant" ];
+  };
+in generic pkg
diff --git a/nix/generic.nix b/nix/generic.nix
index 469f609f..60821641 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -14,8 +14,11 @@ let f =
     drv = stdenv.mkDerivation {
       pname = "coriolis-${name}";
 
-      buildInputs = [ python2Packages.python boostWithPython coriolis-bootstrap ] ++ buildInputs;
-      nativeBuildInputs = [ cmake ninja python2Packages.pythonImportsCheckHook ] ++ nativeBuildInputs;
+      buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
+      nativeBuildInputs = [
+        coriolis-bootstrap cmake ninja
+        python2Packages.pythonImportsCheckHook
+      ] ++ nativeBuildInputs;
 
       preInstall = ''
           export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"

From 7bab1feec58ec37be95594b37470d793f5948c67 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 19:16:28 +0000
Subject: [PATCH 42/94] flute

---
 flake.nix        | 12 ++++++++----
 nix/crlcore.nix  |  2 +-
 nix/flute.nix    | 29 +++++++++++------------------
 nix/vlsisapd.nix |  2 +-
 4 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/flake.nix b/flake.nix
index 2c64cb55..8ee11f97 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,9 +37,13 @@
 
       # not generic: solstice lefdef equinox knik coloquinte bootstrap
 
-      components = [
-        "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore"
-        "cumulus" "flute" "etesian" "anabatic" "coloquinte"
+      pythonComponents = [
+        "vlsisapd" "hurricane" "crlcore" "flute"
+      ];
+
+      components = pythonComponents ++ [
+        "lefdef" "bootstrap"
+        "cumulus" "etesian" "anabatic" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
         "solstice" "stratus1" "tutorial" "unicorn" "documentation"
@@ -70,7 +74,7 @@
         let
           pkgs = nixpkgsFor.${system};
           env = pkgs.python2.buildEnv.override {
-            extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) [ "vlsisapd" "hurricane" "crlcore" ];
+            extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) pythonComponents;
           };
         in env.env
       );
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 88697e8e..7660f0da 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,4 +1,4 @@
-{ version, meta, generic, ... }:
+{ generic, ... }:
 let pkg =
   { libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
   , coriolis-lefdef, coriolis-hurricane }:
diff --git a/nix/flute.nix b/nix/flute.nix
index 780d0be3..1cace7f4 100644
--- a/nix/flute.nix
+++ b/nix/flute.nix
@@ -1,18 +1,11 @@
-{ version, meta }:
-
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-flute";
-
-  src = ../flute;
-
-  buildInputs = [ python2 boostWithPython coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
-  nativeBuildInputs = [ cmake ninja ];
-
-  inherit version meta;
-}
+{ generic, ... }:
+let pkg =
+  { coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
+  {
+    name = "flute";
+    src = ../flute;
+    buildInputs = [ coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
+    nativeBuildInputs = [ ];
+    pythonImportsCheck = [ "Flute" ];
+  };
+in generic pkg
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index 51b99378..78ec412e 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -1,4 +1,4 @@
-{ version, meta, generic, ... }:
+{ generic, ... }:
 let pkg =
   { libxml2, qt4, bison, flex, doxygen }:
   {

From 5bbc5b3b2e646fbbb751e420aa91ea7013140ef0 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 19:21:28 +0000
Subject: [PATCH 43/94] etesian, anabatic

---
 flake.nix        |  6 +++---
 nix/anabatic.nix | 40 +++++++++++++++++-----------------------
 nix/etesian.nix  | 36 ++++++++++++++----------------------
 3 files changed, 34 insertions(+), 48 deletions(-)

diff --git a/flake.nix b/flake.nix
index 8ee11f97..ad3aaed2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -38,12 +38,12 @@
       # not generic: solstice lefdef equinox knik coloquinte bootstrap
 
       pythonComponents = [
-        "vlsisapd" "hurricane" "crlcore" "flute"
+        "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
+        "anabatic"
       ];
 
       components = pythonComponents ++ [
-        "lefdef" "bootstrap"
-        "cumulus" "etesian" "anabatic" "coloquinte"
+        "lefdef" "bootstrap" "cumulus" "coloquinte"
         "katana" "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
         "solstice" "stratus1" "tutorial" "unicorn" "documentation"
diff --git a/nix/anabatic.nix b/nix/anabatic.nix
index 690fbbb1..02764024 100644
--- a/nix/anabatic.nix
+++ b/nix/anabatic.nix
@@ -1,23 +1,17 @@
-{ version, meta }:
-
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, coriolis-etesian, qt4
-, coriolis-flute, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-anabatic";
-
-  src = ../anabatic;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-etesian qt4 coriolis-flute
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+{ generic, ... }:
+let pkg =
+  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd
+  , coriolis-hurricane, coriolis-crlcore
+  , coriolis-flute, coriolis-etesian }:
+  {
+    name = "anabatic";
+    src = ../anabatic;
+    buildInputs = [
+      qt4 coriolis-coloquinte coriolis-vlsisapd
+      coriolis-hurricane coriolis-crlcore
+      coriolis-flute coriolis-etesian
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Anabatic" ];
+  };
+in generic pkg
diff --git a/nix/etesian.nix b/nix/etesian.nix
index d255ce99..010c99da 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -1,22 +1,14 @@
-{ version, meta }:
-
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, coriolis-coloquinte, qt4, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-etesian";
-
-  src = ../etesian;
-
-  buildInputs = [
-    qt4 python2 boostWithPython coriolis-bootstrap coriolis-vlsisapd
-    coriolis-hurricane coriolis-coloquinte coriolis-crlcore
-  ];
-  propagatedBuildInputs = [ coriolis-coloquinte ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+{ generic, ... }:
+let pkg =
+  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
+  {
+    name = "etesian";
+    src = ../etesian;
+    buildInputs = [
+      qt4 coriolis-coloquinte coriolis-vlsisapd
+      coriolis-hurricane coriolis-crlcore
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Etesian" ];
+  };
+in generic pkg

From eeba236c36c9f019c7ed39c8e1e7ede3c0c1f88d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 19:24:14 +0000
Subject: [PATCH 44/94] katana

---
 flake.nix      |  4 ++--
 nix/katana.nix | 44 +++++++++++++++++++-------------------------
 2 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/flake.nix b/flake.nix
index ad3aaed2..bc106790 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,12 +39,12 @@
 
       pythonComponents = [
         "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
-        "anabatic"
+        "anabatic" "katana"
       ];
 
       components = pythonComponents ++ [
         "lefdef" "bootstrap" "cumulus" "coloquinte"
-        "katana" "bora" "equinox" "knik" "katabatic" "ispd"
+        "bora" "equinox" "knik" "katabatic" "ispd"
         "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
         "solstice" "stratus1" "tutorial" "unicorn" "documentation"
         "unittests"
diff --git a/nix/katana.nix b/nix/katana.nix
index 61a0d2ab..1a4f2932 100644
--- a/nix/katana.nix
+++ b/nix/katana.nix
@@ -1,25 +1,19 @@
-{ version, meta }:
-
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, coriolis-etesian, qt4
-, coriolis-flute, coriolis-anabatic
-, coriolis-lefdef, libxml2, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-katana";
-
-  src = ../katana;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-etesian qt4 coriolis-flute coriolis-anabatic
-    coriolis-lefdef libxml2
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+{ generic, ... }:
+let pkg =
+  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd
+  , coriolis-hurricane, coriolis-crlcore, libxml2
+  , coriolis-flute, coriolis-etesian, coriolis-lefdef
+  , coriolis-anabatic }:
+  {
+    name = "katana";
+    src = ../katana;
+    buildInputs = [
+      qt4 coriolis-coloquinte coriolis-vlsisapd
+      coriolis-hurricane coriolis-crlcore
+      coriolis-flute coriolis-etesian libxml2
+      coriolis-lefdef coriolis-anabatic
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Katana" ];
+  };
+in generic pkg

From b5b4f0a633a23e9bb1d0e31cb08d408cc8dbecee Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 29 Aug 2021 19:58:10 +0000
Subject: [PATCH 45/94] unicorn, tutorial, kite, katabatic, bora

---
 flake.nix         | 10 +++++-----
 nix/bora.nix      | 42 +++++++++++++++++-----------------------
 nix/etesian.nix   |  3 +++
 nix/generic.nix   |  2 ++
 nix/katabatic.nix | 37 ++++++++++++++++-------------------
 nix/kite.nix      | 40 ++++++++++++++++----------------------
 nix/tutorial.nix  | 37 ++++++++++++++++-------------------
 nix/unicorn.nix   | 49 +++++++++++++++++++++--------------------------
 8 files changed, 99 insertions(+), 121 deletions(-)

diff --git a/flake.nix b/flake.nix
index bc106790..2235e16b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,15 +39,15 @@
 
       pythonComponents = [
         "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
-        "anabatic" "katana"
+        "anabatic" "katana" "bora" "katabatic" "kite"
+        "tutorial" "unicorn"
       ];
 
       components = pythonComponents ++ [
         "lefdef" "bootstrap" "cumulus" "coloquinte"
-        "bora" "equinox" "knik" "katabatic" "ispd"
-        "karakaze" "kite" "nimbus" "metis" "mauka" "oroshi"
-        "solstice" "stratus1" "tutorial" "unicorn" "documentation"
-        "unittests"
+        "equinox" "knik" "ispd" "karakaze" "nimbus"
+        "metis" "mauka" "oroshi" "solstice" "stratus1"
+        "documentation" "unittests"
       ];
 
       commonArgs = { inherit version meta generic; };
diff --git a/nix/bora.nix b/nix/bora.nix
index 216f5cfb..dc2be996 100644
--- a/nix/bora.nix
+++ b/nix/bora.nix
@@ -1,25 +1,19 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, qt4, coriolis-katana
-, coriolis-flute, coriolis-anabatic
-, coriolis-lefdef, qwt6_qt4, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-bora";
-
-  src = ../bora;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-katana qt4 coriolis-flute coriolis-anabatic
-    coriolis-lefdef qwt6_qt4
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+let pkg =
+  { coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-crlcore, qt4, coriolis-katana
+  , coriolis-flute, coriolis-anabatic
+  , coriolis-lefdef, qwt6_qt4, doxygen }:
+  {
+    name = "bora";
+    src = ../bora;
+    buildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-katana qt4 coriolis-flute coriolis-anabatic
+      coriolis-lefdef qwt6_qt4
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = "Bora";
+  };
+in generic pkg
diff --git a/nix/etesian.nix b/nix/etesian.nix
index 010c99da..e0b15b8e 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -8,6 +8,9 @@ let pkg =
       qt4 coriolis-coloquinte coriolis-vlsisapd
       coriolis-hurricane coriolis-crlcore
     ];
+    propagatedBuildInputs = [
+      coriolis-coloquinte
+    ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Etesian" ];
   };
diff --git a/nix/generic.nix b/nix/generic.nix
index 60821641..62fcaee9 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -7,6 +7,7 @@ let f =
   , src
   , buildInputs ? []
   , nativeBuildInputs ? []
+  , propagatedBuildInputs ? []
   , pythonImportsCheck
   }:
   let
@@ -19,6 +20,7 @@ let f =
         coriolis-bootstrap cmake ninja
         python2Packages.pythonImportsCheckHook
       ] ++ nativeBuildInputs;
+      inherit propagatedBuildInputs;
 
       preInstall = ''
           export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
index 78aa1934..4a1d4e4f 100644
--- a/nix/katabatic.nix
+++ b/nix/katabatic.nix
@@ -1,23 +1,18 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, coriolis-flute, coriolis-knik
-, qt4, doxygen }:
+let pkg =
+  { coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-crlcore, coriolis-flute, coriolis-knik
+  , qt4, doxygen }:
+  {
+    name = "katabatic";
+    src = ../katabatic;
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-katabatic";
-
-  src = ../katabatic;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-flute coriolis-knik qt4
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+    buildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-flute coriolis-knik qt4
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Katabatic" ];
+  };
+in generic pkg
diff --git a/nix/kite.nix b/nix/kite.nix
index 2f31edea..62b0a141 100644
--- a/nix/kite.nix
+++ b/nix/kite.nix
@@ -1,24 +1,18 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-lefdef, coriolis-knik, coriolis-katabatic
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
-
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-kite";
-
-  src = ../kite;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
-    coriolis-lefdef
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+let pkg =
+  { coriolis-lefdef, coriolis-knik, coriolis-katabatic
+  , coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
+  {
+    name = "kite";
+    src = ../kite;
+    buildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
+      coriolis-lefdef
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Kite" ];
+  };
+in generic pkg
diff --git a/nix/tutorial.nix b/nix/tutorial.nix
index bc925e2a..416e3839 100644
--- a/nix/tutorial.nix
+++ b/nix/tutorial.nix
@@ -1,23 +1,18 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, qt4, coriolis-lefdef, libxml2
-, doxygen }:
+let pkg =
+  { coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-crlcore, qt4, coriolis-lefdef, libxml2
+  , doxygen }:
+  {
+    name = "tutorial";
+    src = ../tutorial;
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-tutorial";
-
-  src = ../tutorial;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-lefdef libxml2 qt4
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+    buildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-lefdef libxml2 qt4
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Tutorial" ];
+  };
+in generic pkg
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 95bdfe8d..4f5deb2e 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -1,29 +1,24 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore, qt4, coriolis-katana
-, coriolis-flute, coriolis-anabatic, coriolis-coloquinte
-, coriolis-lefdef, coriolis-knik, coriolis-kite
-, coriolis-katabatic, coriolis-etesian, coriolis-equinox
-, coriolis-solstice, libxml2, doxygen }:
+let pkg =
+  { coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-crlcore, qt4, coriolis-katana
+  , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
+  , coriolis-lefdef, coriolis-knik, coriolis-kite
+  , coriolis-katabatic, coriolis-etesian, coriolis-equinox
+  , coriolis-solstice, libxml2, doxygen }:
+  {
+    name = "unicorn";
+    src = ../unicorn;
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
-
-stdenv.mkDerivation {
-  pname = "coriolis-unicorn";
-
-  src = ../unicorn;
-
-  buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
-    coriolis-katana qt4 coriolis-flute coriolis-anabatic
-    coriolis-lefdef libxml2 coriolis-knik coriolis-kite
-    coriolis-katabatic coriolis-etesian coriolis-equinox
-    coriolis-solstice
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+    buildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-katana qt4 coriolis-flute coriolis-anabatic
+      coriolis-lefdef libxml2 coriolis-knik coriolis-kite
+      coriolis-katabatic coriolis-etesian coriolis-equinox
+      coriolis-solstice
+    ];
+    nativeBuildInputs = [ doxygen ];
+    pythonImportsCheck = [ "Unicorn" ];
+  };
+in generic pkg

From e2475c8332e8b985a803d13076902f9f9fcd9ebd Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 31 Aug 2021 14:10:13 +0000
Subject: [PATCH 46/94] Add devShells

---
 flake.nix | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/flake.nix b/flake.nix
index 2235e16b..aeea10f9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -70,6 +70,14 @@
 
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
 
+      devShells = forAllSystems (system:
+        let
+          pkgs = nixpkgsFor.${system};
+          envFor = comp: (pkgs.python2.buildEnv.override {
+            extraLibs = [ pkgs.${"coriolis-${comp}"} ];
+          }).env;
+        in builtins.catAttrs (builtins.map (comp: { ${comp} = envFor comp; }) pythonComponents)
+      );
       devShell = forAllSystems (system:
         let
           pkgs = nixpkgsFor.${system};

From 6beed7504c0fc33d7c7b8dbd5cbd4cb3fd822258 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 31 Aug 2021 15:32:38 +0000
Subject: [PATCH 47/94] crlcore

---
 flake.nix       |  2 +-
 nix/crlcore.nix | 16 ++++++++++++----
 nix/generic.nix |  3 ++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/flake.nix b/flake.nix
index aeea10f9..d0ff0c02 100644
--- a/flake.nix
+++ b/flake.nix
@@ -75,7 +75,7 @@
           pkgs = nixpkgsFor.${system};
           envFor = comp: (pkgs.python2.buildEnv.override {
             extraLibs = [ pkgs.${"coriolis-${comp}"} ];
-          }).env;
+          });
         in builtins.catAttrs (builtins.map (comp: { ${comp} = envFor comp; }) pythonComponents)
       );
       devShell = forAllSystems (system:
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 7660f0da..f8a85cc1 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,12 +1,20 @@
 { generic, ... }:
 let pkg =
   { libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
-  , coriolis-lefdef, coriolis-hurricane }:
+  , coriolis-lefdef, coriolis-hurricane, python2Packages }:
   {
     name = "crlcore";
     src = ../crlcore;
-    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane ];
-    nativeBuildInputs = [ bison flex doxygen ];
-    pythonImportsCheck = [ "CRL" "Constant" ];
+    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 python2Packages.sip_4 ];
+    nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
+    pythonImportsCheck = [
+      "CRL" "Constant" "helpers.io" "helpers.technology"
+      "helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay"
+    ];
+    continuation = drv: drv.overrideAttrs (o: {
+      postInstall = (o.postInstall or "") + ''
+        ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
+      '';
+    });
   };
 in generic pkg
diff --git a/nix/generic.nix b/nix/generic.nix
index 62fcaee9..24ebe73c 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -9,6 +9,7 @@ let f =
   , nativeBuildInputs ? []
   , propagatedBuildInputs ? []
   , pythonImportsCheck
+  , continuation ? (x: x)
   }:
   let
     boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
@@ -28,7 +29,7 @@ let f =
 
       inherit version meta src pythonImportsCheck;
     };
-  in python2Packages.toPythonModule drv;
+  in continuation (python2Packages.toPythonModule drv);
 in
 
 pkg:

From 36203e5d518e504fa2db69b029dc9795d2752952 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 31 Aug 2021 15:47:12 +0000
Subject: [PATCH 48/94] Fix licenses

---
 flake.nix         | 1 -
 nix/hurricane.nix | 3 ++-
 nix/lefdef.nix    | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/flake.nix b/flake.nix
index d0ff0c02..4240dbe9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,7 +22,6 @@
       meta = with nixpkgs.lib; {
         description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
         homepage    = "http://coriolis.lip6.fr/";
-        license     = licenses.gpl3;
         platforms   = platforms.all;
       };
 
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 5aebcf6e..7af6fb9e 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -1,12 +1,13 @@
 { version, meta, generic, ... }:
 
 let pkg =
-  { libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen, coriolis-vlsisapd }:
+  { lib, libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen, coriolis-vlsisapd }:
   {
     name = "hurricane";
     src = ../hurricane;
     buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ];
     nativeBuildInputs = [ bison flex doxygen ];
     pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg2" "Analog" ];
+    continuation = drv: drv.overrideAttrs (o: { meta = o.meta // { license = lib.licenses.lgpl3Plus; });
   };
 in generic pkg
diff --git a/nix/lefdef.nix b/nix/lefdef.nix
index 1d703a66..811d3d8c 100644
--- a/nix/lefdef.nix
+++ b/nix/lefdef.nix
@@ -15,5 +15,7 @@ stdenv.mkDerivation {
   buildInputs = [ python2 boostWithPython coriolis-bootstrap bison flex zlib ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.apsl20; };
 }

From c5fdafbf53608b9f17d97458b1019fdcde0e021a Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 31 Aug 2021 15:50:50 +0000
Subject: [PATCH 49/94] Add license for Nix code

---
 flake.nix   |  2 ++
 nix/LICENSE | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 nix/LICENSE

diff --git a/flake.nix b/flake.nix
index 4240dbe9..63167eef 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,3 +1,5 @@
+# The license for this file is included in the `nix` directory next to this file.
+
 {
   description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
 
diff --git a/nix/LICENSE b/nix/LICENSE
new file mode 100644
index 00000000..a41bf7de
--- /dev/null
+++ b/nix/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2021 Las Safin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

From 2f11506dbfe6de8ccf19fc587021f508732ca357 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 31 Aug 2021 19:06:30 +0000
Subject: [PATCH 50/94] Try to get Qt support to work

---
 flake.nix         |  2 --
 nix/crlcore.nix   | 13 +++++-----
 nix/generic.nix   | 60 ++++++++++++++++++++++++++---------------------
 nix/hurricane.nix |  2 +-
 4 files changed, 40 insertions(+), 37 deletions(-)

diff --git a/flake.nix b/flake.nix
index 63167eef..f168baa2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,8 +36,6 @@
 
       generic = import ./nix/generic.nix { inherit version meta; };
 
-      # not generic: solstice lefdef equinox knik coloquinte bootstrap
-
       pythonComponents = [
         "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
         "anabatic" "katana" "bora" "katabatic" "kite"
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index f8a85cc1..57a2cccb 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,20 +1,19 @@
 { generic, ... }:
 let pkg =
-  { libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
+  { lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
   , coriolis-lefdef, coriolis-hurricane, python2Packages }:
   {
     name = "crlcore";
     src = ../crlcore;
-    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 python2Packages.sip_4 ];
+    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
     nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
     pythonImportsCheck = [
       "CRL" "Constant" "helpers.io" "helpers.technology"
       "helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay"
     ];
-    continuation = drv: drv.overrideAttrs (o: {
-      postInstall = (o.postInstall or "") + ''
-        ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
-      '';
-    });
+    postInstall = ''
+      ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
+    '';
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/generic.nix b/nix/generic.nix
index 24ebe73c..f16a0517 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -1,35 +1,41 @@
 { version, meta }:
 
-let f =
-  { lib, stdenv, cmake, ninja, boost
-  , coriolis-bootstrap, python2Packages }:
-  { name
-  , src
-  , buildInputs ? []
-  , nativeBuildInputs ? []
-  , propagatedBuildInputs ? []
-  , pythonImportsCheck
-  , continuation ? (x: x)
-  }:
-  let
-    boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
-    drv = stdenv.mkDerivation {
-      pname = "coriolis-${name}";
+let
+  meta' = meta;
+  f =
+    { lib, stdenv, cmake, ninja, boost
+    , coriolis-bootstrap, python2Packages }:
+    let self =
+      { name
+      , buildInputs ? []
+      , nativeBuildInputs ? []
+      , meta ? {}
+      , pythonImportsCheck
+      , continuation ? (x: x)
+      , ...
+      }@args':
+      let
+        args = builtins.removeAttrs args' (builtins.attrNames (builtins.functionArgs self));
+        boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
+        drv = stdenv.mkDerivation ({
+          pname = "coriolis-${name}";
 
-      buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
-      nativeBuildInputs = [
-        coriolis-bootstrap cmake ninja
-        python2Packages.pythonImportsCheckHook
-      ] ++ nativeBuildInputs;
-      inherit propagatedBuildInputs;
+          buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
+          nativeBuildInputs = [
+            coriolis-bootstrap cmake ninja
+            python2Packages.pythonImportsCheckHook
+          ] ++ nativeBuildInputs;
 
-      preInstall = ''
-          export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
-      '';
+          preInstall = ''
+              export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
+          '';
 
-      inherit version meta src pythonImportsCheck;
-    };
-  in continuation (python2Packages.toPythonModule drv);
+          meta = meta // meta';
+
+          inherit version pythonImportsCheck;
+        } // args);
+      in continuation (python2Packages.toPythonModule drv);
+    in self;
 in
 
 pkg:
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 7af6fb9e..9ce5ab67 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -8,6 +8,6 @@ let pkg =
     buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ];
     nativeBuildInputs = [ bison flex doxygen ];
     pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg2" "Analog" ];
-    continuation = drv: drv.overrideAttrs (o: { meta = o.meta // { license = lib.licenses.lgpl3Plus; });
+    meta.license = lib.licenses.lgpl3Plus;
   };
 in generic pkg

From 3584ea3ee959af4658089ce3f4c061b18f171b21 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 09:31:22 +0000
Subject: [PATCH 51/94] Use pyqt4 4.12.1

---
 flake.nix | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/flake.nix b/flake.nix
index f168baa2..6735c90d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,21 +18,38 @@
       # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
       forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
 
-      # Nixpkgs instantiated for supported system types.
-      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
-
       meta = with nixpkgs.lib; {
         description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
         homepage    = "http://coriolis.lip6.fr/";
         platforms   = platforms.all;
       };
 
-      override = drv: drv.overrideAttrs (o: {
-        preConfigure = ''
-          cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
-        '' + (o.preConfigure or "");
-        cmakeFlags = [ "-DBUILD_DOC=ON" ] ++ (o.cmakeFlags or []);
-      });
+      pythonOverlay = self: super: {
+        python2Packages = super.python2Packages.override {
+          overrides = pself: psuper: {
+            pyqt4 = psuper.pyqt4.overridePythonAttrs (o: rec {
+              version = "4.12.1";
+              src = super.fetchurl {
+                url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz";
+                sha256 = "RdckRhrliwGbm+lQdsoH4hLrcwhK7JEluyVIJcOgU4M=";
+              };
+              pythonImportsCheck = [ "PyQt4.QtCore" "PyQt4.QtGui" ];
+            });
+          };
+        };
+      };
+
+      # Nixpkgs instantiated for supported system types.
+      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ pythonOverlay self.overlay ]; });
+
+
+      override = drv:
+        drv.overrideAttrs (o: {
+          preConfigure = ''
+            cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
+          '' + (o.preConfigure or "");
+          cmakeFlags = [ "-DBUILD_DOC=ON" ] ++ (o.cmakeFlags or []);
+        });
 
       generic = import ./nix/generic.nix { inherit version meta; };
 

From d4818a6b81ea07c7f5bc1f9ae2030e9719c1c919 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 09:40:23 +0000
Subject: [PATCH 52/94] Fix missing import in crlcore

---
 crlcore/python/helpers/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crlcore/python/helpers/__init__.py b/crlcore/python/helpers/__init__.py
index 682e1132..1f6b0f62 100644
--- a/crlcore/python/helpers/__init__.py
+++ b/crlcore/python/helpers/__init__.py
@@ -43,6 +43,7 @@ import Hurricane
 import Viewer
 import CRL
 import helpers.io
+from helpers.io import ErrorMessage
 
 
 def stype ( o ): return str(type(o)).split("'")[1]

From 227a8f1721de3900f39d25af998a2b989a6bb7c2 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 10:03:41 +0000
Subject: [PATCH 53/94] Set CORIOLIS_TOP for crlcore check

---
 nix/crlcore.nix | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 57a2cccb..4adad541 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -7,13 +7,17 @@ let pkg =
     src = ../crlcore;
     buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
     nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
+    postInstall = ''
+      ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
+
+      # for import check
+      mkdir -p /build/coriolistop/etc/coriolis2
+      export CORIOLIS_TOP=/build/coriolistop
+    '';
     pythonImportsCheck = [
       "CRL" "Constant" "helpers.io" "helpers.technology"
       "helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay"
     ];
-    postInstall = ''
-      ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
-    '';
     meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg

From f20ffa02e93df2f1279984849d4588abe0301926 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 11:10:59 +0000
Subject: [PATCH 54/94] Get oroshi working

---
 flake.nix                 |  4 +--
 nix/oroshi.nix            | 56 +++++++++++++++++++++++++++------------
 oroshi/python/__init__.py |  1 +
 3 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/flake.nix b/flake.nix
index 6735c90d..04b665d1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -56,13 +56,13 @@
       pythonComponents = [
         "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
         "anabatic" "katana" "bora" "katabatic" "kite"
-        "tutorial" "unicorn"
+        "tutorial" "unicorn" "oroshi"
       ];
 
       components = pythonComponents ++ [
         "lefdef" "bootstrap" "cumulus" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
-        "metis" "mauka" "oroshi" "solstice" "stratus1"
+        "metis" "mauka" "solstice" "stratus1"
         "documentation" "unittests"
       ];
 
diff --git a/nix/oroshi.nix b/nix/oroshi.nix
index 9aba7b57..b3e3c39b 100644
--- a/nix/oroshi.nix
+++ b/nix/oroshi.nix
@@ -1,21 +1,43 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, doxygen, boost }:
+let pkg =
+  { qt4, coriolis-crlcore, doxygen, lib, python2Packages
+  , coriolis-vlsisapd, coriolis-hurricane }:
+  {
+    name = "oroshi";
+    src = ../oroshi;
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+    buildInputs = [
+      coriolis-vlsisapd qt4 python2Packages.pyqt4
+      coriolis-crlcore coriolis-hurricane qt4
+      python2Packages.numpy
+    ];
+    nativeBuildInputs = [ doxygen ];
 
-stdenv.mkDerivation {
-  pname = "coriolis-oroshi";
+    postInstall = ''
+      # for import check
+      mkdir -p /build/coriolistop/etc/coriolis2
+      export CORIOLIS_TOP=/build/coriolistop
+    '';
+    pythonImportsCheck = [
+      "oroshi.wip_transistor"
+      "oroshi.wip_dp"
+      "oroshi.wip_csp"
+      "oroshi.stack"
+      "oroshi.resistorsnake"
+      "oroshi.resistor"
+      "oroshi.paramsmatrix"
+      "oroshi.nonunitcapacitor"
+      "oroshi.multicapacitor"
+      "oroshi.dtr"
+      "oroshi.capacitorvrtracks"
+      "oroshi.capacitorunit"
+      "oroshi.capacitorroutedsingle"
+      "oroshi.capacitorrouted"
+      "oroshi.capacitormatrix"
+      "oroshi"
+    ];
 
-  src = ../oroshi;
-
-  buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd
-    coriolis-crlcore coriolis-hurricane qt4 boostWithPython
-  ];
-  nativeBuildInputs = [ cmake ninja doxygen ];
-
-  inherit version meta;
-}
+    meta.license = lib.licenses.gpl2Plus;
+  };
+in generic pkg
diff --git a/oroshi/python/__init__.py b/oroshi/python/__init__.py
index 02d16c11..af7a1b63 100644
--- a/oroshi/python/__init__.py
+++ b/oroshi/python/__init__.py
@@ -3,6 +3,7 @@ from   Hurricane import DbU
 from   Hurricane import DataBase
 import oroshi.dtr
 
+if not DataBase.getDB(): DataBase.create()
 
 rules = None
 

From 953a98b769a12acb386da0db5ccd2f2754e7e8da Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 17:18:05 +0000
Subject: [PATCH 55/94] Make cgt work a bit more

---
 nix/crlcore.nix |  4 ++--
 nix/generic.nix |  5 +++--
 nix/oroshi.nix  |  2 +-
 nix/unicorn.nix | 10 +++++++---
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 4adad541..b422c181 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -2,10 +2,10 @@
 let pkg =
   { lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
   , coriolis-lefdef, coriolis-hurricane, python2Packages }:
-  {
+  rec {
     name = "crlcore";
     src = ../crlcore;
-    buildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
+    propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
     nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
     postInstall = ''
       ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
diff --git a/nix/generic.nix b/nix/generic.nix
index f16a0517..9f64a2fa 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -12,6 +12,7 @@ let
       , meta ? {}
       , pythonImportsCheck
       , continuation ? (x: x)
+      , postInstall ? ""
       , ...
       }@args':
       let
@@ -26,11 +27,11 @@ let
             python2Packages.pythonImportsCheckHook
           ] ++ nativeBuildInputs;
 
-          preInstall = ''
+          postInstall = postInstall + ''
               export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
           '';
 
-          meta = meta // meta';
+          meta = meta' // meta;
 
           inherit version pythonImportsCheck;
         } // args);
diff --git a/nix/oroshi.nix b/nix/oroshi.nix
index b3e3c39b..685ca9f8 100644
--- a/nix/oroshi.nix
+++ b/nix/oroshi.nix
@@ -7,7 +7,7 @@ let pkg =
     name = "oroshi";
     src = ../oroshi;
 
-    buildInputs = [
+    propagatedBuildInputs = [
       coriolis-vlsisapd qt4 python2Packages.pyqt4
       coriolis-crlcore coriolis-hurricane qt4
       python2Packages.numpy
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 4f5deb2e..6fa46ae0 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -6,19 +6,23 @@ let pkg =
   , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
   , coriolis-lefdef, coriolis-knik, coriolis-kite
   , coriolis-katabatic, coriolis-etesian, coriolis-equinox
-  , coriolis-solstice, libxml2, doxygen }:
+  , coriolis-solstice, libxml2, doxygen, python2Packages }:
   {
     name = "unicorn";
     src = ../unicorn;
 
-    buildInputs = [
+    propagatedBuildInputs = [
       coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
       coriolis-katana qt4 coriolis-flute coriolis-anabatic
       coriolis-lefdef libxml2 coriolis-knik coriolis-kite
       coriolis-katabatic coriolis-etesian coriolis-equinox
       coriolis-solstice
     ];
-    nativeBuildInputs = [ doxygen ];
+    nativeBuildInputs = [ doxygen python2Packages.wrapPython ];
     pythonImportsCheck = [ "Unicorn" ];
+
+    postFixup = ''
+      wrapPythonPrograms
+    '';
   };
 in generic pkg

From 521863e195f083258c81a76dcc2f28d82504cf19 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 17:39:00 +0000
Subject: [PATCH 56/94] Use OpenMP

---
 nix/coloquinte.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
index b3748290..6ef37f7b 100644
--- a/nix/coloquinte.nix
+++ b/nix/coloquinte.nix
@@ -12,5 +12,7 @@ stdenv.mkDerivation {
   buildInputs = [ boostWithPython coriolis-bootstrap qt4 ];
   nativeBuildInputs = [ cmake ninja doxygen ];
 
+  cmakeFlags = [ "-DWITH_OPENMP:STRING=TRUE" ];
+
   inherit version meta;
 }

From 55f32e510edf54f505cea84211b40c64c6792a7d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 18:46:28 +0000
Subject: [PATCH 57/94] Run unit tests

---
 nix/unittests.nix | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/nix/unittests.nix b/nix/unittests.nix
index 42877e32..3d2a4c35 100644
--- a/nix/unittests.nix
+++ b/nix/unittests.nix
@@ -18,5 +18,15 @@ stdenv.mkDerivation {
   ];
   nativeBuildInputs = [ cmake ninja ];
 
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+    $out/bin/unittests
+    $out/bin/unittests --rb-tree
+    $out/bin/unittests --intv-tree
+    runHook postInstallCheck
+  '';
+
   inherit version meta;
 }

From d28ec8b7c45c476c7b5c251f2efbdb72c1c73346 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 1 Sep 2021 22:30:59 +0000
Subject: [PATCH 58/94] Add initial code for running alliance checks

---
 flake.lock                     | 17 +++++++++++++++++
 flake.nix                      |  8 +++++---
 nix/alliance-check-toolkit.nix | 20 ++++++++++++++++++++
 3 files changed, 42 insertions(+), 3 deletions(-)
 create mode 100644 nix/alliance-check-toolkit.nix

diff --git a/flake.lock b/flake.lock
index c92ec499..770e2a5f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,21 @@
 {
   "nodes": {
+    "alliance-check-toolkit": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1624038537,
+        "narHash": "sha256-Z8erR1YbKR7ndHU75Yb6DOSzj07ZJB2GGx+zSJvNJ7Y=",
+        "ref": "master",
+        "rev": "f28f970148e8f942fb2cf971d41333d42c1d886b",
+        "revCount": 269,
+        "type": "git",
+        "url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1628776130,
@@ -18,6 +34,7 @@
     },
     "root": {
       "inputs": {
+        "alliance-check-toolkit": "alliance-check-toolkit",
         "nixpkgs": "nixpkgs"
       }
     }
diff --git a/flake.nix b/flake.nix
index 04b665d1..2a8074c9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,8 +5,10 @@
 
   # Nixpkgs / NixOS version to use.
   inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.05";
+  inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
+  inputs.alliance-check-toolkit.flake = false;
 
-  outputs = { self, nixpkgs }:
+  outputs = { self, nixpkgs, alliance-check-toolkit }:
     let
 
       # Generate a user-friendly version numer.
@@ -63,10 +65,10 @@
         "lefdef" "bootstrap" "cumulus" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
-        "documentation" "unittests"
+        "documentation" "unittests" "alliance-check-toolkit"
       ];
 
-      commonArgs = { inherit version meta generic; };
+      commonArgs = { inherit version meta generic; alliance-src = alliance-check-toolkit; };
 
     in
 
diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
new file mode 100644
index 00000000..6dbdf52d
--- /dev/null
+++ b/nix/alliance-check-toolkit.nix
@@ -0,0 +1,20 @@
+{ alliance-src, ... }:
+
+{ stdenv, coriolis-unicorn }:
+stdenv.mkDerivation {
+  pname = "alliance-check-toolkit";
+  version = builtins.substring 0 8 alliance-src.lastModifiedDate;
+  src = alliance-src;
+
+  nativeBuildInputs = [ coriolis-unicorn ];
+
+  configurePhase = "true";
+  buildPhase = ''
+    cd benchs/adder/cmos
+    echo 'doing make druc'
+    make druc
+    echo 'doing make lvx'
+    make lvx
+  '';
+  installPhase = "true";
+}

From 979f97df2f5017cffbf5be0bffdac6db0309b881 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 2 Sep 2021 09:54:51 +0000
Subject: [PATCH 59/94] Include yosys

---
 nix/alliance-check-toolkit.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 6dbdf52d..f84c4241 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,12 +1,14 @@
 { alliance-src, ... }:
 
-{ stdenv, coriolis-unicorn }:
+{ stdenv, coriolis-unicorn, yosys }:
 stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
   version = builtins.substring 0 8 alliance-src.lastModifiedDate;
   src = alliance-src;
 
-  nativeBuildInputs = [ coriolis-unicorn ];
+  nativeBuildInputs = [ coriolis-unicorn yosys ];
+
+  YOSYS_TOP = "${yosys}";
 
   configurePhase = "true";
   buildPhase = ''

From 78db6725493fda4a15addea52b8ad5ce643783d5 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 2 Sep 2021 21:59:32 +0000
Subject: [PATCH 60/94] Use Nixpkgs with Alliance

---
 flake.lock | 12 ++++++------
 flake.nix  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/flake.lock b/flake.lock
index 770e2a5f..0f455597 100644
--- a/flake.lock
+++ b/flake.lock
@@ -18,16 +18,16 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1628776130,
-        "narHash": "sha256-EyzdilgzoO8YCgck1lkOF1Bp+QVEazJBtuG5GkVY6xg=",
-        "owner": "NixOS",
+        "lastModified": 1630612789,
+        "narHash": "sha256-f1q5ExkMX2CBqBcRmrlnpewADt3EjhyncP/PfwUhK/Q=",
+        "owner": "L-as",
         "repo": "nixpkgs",
-        "rev": "ad6e733d633802620b5eec9be91e837973eac18a",
+        "rev": "11f9ff27bc66bf653ccbbfae1412e6f5705e4a5c",
         "type": "github"
       },
       "original": {
-        "owner": "NixOS",
-        "ref": "nixos-21.05",
+        "owner": "L-as",
+        "ref": "alliance",
         "repo": "nixpkgs",
         "type": "github"
       }
diff --git a/flake.nix b/flake.nix
index 2a8074c9..949fdda0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,7 +4,7 @@
   description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
 
   # Nixpkgs / NixOS version to use.
-  inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.05";
+  inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
   inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
   inputs.alliance-check-toolkit.flake = false;
 

From 4f266c04eb02bd80e6aa0c7ce29b947ac6f0a550 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 2 Sep 2021 22:39:29 +0000
Subject: [PATCH 61/94] Get alliance check toolkit to fail

---
 nix/alliance-check-toolkit.nix | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index f84c4241..11bb5d3d 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,14 +1,19 @@
 { alliance-src, ... }:
 
-{ stdenv, coriolis-unicorn, yosys }:
+{ stdenv, coriolis-unicorn, alliance, yosys }:
 stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
   version = builtins.substring 0 8 alliance-src.lastModifiedDate;
   src = alliance-src;
 
-  nativeBuildInputs = [ coriolis-unicorn yosys ];
+  nativeBuildInputs = [ alliance coriolis-unicorn yosys ];
 
   YOSYS_TOP = "${yosys}";
+  ALLIANCE_TOP = "${alliance}";
+  CORIOLIS_TOP = "${coriolis-unicorn}";
+  # The user configuration for verhaegs is empty,
+  # which is why we use it.
+  USER = "verhaegs";
 
   configurePhase = "true";
   buildPhase = ''

From 5c7b2fdc2858a53f491645c95e37b4513bafcf34 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 10:12:38 +0000
Subject: [PATCH 62/94] Fix devShell

---
 flake.nix | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/flake.nix b/flake.nix
index 949fdda0..ed88f419 100644
--- a/flake.nix
+++ b/flake.nix
@@ -88,21 +88,15 @@
 
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
 
-      devShells = forAllSystems (system:
-        let
-          pkgs = nixpkgsFor.${system};
-          envFor = comp: (pkgs.python2.buildEnv.override {
-            extraLibs = [ pkgs.${"coriolis-${comp}"} ];
-          });
-        in builtins.catAttrs (builtins.map (comp: { ${comp} = envFor comp; }) pythonComponents)
-      );
       devShell = forAllSystems (system:
         let
           pkgs = nixpkgsFor.${system};
           env = pkgs.python2.buildEnv.override {
             extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) pythonComponents;
           };
-        in env.env
+        in pkgs.mkShell {
+          buildInputs = [ env ];
+        }
       );
 
       #hydraJobs.coriolis = self.defaultPackage;

From 658db5ab5830e63f5d8f096d23bc3ab7bd6bc7a3 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 12:29:44 +0000
Subject: [PATCH 63/94] Get further in alliance tests

---
 nix/alliance-check-toolkit.nix | 9 +++++++--
 nix/crlcore.nix                | 1 +
 nix/unicorn.nix                | 6 +++---
 unicorn/CMakeLists.txt         | 2 ++
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 11bb5d3d..9bf47388 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,7 +1,12 @@
 { alliance-src, ... }:
 
-{ stdenv, coriolis-unicorn, alliance, yosys }:
-stdenv.mkDerivation {
+{ stdenv, coriolis-unicorn, coriolis-crlcore, python2Packages, alliance, yosys }:
+
+let
+  env = python2Packages.python.buildEnv.override {
+    extraLibs = [ coriolis-unicorn ];
+  };
+in stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
   version = builtins.substring 0 8 alliance-src.lastModifiedDate;
   src = alliance-src;
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index b422c181..563a7064 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -9,6 +9,7 @@ let pkg =
     nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
     postInstall = ''
       ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
+      ln -s -t $out/${python2Packages.python.sitePackages} $out/etc/coriolis2/*
 
       # for import check
       mkdir -p /build/coriolistop/etc/coriolis2
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 6fa46ae0..9bec4808 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -1,8 +1,8 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane
-  , coriolis-crlcore, qt4, coriolis-katana
+  { coriolis-vlsisapd, coriolis-hurricane, coriolis-tutorial
+  , coriolis-crlcore, qt4, coriolis-katana, coriolis-bora
   , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
   , coriolis-lefdef, coriolis-knik, coriolis-kite
   , coriolis-katabatic, coriolis-etesian, coriolis-equinox
@@ -16,7 +16,7 @@ let pkg =
       coriolis-katana qt4 coriolis-flute coriolis-anabatic
       coriolis-lefdef libxml2 coriolis-knik coriolis-kite
       coriolis-katabatic coriolis-etesian coriolis-equinox
-      coriolis-solstice
+      coriolis-solstice coriolis-bora coriolis-tutorial
     ];
     nativeBuildInputs = [ doxygen python2Packages.wrapPython ];
     pythonImportsCheck = [ "Unicorn" ];
diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt
index 1955fa46..4fc442d4 100644
--- a/unicorn/CMakeLists.txt
+++ b/unicorn/CMakeLists.txt
@@ -32,12 +32,14 @@
  find_package(CORIOLIS           REQUIRED)
  find_package(ANABATIC           REQUIRED)
  find_package(KATANA             REQUIRED)
+ #find_package(BORA               REQUIRED) # FIXME: make FindBORA.cmake
  find_package(ETESIAN            REQUIRED)
  find_package(KNIK               REQUIRED)
  find_package(KATABATIC          REQUIRED)
  find_package(KITE               REQUIRED)
  find_package(EQUINOX            REQUIRED)
  find_package(SOLSTICE           REQUIRED)
+ #find_package(TUTORIAL           REQUIRED) # FIXME: make FindTUTORIAL.cmake
  find_package(Doxygen)
 
  if(WITH_OPENMP)

From a3a738c0ffc8743112b4bef1bfcfd512a1aaff9d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 12:50:39 +0000
Subject: [PATCH 64/94] Fix cumulus

---
 cumulus/src/CMakeLists.txt     | 20 ++++++++++----------
 flake.nix                      |  4 ++--
 nix/alliance-check-toolkit.nix |  4 ++--
 nix/cumulus.nix                | 33 ++++++++++++++++++++++-----------
 4 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/cumulus/src/CMakeLists.txt b/cumulus/src/CMakeLists.txt
index ffef310b..7b97e5f2 100644
--- a/cumulus/src/CMakeLists.txt
+++ b/cumulus/src/CMakeLists.txt
@@ -80,14 +80,14 @@
                                        ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/macro/macro.py
                   )
          
-          install ( FILES    ${pySources}          DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus )
-          install ( FILES    ${pyPlugins}          DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins )
-          install ( FILES    ${pyPluginCTS}        DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/cts )
-          install ( FILES    ${pyPluginC2C}        DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/core2chip )
-          install ( FILES    ${pyPluginChip}       DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/chip )
-          install ( FILES    ${pyPluginAlpha}      DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha )
-          install ( FILES    ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/block )
-          install ( FILES    ${pyPluginAlphaC2C}   DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/core2chip )
-          install ( FILES    ${pyPluginAlphaChip}  DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/chip )
-          install ( FILES    ${pyPluginAlphaMacro} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/macro )
+          install ( FILES    ${pySources}          DESTINATION ${PYTHON_SITE_PACKAGES} )
+          install ( FILES    ${pyPlugins}          DESTINATION ${PYTHON_SITE_PACKAGES}/plugins )
+          install ( FILES    ${pyPluginCTS}        DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/cts )
+          install ( FILES    ${pyPluginC2C}        DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/core2chip )
+          install ( FILES    ${pyPluginChip}       DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/chip )
+          install ( FILES    ${pyPluginAlpha}      DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha )
+          install ( FILES    ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/block )
+          install ( FILES    ${pyPluginAlphaC2C}   DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/core2chip )
+          install ( FILES    ${pyPluginAlphaChip}  DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/chip )
+          install ( FILES    ${pyPluginAlphaMacro} DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/macro )
           install ( PROGRAMS ${pyTools}            DESTINATION bin ) 
diff --git a/flake.nix b/flake.nix
index ed88f419..a3485272 100644
--- a/flake.nix
+++ b/flake.nix
@@ -58,11 +58,11 @@
       pythonComponents = [
         "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
         "anabatic" "katana" "bora" "katabatic" "kite"
-        "tutorial" "unicorn" "oroshi"
+        "tutorial" "unicorn" "oroshi" "cumulus"
       ];
 
       components = pythonComponents ++ [
-        "lefdef" "bootstrap" "cumulus" "coloquinte"
+        "lefdef" "bootstrap" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
         "documentation" "unittests" "alliance-check-toolkit"
diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 9bf47388..4c9fb8c7 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,10 +1,10 @@
 { alliance-src, ... }:
 
-{ stdenv, coriolis-unicorn, coriolis-crlcore, python2Packages, alliance, yosys }:
+{ stdenv, coriolis-unicorn, coriolis-cumulus, python2Packages, alliance, yosys }:
 
 let
   env = python2Packages.python.buildEnv.override {
-    extraLibs = [ coriolis-unicorn ];
+    extraLibs = [ coriolis-unicorn coriolis-cumulus ];
   };
 in stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
index 3d93902e..c05d292b 100644
--- a/nix/cumulus.nix
+++ b/nix/cumulus.nix
@@ -1,16 +1,27 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
-, coriolis-crlcore }:
+let pkg =
+  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
+  , coriolis-etesian, coriolis-anabatic, coriolis-katana
+  , coriolis-unicorn }:
+  {
+    name = "cumulus";
 
-stdenv.mkDerivation {
-  pname = "coriolis-cumulus";
+    src = ../cumulus;
 
-  src = ../cumulus;
+    postInstall = ''
+      # for import check
+      mkdir -p /build/coriolistop/etc/coriolis2
+      export CORIOLIS_TOP=/build/coriolistop
+    '';
 
-  buildInputs = [ python2 coriolis-bootstrap coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
-  nativeBuildInputs = [ cmake ninja ];
+    propagatedBuildInputs = [
+      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-etesian coriolis-anabatic coriolis-katana
+      coriolis-unicorn
+    ];
+    pythonImportsCheck = [ "plugins" ];
 
-  inherit version meta;
-}
+    meta.license = lib.licenses.gpl2Plus;
+  };
+in generic pkg

From 84640f3bc1e496af1a34196860bdafaae2b283f6 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:10:08 +0000
Subject: [PATCH 65/94] Some checks pass!

---
 nix/alliance-check-toolkit.nix | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 4c9fb8c7..856315d9 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -2,16 +2,12 @@
 
 { stdenv, coriolis-unicorn, coriolis-cumulus, python2Packages, alliance, yosys }:
 
-let
-  env = python2Packages.python.buildEnv.override {
-    extraLibs = [ coriolis-unicorn coriolis-cumulus ];
-  };
-in stdenv.mkDerivation {
+stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
   version = builtins.substring 0 8 alliance-src.lastModifiedDate;
   src = alliance-src;
 
-  nativeBuildInputs = [ alliance coriolis-unicorn yosys ];
+  nativeBuildInputs = [ alliance coriolis-unicorn coriolis-cumulus yosys ];
 
   YOSYS_TOP = "${yosys}";
   ALLIANCE_TOP = "${alliance}";
@@ -20,6 +16,7 @@ in stdenv.mkDerivation {
   # which is why we use it.
   USER = "verhaegs";
 
+  patchPhase = "true";
   configurePhase = "true";
   buildPhase = ''
     cd benchs/adder/cmos
@@ -29,4 +26,5 @@ in stdenv.mkDerivation {
     make lvx
   '';
   installPhase = "true";
+  fixupPhase = "true";
 }

From 1fddafc81450ea1d448fa22d93646d0005e4a8a2 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:31:29 +0000
Subject: [PATCH 66/94] Add combined

---
 flake.nix        | 15 ++++++++++++---
 nix/combined.nix | 27 +++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 3 deletions(-)
 create mode 100644 nix/combined.nix

diff --git a/flake.nix b/flake.nix
index a3485272..65698764 100644
--- a/flake.nix
+++ b/flake.nix
@@ -66,6 +66,7 @@
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
         "documentation" "unittests" "alliance-check-toolkit"
+        "combined"
       ];
 
       commonArgs = { inherit version meta generic; alliance-src = alliance-check-toolkit; };
@@ -82,9 +83,17 @@
             ) {});
           }) {} components;
 
-      packages = forAllSystems (system: builtins.foldl' (acc: elem: acc // {
-        ${elem} = nixpkgsFor.${system}.${"coriolis-${elem}"};
-      }) {} components);
+      packages = forAllSystems (system:
+        let pkgs = nixpkgsFor.${system}; in
+        builtins.foldl' (acc: elem: acc // {
+          ${elem} = pkgs.${"coriolis-${elem}"};
+        }) {} components
+        // {
+          test = pkgs.python2.buildEnv.override {
+            extraLibs = [ pkgs.coriolis-unicorn pkgs.coriolis-cumulus ];
+          };
+        }
+      );
 
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
 
diff --git a/nix/combined.nix b/nix/combined.nix
new file mode 100644
index 00000000..9d3a038a
--- /dev/null
+++ b/nix/combined.nix
@@ -0,0 +1,27 @@
+{ version, meta, ... }:
+
+{ buildEnv
+, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
+, coriolis-anabatic, coriolis-katana, coriolis-bora
+, coriolis-katabatic, coriolis-kite, coriolis-tutorial
+, coriolis-unicorn, coriolis-oroshi, coriolis-cumulus
+, coriolis-lefdef, coriolis-coloquinte, coriolis-flute
+, coriolis-equinox, coriolis-knik, coriolis-karakaze
+, coriolis-solstice, coriolis-stratus1, coriolis-etesian
+}:
+
+buildEnv {
+  name = "coriolis-combined-${version}";
+
+  paths = [
+    coriolis-hurricane coriolis-crlcore coriolis-flute
+    coriolis-etesian coriolis-anabatic coriolis-katana
+    coriolis-bora coriolis-katabatic coriolis-kite
+    coriolis-tutorial coriolis-unicorn coriolis-oroshi
+    coriolis-cumulus coriolis-lefdef coriolis-vlsisapd
+    coriolis-coloquinte coriolis-equinox coriolis-knik
+    coriolis-karakaze coriolis-solstice coriolis-stratus1
+  ];
+
+  inherit meta;
+}

From fd55e99a7ce82c6c15ad0c6882cbf850edc08a81 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:33:48 +0000
Subject: [PATCH 67/94] fix karakaze

---
 karakaze/CMakeLists.txt |  4 +++-
 nix/karakaze.nix        | 35 ++++++++++++++++++++---------------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt
index 7b4eb782..2652ca00 100644
--- a/karakaze/CMakeLists.txt
+++ b/karakaze/CMakeLists.txt
@@ -14,11 +14,13 @@
  check_distribution()
 
  setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
- setup_qt()
  find_package(PythonLibs         2 REQUIRED)
  find_package(PythonSitePackages REQUIRED)
  find_package(HURRICANE          REQUIRED)
  find_package(CORIOLIS           REQUIRED)
+ find_package(KATANA             REQUIRED)
+ find_package(ANABATIC           REQUIRED)
+ #find_package(BORA               REQUIRED) # FIXME
 
 #add_subdirectory(src)
  add_subdirectory(python)
diff --git a/nix/karakaze.nix b/nix/karakaze.nix
index 19b0df6b..cdc24186 100644
--- a/nix/karakaze.nix
+++ b/nix/karakaze.nix
@@ -1,18 +1,23 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane }:
+let pkg =
+  { lib, coriolis-crlcore, coriolis-bora, coriolis-katana, coriolis-anabatic
+  , coriolis-vlsisapd, coriolis-hurricane }:
+  {
+    name = "coriolis-karakaze";
+    src = ../karakaze;
 
-stdenv.mkDerivation {
-  pname = "coriolis-karakaze";
+    propagatedBuildInputs = [
+      coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-katana
+      coriolis-bora coriolis-anabatic
+    ];
+    postInstall = ''
+      # for import check
+      mkdir -p /build/coriolistop/etc/coriolis2
+      export CORIOLIS_TOP=/build/coriolistop
+    '';
+    pythonImportsCheck = [ "karakaze" "karakaze.analogdesign" ];
 
-  src = ../karakaze;
-
-  buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd
-    coriolis-crlcore coriolis-hurricane qt4
-  ];
-  nativeBuildInputs = [ cmake ninja ];
-
-  inherit version meta;
-}
+    meta.license = lib.licenses.gpl2Plus;
+  };
+in generic pkg

From c6624909de29736a1693d4f76acba5c55ffd9c9b Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:46:33 +0000
Subject: [PATCH 68/94] Keep backward compatibility for cumulus users

---
 cumulus/src/CMakeLists.txt | 20 ++++++++++----------
 nix/cumulus.nix            |  4 +++-
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/cumulus/src/CMakeLists.txt b/cumulus/src/CMakeLists.txt
index 7b97e5f2..ffef310b 100644
--- a/cumulus/src/CMakeLists.txt
+++ b/cumulus/src/CMakeLists.txt
@@ -80,14 +80,14 @@
                                        ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/macro/macro.py
                   )
          
-          install ( FILES    ${pySources}          DESTINATION ${PYTHON_SITE_PACKAGES} )
-          install ( FILES    ${pyPlugins}          DESTINATION ${PYTHON_SITE_PACKAGES}/plugins )
-          install ( FILES    ${pyPluginCTS}        DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/cts )
-          install ( FILES    ${pyPluginC2C}        DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/core2chip )
-          install ( FILES    ${pyPluginChip}       DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/chip )
-          install ( FILES    ${pyPluginAlpha}      DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha )
-          install ( FILES    ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/block )
-          install ( FILES    ${pyPluginAlphaC2C}   DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/core2chip )
-          install ( FILES    ${pyPluginAlphaChip}  DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/chip )
-          install ( FILES    ${pyPluginAlphaMacro} DESTINATION ${PYTHON_SITE_PACKAGES}/plugins/alpha/macro )
+          install ( FILES    ${pySources}          DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus )
+          install ( FILES    ${pyPlugins}          DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins )
+          install ( FILES    ${pyPluginCTS}        DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/cts )
+          install ( FILES    ${pyPluginC2C}        DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/core2chip )
+          install ( FILES    ${pyPluginChip}       DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/chip )
+          install ( FILES    ${pyPluginAlpha}      DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha )
+          install ( FILES    ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/block )
+          install ( FILES    ${pyPluginAlphaC2C}   DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/core2chip )
+          install ( FILES    ${pyPluginAlphaChip}  DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/chip )
+          install ( FILES    ${pyPluginAlphaMacro} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/macro )
           install ( PROGRAMS ${pyTools}            DESTINATION bin ) 
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
index c05d292b..0b85d253 100644
--- a/nix/cumulus.nix
+++ b/nix/cumulus.nix
@@ -3,13 +3,15 @@
 let pkg =
   { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
   , coriolis-etesian, coriolis-anabatic, coriolis-katana
-  , coriolis-unicorn }:
+  , coriolis-unicorn, python2Packages }:
   {
     name = "cumulus";
 
     src = ../cumulus;
 
     postInstall = ''
+      ln -s -t $out/${python2Packages.python.sitePackages} $out/${python2Packages.python.sitePackages}/cumulus/*
+
       # for import check
       mkdir -p /build/coriolistop/etc/coriolis2
       export CORIOLIS_TOP=/build/coriolistop

From e354b3ac4bca8abb7aeddaadec428d2471e832d0 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:48:01 +0000
Subject: [PATCH 69/94] Fix stratus1

---
 nix/stratus1.nix                | 33 +++++++------
 stratus1/CMakeLists.txt         |  4 +-
 stratus1/src/stratus/stratus.py | 82 ++++++++++++++-------------------
 3 files changed, 55 insertions(+), 64 deletions(-)

diff --git a/nix/stratus1.nix b/nix/stratus1.nix
index 8e2647f3..8915752a 100644
--- a/nix/stratus1.nix
+++ b/nix/stratus1.nix
@@ -1,18 +1,21 @@
-{ version, meta }:
+{ generic, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane }:
+let pkg =
+  { lib, coriolis-crlcore, coriolis-vlsisapd, coriolis-hurricane
+  , python2Packages, coriolis-cumulus }:
+  {
+    name = "coriolis-stratus1";
+    src = ../stratus1;
 
-stdenv.mkDerivation {
-  pname = "coriolis-stratus1";
+    propagatedBuildInputs = [
+      coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-cumulus
+    ];
+    postInstall = ''
+      ln -s -t $out/${python2Packages.python.sitePackages} \
+        $out/${python2Packages.python.sitePackages}/stratus/*
+    '';
+    pythonImportsCheck = [ "stratus" "patterns" "patread" "synopsys" "utils" "util" ];
 
-  src = ../stratus1;
-
-  buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd
-    coriolis-crlcore coriolis-hurricane qt4
-  ];
-  nativeBuildInputs = [ cmake ninja ];
-
-  inherit version meta;
-}
+    meta.license = lib.licenses.gpl2;
+  };
+in generic pkg
diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt
index 18969ad6..9ad4ef38 100644
--- a/stratus1/CMakeLists.txt
+++ b/stratus1/CMakeLists.txt
@@ -20,9 +20,9 @@
  
  find_package(PythonLibs         2 REQUIRED)
  find_package(PythonSitePackages REQUIRED)
- find_package(VLSISAPD REQUIRED)
+ find_package(VLSISAPD  REQUIRED)
  find_package(HURRICANE REQUIRED)
- find_package(CORIOLIS REQUIRED)
+ find_package(CORIOLIS  REQUIRED)
  
  add_subdirectory(src)
  add_subdirectory(etc)
diff --git a/stratus1/src/stratus/stratus.py b/stratus1/src/stratus/stratus.py
index c2a3e8d5..dd011e3d 100644
--- a/stratus1/src/stratus/stratus.py
+++ b/stratus1/src/stratus/stratus.py
@@ -14,57 +14,45 @@
 # +-----------------------------------------------------------------+
 
 
-try:
-  import sys
-  import traceback
-  import Cfg
-  import CRL
+import sys
+import traceback
+import Cfg
+import CRL
 
- # Triggers the default configuration files loading.
-  CRL.AllianceFramework.get()
+# Triggers the default configuration files loading.
+CRL.AllianceFramework.get()
 
-  Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.ApplicationBuiltin)
-  Cfg.getParamString('stratus1.format'   ).setString('vst')
-  Cfg.getParamString('stratus1.simulator').setString('asimut')
-  Cfg.Configuration.popDefaultPriority()
+Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.ApplicationBuiltin)
+Cfg.getParamString('stratus1.format'   ).setString('vst')
+Cfg.getParamString('stratus1.simulator').setString('asimut')
+Cfg.Configuration.popDefaultPriority()
 
-  print '  o  Stratus Configuration:'
-  print '     - Netlist format: <%s>.' % Cfg.getParamString('stratus1.format').asString()
-  print '     - Simulator: <%s>.'      % Cfg.getParamString('stratus1.simulator').asString()
-  
-  from Hurricane        import UpdateSession
-  from st_model         import *
-  from st_net           import *
-  from st_instance      import *
-  from st_placement     import *
- #from st_placeAndRoute import *
-  from st_ref           import *
-  from st_generate      import *
-  from st_const         import *
-  from st_cat           import *
-  from st_param         import *
-  from st_getrealmodel  import GetWeightTime, GetWeightArea, GetWeightPower
-  
-  from util_Const       import *
-  from util_Defs        import *
-  from util_Misc        import *
-  from util_Gen         import *
-  from util_Shift       import *
-  from util_uRom        import *
-  from util             import *
-  
-  from patterns         import *
-except ImportError, e:
-  module = str(e).split()[-1]
+print '  o  Stratus Configuration:'
+print '     - Netlist format: <%s>.' % Cfg.getParamString('stratus1.format').asString()
+print '     - Simulator: <%s>.'      % Cfg.getParamString('stratus1.simulator').asString()
 
-  print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module
-  print '        Please check the integrity of the <coriolis> package.'
-  sys.exit(1)
-except Exception, e:
-  print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python'
-  print '        modules. Something may be wrong at Python/C API level.\n'
-  print '        %s' % e
-  sys.exit(2)
+from Hurricane        import UpdateSession
+from st_model         import *
+from st_net           import *
+from st_instance      import *
+from st_placement     import *
+#from st_placeAndRoute import *
+from st_ref           import *
+from st_generate      import *
+from st_const         import *
+from st_cat           import *
+from st_param         import *
+from st_getrealmodel  import GetWeightTime, GetWeightArea, GetWeightPower
+
+from util_Const       import *
+from util_Defs        import *
+from util_Misc        import *
+from util_Gen         import *
+from util_Shift       import *
+from util_uRom        import *
+from util             import *
+
+from patterns         import *
 
 
 DoNetlist    = 0x00000001

From c62f95af7cb631739ee87013291873955bb87678 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:49:43 +0000
Subject: [PATCH 70/94] Get adder/cmos test working!

---
 nix/alliance-check-toolkit.nix | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 856315d9..2b3cf819 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,6 +1,7 @@
 { alliance-src, ... }:
 
-{ stdenv, coriolis-unicorn, coriolis-cumulus, python2Packages, alliance, yosys }:
+{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
+, python2Packages, alliance, yosys }:
 
 stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
@@ -11,7 +12,7 @@ stdenv.mkDerivation {
 
   YOSYS_TOP = "${yosys}";
   ALLIANCE_TOP = "${alliance}";
-  CORIOLIS_TOP = "${coriolis-unicorn}";
+  CORIOLIS_TOP = "${coriolis-combined}";
   # The user configuration for verhaegs is empty,
   # which is why we use it.
   USER = "verhaegs";
@@ -25,6 +26,6 @@ stdenv.mkDerivation {
     echo 'doing make lvx'
     make lvx
   '';
-  installPhase = "true";
+  installPhase = "touch $out";
   fixupPhase = "true";
 }

From df7d4667a9b7c69203b56fdc42697c0e75bb23e1 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 13:54:37 +0000
Subject: [PATCH 71/94] Don't try to catch import error in cgt

---
 unicorn/src/cgt.py | 39 +++++++++++++++++----------------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/unicorn/src/cgt.py b/unicorn/src/cgt.py
index 00421797..74642c19 100755
--- a/unicorn/src/cgt.py
+++ b/unicorn/src/cgt.py
@@ -1,27 +1,22 @@
 #!/usr/bin/env python
 
-
-try:
-  import sys
-  import os.path
-  import optparse
-  import helpers
-  helpers.loadUserSettings()
-  import Cfg
-  import Hurricane
-  import Viewer
-  import CRL
-  import Etesian
-  import Anabatic
-  import Katana
-  import Katabatic
-  import Kite
-  import Bora
-  import Tutorial
-  import Unicorn
-except Exception, e:
-  helpers.showPythonTrace( sys.argv[0], e )
-  sys.exit(2)
+import sys
+import os.path
+import optparse
+import helpers.io
+helpers.loadUserSettings()
+import Cfg
+import Hurricane
+import Viewer
+import CRL
+import Etesian
+import Anabatic
+import Katana
+import Katabatic
+import Kite
+import Bora
+import Tutorial
+import Unicorn
 
 
 def setCgtBanner ( banner ):

From 7f805cb48f65ce18ef7124443068ad5d3eedcab1 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 14:00:08 +0000
Subject: [PATCH 72/94] Run all tests (some fail)

---
 nix/alliance-check-toolkit.nix | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 2b3cf819..e792a8b8 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -17,14 +17,11 @@ stdenv.mkDerivation {
   # which is why we use it.
   USER = "verhaegs";
 
-  patchPhase = "true";
+  postPatch = "patchShebangs .";
   configurePhase = "true";
   buildPhase = ''
-    cd benchs/adder/cmos
-    echo 'doing make druc'
-    make druc
-    echo 'doing make lvx'
-    make lvx
+    cd benchs
+    ../bin/go.sh
   '';
   installPhase = "touch $out";
   fixupPhase = "true";

From 33a847c1171c0ce0f29bf3cbef773618cea1600a Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Fri, 3 Sep 2021 15:17:56 +0000
Subject: [PATCH 73/94] Make all checks work

---
 nix/alliance-check-toolkit.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index e792a8b8..9f97c758 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
   USER = "verhaegs";
 
   postPatch = "patchShebangs .";
-  configurePhase = "true";
+  configurePhase = "export CHECK_TOOLKIT=\"$PWD\"";
   buildPhase = ''
     cd benchs
     ../bin/go.sh

From d5f3c6c3d0cb3059e3bfb50e5acd89d3daca6879 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 12:20:50 +0000
Subject: [PATCH 74/94] Add comment about CORIOLIS_TOP

---
 flake.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/flake.nix b/flake.nix
index 65698764..0da6152c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -95,6 +95,8 @@
         }
       );
 
+      # CORIOLIS_TOP must be set before execution
+      # example: CORIOLIS_TOP="$(mktemp -d)" && ./result/bin/cgt
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
 
       devShell = forAllSystems (system:

From 7a3f337935993882cfb4a5106e42803257cd4987 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 13:57:31 +0000
Subject: [PATCH 75/94] Make alliance-check-toolkit a check

---
 flake.lock                     | 19 ++++++++++++++++++-
 flake.nix                      | 23 ++++++++++++++---------
 nix/alliance-check-toolkit.nix |  2 +-
 3 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/flake.lock b/flake.lock
index 0f455597..5303dfd9 100644
--- a/flake.lock
+++ b/flake.lock
@@ -35,7 +35,24 @@
     "root": {
       "inputs": {
         "alliance-check-toolkit": "alliance-check-toolkit",
-        "nixpkgs": "nixpkgs"
+        "nixpkgs": "nixpkgs",
+        "soclayout": "soclayout"
+      }
+    },
+    "soclayout": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1625141014,
+        "narHash": "sha256-9W104e0jl2raFWtVo/J/F9bfIPi67THR5YaftT8YmYI=",
+        "ref": "master",
+        "rev": "81d267598a931153815db6cbf0e44f86973575aa",
+        "revCount": 507,
+        "type": "git",
+        "url": "git://git.libre-soc.org/soclayout.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "git://git.libre-soc.org/soclayout.git"
       }
     }
   },
diff --git a/flake.nix b/flake.nix
index 0da6152c..bde3d2f2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,8 +7,10 @@
   inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
   inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
   inputs.alliance-check-toolkit.flake = false;
+  inputs.soclayout.url = git://git.libre-soc.org/soclayout.git;
+  inputs.soclayout.flake = false;
 
-  outputs = { self, nixpkgs, alliance-check-toolkit }:
+  outputs = { self, nixpkgs, alliance-check-toolkit, soclayout }@inputs:
     let
 
       # Generate a user-friendly version numer.
@@ -65,11 +67,11 @@
         "lefdef" "bootstrap" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
-        "documentation" "unittests" "alliance-check-toolkit"
-        "combined"
+        "documentation" "unittests" "combined"
+        "libresoc-experiments9"
       ];
 
-      commonArgs = { inherit version meta generic; alliance-src = alliance-check-toolkit; };
+      commonArgs = { inherit version meta generic inputs; };
 
     in
 
@@ -88,13 +90,16 @@
         builtins.foldl' (acc: elem: acc // {
           ${elem} = pkgs.${"coriolis-${elem}"};
         }) {} components
-        // {
-          test = pkgs.python2.buildEnv.override {
-            extraLibs = [ pkgs.coriolis-unicorn pkgs.coriolis-cumulus ];
-          };
-        }
       );
 
+      checks = forAllSystems (system: {
+        alliance-check-toolkit = nixpkgsFor.${system}.callPackage (
+          import ./nix/alliance-check-toolkit.nix {
+            alliance-src = alliance-check-toolkit;
+          }
+        ) {};
+      });
+
       # CORIOLIS_TOP must be set before execution
       # example: CORIOLIS_TOP="$(mktemp -d)" && ./result/bin/cgt
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index 9f97c758..ac68f01d 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,4 +1,4 @@
-{ alliance-src, ... }:
+{ alliance-src }:
 
 { stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
 , python2Packages, alliance, yosys }:

From b1570850bd87429f17383b1c57384d4fc5361256 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 14:03:28 +0000
Subject: [PATCH 76/94] Make unittests a check

---
 flake.nix                      | 16 +++++++++-------
 nix/alliance-check-toolkit.nix |  6 +++---
 nix/unittests.nix              |  4 +++-
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/flake.nix b/flake.nix
index bde3d2f2..055c7b8e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -46,7 +46,6 @@
       # Nixpkgs instantiated for supported system types.
       nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ pythonOverlay self.overlay ]; });
 
-
       override = drv:
         drv.overrideAttrs (o: {
           preConfigure = ''
@@ -67,8 +66,7 @@
         "lefdef" "bootstrap" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
-        "documentation" "unittests" "combined"
-        "libresoc-experiments9"
+        "documentation" "combined" "libresoc-experiments9"
       ];
 
       commonArgs = { inherit version meta generic inputs; };
@@ -94,9 +92,11 @@
 
       checks = forAllSystems (system: {
         alliance-check-toolkit = nixpkgsFor.${system}.callPackage (
-          import ./nix/alliance-check-toolkit.nix {
-            alliance-src = alliance-check-toolkit;
-          }
+          import ./nix/alliance-check-toolkit.nix { inherit alliance-check-toolkit; }
+        ) {};
+
+        unittests = nixpkgsFor.${system}.callPackage (
+          import ./nix/unittests.nix { inherit version meta; }
         ) {};
       });
 
@@ -115,6 +115,8 @@
         }
       );
 
-      #hydraJobs.coriolis = self.defaultPackage;
+      hydraJobs.combined = forAllSystems (system: self.packages.${system}.combined);
+      hydraJobs.alliance-check-toolkit = forAllSystems (system: self.checks.${system}.alliance-check-toolkit);
+      hydraJobs.unittests = forAllSystems (system: self.checks.${system}.unittests);
     };
 }
diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index ac68f01d..e80d3b47 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,12 +1,12 @@
-{ alliance-src }:
+{ alliance-check-toolkit }:
 
 { stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
 , python2Packages, alliance, yosys }:
 
 stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
-  version = builtins.substring 0 8 alliance-src.lastModifiedDate;
-  src = alliance-src;
+  version = builtins.substring 0 8 alliance-check-toolkit.lastModifiedDate;
+  src = alliance-check-toolkit;
 
   nativeBuildInputs = [ alliance coriolis-unicorn coriolis-cumulus yosys ];
 
diff --git a/nix/unittests.nix b/nix/unittests.nix
index 3d2a4c35..903f582a 100644
--- a/nix/unittests.nix
+++ b/nix/unittests.nix
@@ -28,5 +28,7 @@ stdenv.mkDerivation {
     runHook postInstallCheck
   '';
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }

From 0e8367d63c0d1ff0cc569b784b9b5c1fee3a7b5c Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 14:16:11 +0000
Subject: [PATCH 77/94] Add nix/libresoc-experiments9.nix

---
 nix/libresoc-experiments9.nix | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 nix/libresoc-experiments9.nix

diff --git a/nix/libresoc-experiments9.nix b/nix/libresoc-experiments9.nix
new file mode 100644
index 00000000..36c751eb
--- /dev/null
+++ b/nix/libresoc-experiments9.nix
@@ -0,0 +1,9 @@
+{ inputs, ... }:
+
+{ stdenv }:
+stdenv.mkDerivation {
+  name = "libresoc-experiments9";
+  src = inputs.soclayout;
+
+  meta.isBroken = true;
+}

From c7bf1a75d233ff01bafc17e2c6439042a4fad96b Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 14:17:19 +0000
Subject: [PATCH 78/94] Fix comment

---
 flake.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flake.nix b/flake.nix
index 055c7b8e..ce57afcc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -101,7 +101,7 @@
       });
 
       # CORIOLIS_TOP must be set before execution
-      # example: CORIOLIS_TOP="$(mktemp -d)" && ./result/bin/cgt
+      # example: `env CORIOLIS_TOP="$(mktemp -d)" ./result/bin/cgt`
       defaultPackage = forAllSystems (system: self.packages.${system}.unicorn);
 
       devShell = forAllSystems (system:

From 8e8844588c9c16456dee08a4eb084683450adae7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 14:22:18 +0000
Subject: [PATCH 79/94] Fix unittests

---
 flake.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index ce57afcc..1c9c6b96 100644
--- a/flake.nix
+++ b/flake.nix
@@ -95,9 +95,9 @@
           import ./nix/alliance-check-toolkit.nix { inherit alliance-check-toolkit; }
         ) {};
 
-        unittests = nixpkgsFor.${system}.callPackage (
+        unittests = override (nixpkgsFor.${system}.callPackage (
           import ./nix/unittests.nix { inherit version meta; }
-        ) {};
+        ) {});
       });
 
       # CORIOLIS_TOP must be set before execution

From 6ae448ee392d6445a1103fa2b4aec1e980ae12df Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 14:49:09 +0000
Subject: [PATCH 80/94] LibreSoC experiment work

---
 flake.lock                    | 38 +++++++++++++++++++++++++++++++++--
 flake.nix                     | 20 ++++++++++++++----
 nix/libresoc-experiments9.nix |  9 ---------
 nix/libresoc.nix              | 14 +++++++++++++
 4 files changed, 66 insertions(+), 15 deletions(-)
 delete mode 100644 nix/libresoc-experiments9.nix
 create mode 100644 nix/libresoc.nix

diff --git a/flake.lock b/flake.lock
index 5303dfd9..9f7b19c0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -16,6 +16,22 @@
         "url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
       }
     },
+    "c4m-pdk-freepdk45": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1615733320,
+        "narHash": "sha256-EFBYtNi9ZgLkaPrdM0lNVvfGp+/BMRH52Pm92GWcbPo=",
+        "owner": "Chips4Makers",
+        "repo": "c4m-pdk-freepdk45",
+        "rev": "985af7afbcfc3ae7c8fc7e78f688d4c5c78cab5e",
+        "type": "gitlab"
+      },
+      "original": {
+        "owner": "Chips4Makers",
+        "repo": "c4m-pdk-freepdk45",
+        "type": "gitlab"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1630612789,
@@ -32,10 +48,28 @@
         "type": "github"
       }
     },
+    "pinmux": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1623433602,
+        "narHash": "sha256-+YHxekMG3rC4FYRmreVjJ7AFPbB5vVPG+99votPEzl4=",
+        "ref": "master",
+        "rev": "d96f737c0a53dde983060522816bbef016b449ce",
+        "revCount": 837,
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/pinmux.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://git.libre-soc.org/git/pinmux.git"
+      }
+    },
     "root": {
       "inputs": {
         "alliance-check-toolkit": "alliance-check-toolkit",
+        "c4m-pdk-freepdk45": "c4m-pdk-freepdk45",
         "nixpkgs": "nixpkgs",
+        "pinmux": "pinmux",
         "soclayout": "soclayout"
       }
     },
@@ -48,11 +82,11 @@
         "rev": "81d267598a931153815db6cbf0e44f86973575aa",
         "revCount": 507,
         "type": "git",
-        "url": "git://git.libre-soc.org/soclayout.git"
+        "url": "https://git.libre-soc.org/git/soclayout.git"
       },
       "original": {
         "type": "git",
-        "url": "git://git.libre-soc.org/soclayout.git"
+        "url": "https://git.libre-soc.org/git/soclayout.git"
       }
     }
   },
diff --git a/flake.nix b/flake.nix
index 1c9c6b96..14974a0a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,10 +7,18 @@
   inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
   inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
   inputs.alliance-check-toolkit.flake = false;
-  inputs.soclayout.url = git://git.libre-soc.org/soclayout.git;
+  inputs.soclayout.url = "git+https://git.libre-soc.org/git/soclayout.git";
   inputs.soclayout.flake = false;
+  inputs.pinmux.url = "git+https://git.libre-soc.org/git/pinmux.git";
+  inputs.pinmux.flake = false;
+  inputs.c4m-pdk-freepdk45 = {
+    type = "gitlab";
+    owner = "Chips4Makers";
+    repo = "c4m-pdk-freepdk45";
+    flake = false;
+  };
 
-  outputs = { self, nixpkgs, alliance-check-toolkit, soclayout }@inputs:
+  outputs = { self, nixpkgs, alliance-check-toolkit, soclayout, pinmux, c4m-pdk-freepdk45 }:
     let
 
       # Generate a user-friendly version numer.
@@ -66,10 +74,10 @@
         "lefdef" "bootstrap" "coloquinte"
         "equinox" "knik" "ispd" "karakaze" "nimbus"
         "metis" "mauka" "solstice" "stratus1"
-        "documentation" "combined" "libresoc-experiments9"
+        "documentation" "combined"
       ];
 
-      commonArgs = { inherit version meta generic inputs; };
+      commonArgs = { inherit version meta generic; };
 
     in
 
@@ -95,6 +103,10 @@
           import ./nix/alliance-check-toolkit.nix { inherit alliance-check-toolkit; }
         ) {};
 
+        libresoc = nixpkgsFor.${system}.callPackage (
+          import ./nix/libresoc.nix { inherit soclayout pinmux; }
+        ) {};
+
         unittests = override (nixpkgsFor.${system}.callPackage (
           import ./nix/unittests.nix { inherit version meta; }
         ) {});
diff --git a/nix/libresoc-experiments9.nix b/nix/libresoc-experiments9.nix
deleted file mode 100644
index 36c751eb..00000000
--- a/nix/libresoc-experiments9.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ inputs, ... }:
-
-{ stdenv }:
-stdenv.mkDerivation {
-  name = "libresoc-experiments9";
-  src = inputs.soclayout;
-
-  meta.isBroken = true;
-}
diff --git a/nix/libresoc.nix b/nix/libresoc.nix
new file mode 100644
index 00000000..c4acca12
--- /dev/null
+++ b/nix/libresoc.nix
@@ -0,0 +1,14 @@
+{ soclayout, pinmux, ... }:
+
+{ stdenv }:
+stdenv.mkDerivation {
+  name = "libresoc-check";
+  src = soclayout;
+
+  prePatch = ''
+    rm pinmux
+    ln -s ${pinmux} pinmux
+  '';
+
+  meta.isBroken = true;
+}

From 4f6f668b741433e8677c67e82e9aa9296a5b4452 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 16:06:44 +0000
Subject: [PATCH 81/94] Try to get libresoc working

---
 flake.nix        |  3 ++-
 nix/libresoc.nix | 41 ++++++++++++++++++++++++++++++++++++-----
 2 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/flake.nix b/flake.nix
index 14974a0a..b995c2e4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -104,7 +104,7 @@
         ) {};
 
         libresoc = nixpkgsFor.${system}.callPackage (
-          import ./nix/libresoc.nix { inherit soclayout pinmux; }
+          import ./nix/libresoc.nix { inherit alliance-check-toolkit soclayout pinmux; }
         ) {};
 
         unittests = override (nixpkgsFor.${system}.callPackage (
@@ -130,5 +130,6 @@
       hydraJobs.combined = forAllSystems (system: self.packages.${system}.combined);
       hydraJobs.alliance-check-toolkit = forAllSystems (system: self.checks.${system}.alliance-check-toolkit);
       hydraJobs.unittests = forAllSystems (system: self.checks.${system}.unittests);
+      hydraJobs.libresoc = forAllSystems (system: self.checks.${system}.libresoc);
     };
 }
diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index c4acca12..2d507cc4 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -1,14 +1,45 @@
-{ soclayout, pinmux, ... }:
+{ alliance-check-toolkit, soclayout, pinmux, ... }:
 
-{ stdenv }:
-stdenv.mkDerivation {
+{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
+, python2Packages, alliance, yosys, writeShellScriptBin }:
+
+let
+  fakegit = writeShellScriptBin "git" "exit 0";
+in stdenv.mkDerivation rec {
   name = "libresoc-check";
   src = soclayout;
 
+  YOSYS_TOP = "${yosys}";
+  ALLIANCE_TOP = "${alliance}";
+  ALLIANCE_TOOLKIT = "${alliance-check-toolkit}";
+  CHECK_TOOLKIT = ALLIANCE_TOOLKIT;
+  CORIOLIS_TOP = "${coriolis-combined}";
+  # The user configuration for verhaegs is empty,
+  # which is why we use it.
+  USER = "verhaegs";
+
+  nativeBuildInputs = [ fakegit alliance coriolis-unicorn coriolis-cumulus yosys ];
+
   prePatch = ''
-    rm pinmux
+    rmdir pinmux
     ln -s ${pinmux} pinmux
   '';
+  postPatch = "patchShebangs .";
 
-  meta.isBroken = true;
+  buildPhase = ''
+    runHook preBuild
+    cd experiments9
+    ./mksym.sh
+    ln -s ${alliance-check-toolkit}/etc/mk/users.d/user-${USER}.mk mk/users.d/user-${USER}.mk
+    ./build_full_4ksram.sh
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mv -T "$PWD" "$out"
+    runHook postInstall
+  '';
+
+  fixupPhase = "true";
 }

From 41274d6ab519ebc242abd0408227f641a54f516f Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 17:47:17 +0000
Subject: [PATCH 82/94] Make Libre-SoC almost work

---
 nix/libresoc.nix | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index 2d507cc4..18a8268c 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -7,12 +7,11 @@ let
   fakegit = writeShellScriptBin "git" "exit 0";
 in stdenv.mkDerivation rec {
   name = "libresoc-check";
+
   src = soclayout;
 
   YOSYS_TOP = "${yosys}";
   ALLIANCE_TOP = "${alliance}";
-  ALLIANCE_TOOLKIT = "${alliance-check-toolkit}";
-  CHECK_TOOLKIT = ALLIANCE_TOOLKIT;
   CORIOLIS_TOP = "${coriolis-combined}";
   # The user configuration for verhaegs is empty,
   # which is why we use it.
@@ -22,7 +21,14 @@ in stdenv.mkDerivation rec {
 
   prePatch = ''
     rmdir pinmux
-    ln -s ${pinmux} pinmux
+    cp -r ${pinmux} -T pinmux
+
+    cp -r ${alliance-check-toolkit} -T alliance-check-toolkit
+
+    chmod a+w -R alliance-check-toolkit pinmux
+
+    export ALLIANCE_TOOLKIT="$PWD/alliance-check-toolkit"
+    export CHECK_TOOLKIT="$ALLIANCE_TOOLKIT"
   '';
   postPatch = "patchShebangs .";
 

From c3d10b21aaeb2cb84bf127432cd9f02c3c7e1602 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Sun, 5 Sep 2021 18:48:19 +0000
Subject: [PATCH 83/94] Use older version of yosys for Libre-SoC

---
 nix/libresoc.nix | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index 18a8268c..98f8206c 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -1,11 +1,22 @@
 { alliance-check-toolkit, soclayout, pinmux, ... }:
 
 { stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
-, python2Packages, alliance, yosys, writeShellScriptBin }:
+, python2Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
 
 let
   fakegit = writeShellScriptBin "git" "exit 0";
-in stdenv.mkDerivation rec {
+  yosys' = yosys.overrideAttrs (_: {
+    version = "0.9+4008";
+    src = fetchFromGitHub {
+      owner = "YosysHQ";
+      repo = "yosys";
+      rev = "049e3abf9baf795e69b9ecb9c4f19de6131f8418";
+      sha256 = "0h3w91jr5yws4wxk3n45h1pdq65jhj957d5pzy2799gzwkba5adh";
+    };
+  });
+in
+let yosys = yosys'; in
+stdenv.mkDerivation rec {
   name = "libresoc-check";
 
   src = soclayout;

From 8c21c6a35bbeacad21fcd1b865be2bcb42788fca Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Mon, 6 Sep 2021 20:57:27 +0000
Subject: [PATCH 84/94] libresoc: Use recon experiment instead

---
 nix/libresoc.nix | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index 98f8206c..487f7450 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -1,10 +1,28 @@
 { alliance-check-toolkit, soclayout, pinmux, ... }:
 
-{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
+{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus, fetchurl
 , python2Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
 
 let
+  C4MLogo = fetchurl {
+    url = "https://ftp.libre-soc.org/C4MLogo.gds";
+    sha256 = "0s1a2l4rh6vc1xg94jq87lsdkiqv68b0zi2rnv6wwcl9i2smacbf";
+  };
+  lip6 = fetchurl {
+    url = "https://ftp.libre-soc.org/lip6.gds";
+    sha256 = "0jj4z2d0is1vr3fziaqva39s7d85j0xqmmib0mdqnf2bg9iv91s4";
+  };
+  sorbonne_logo = fetchurl {
+    url = "https://ftp.libre-soc.org/sorbonne_logo.gds";
+    sha256 = "1p3plmb90kqljwsba2fahqzsy18iapmw2zvgkjh745c87lynn3dq";
+  };
+  libresoc_logo = fetchurl {
+    url = "https://ftp.libre-soc.org/libresoc_logo.gds";
+    sha256 = "1wbc5qrjlyrykaixdgp5d7brv5imlx71909y49xss907mil76bwh";
+  };
+
   fakegit = writeShellScriptBin "git" "exit 0";
+  fakewget = writeShellScriptBin "wget" "exit 0";
   yosys' = yosys.overrideAttrs (_: {
     version = "0.9+4008";
     src = fetchFromGitHub {
@@ -28,7 +46,7 @@ stdenv.mkDerivation rec {
   # which is why we use it.
   USER = "verhaegs";
 
-  nativeBuildInputs = [ fakegit alliance coriolis-unicorn coriolis-cumulus yosys ];
+  nativeBuildInputs = [ fakewget fakegit alliance coriolis-unicorn coriolis-cumulus yosys ];
 
   prePatch = ''
     rmdir pinmux
@@ -46,6 +64,12 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     runHook preBuild
     cd experiments9
+
+    ln -s ${C4MLogo} C4MLogo.gds
+    ln -s ${lip6} lip6.gds
+    ln -s ${sorbonne_logo} sorbonne_logo.gds
+    ln -s ${libresoc_logo} libresoc_logo.gds
+
     ./mksym.sh
     ln -s ${alliance-check-toolkit}/etc/mk/users.d/user-${USER}.mk mk/users.d/user-${USER}.mk
     ./build_full_4ksram.sh

From fca22782a0e764da330baf68544e3de1fdf6e41b Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Thu, 16 Sep 2021 20:10:05 +0000
Subject: [PATCH 85/94] Remove unneeded input

---
 flake.nix | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/flake.nix b/flake.nix
index b995c2e4..d61cc4e0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,14 +11,8 @@
   inputs.soclayout.flake = false;
   inputs.pinmux.url = "git+https://git.libre-soc.org/git/pinmux.git";
   inputs.pinmux.flake = false;
-  inputs.c4m-pdk-freepdk45 = {
-    type = "gitlab";
-    owner = "Chips4Makers";
-    repo = "c4m-pdk-freepdk45";
-    flake = false;
-  };
 
-  outputs = { self, nixpkgs, alliance-check-toolkit, soclayout, pinmux, c4m-pdk-freepdk45 }:
+  outputs = { self, nixpkgs, alliance-check-toolkit, soclayout, pinmux }:
     let
 
       # Generate a user-friendly version numer.

From e69da9aeb7c5caa6b0b49de853876e8bcf71b15d Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Wed, 6 Oct 2021 16:07:46 +0000
Subject: [PATCH 86/94] Fix licenses

---
 nix/anabatic.nix      | 1 +
 nix/bootstrap.nix     | 4 +++-
 nix/bora.nix          | 1 +
 nix/coloquinte.nix    | 4 +++-
 nix/documentation.nix | 2 +-
 nix/equinox.nix       | 6 ++++--
 nix/etesian.nix       | 4 +++-
 nix/flute.nix         | 1 +
 nix/ispd.nix          | 2 +-
 nix/katabatic.nix     | 1 +
 nix/katana.nix        | 1 +
 nix/kite.nix          | 1 +
 nix/knik.nix          | 4 +++-
 nix/mauka.nix         | 2 +-
 nix/metis.nix         | 2 +-
 nix/nimbus.nix        | 2 +-
 nix/solstice.nix      | 4 +++-
 nix/tutorial.nix      | 1 +
 nix/unicorn.nix       | 2 ++
 nix/vlsisapd.nix      | 2 ++
 20 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/nix/anabatic.nix b/nix/anabatic.nix
index 02764024..c7479e5c 100644
--- a/nix/anabatic.nix
+++ b/nix/anabatic.nix
@@ -13,5 +13,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Anabatic" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/bootstrap.nix b/nix/bootstrap.nix
index 3b475d3b..dd4ee3b2 100644
--- a/nix/bootstrap.nix
+++ b/nix/bootstrap.nix
@@ -10,5 +10,7 @@ stdenv.mkDerivation {
   buildInputs = [ python2 ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/bora.nix b/nix/bora.nix
index dc2be996..be2cd540 100644
--- a/nix/bora.nix
+++ b/nix/bora.nix
@@ -15,5 +15,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = "Bora";
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
index 6ef37f7b..b1dc12e1 100644
--- a/nix/coloquinte.nix
+++ b/nix/coloquinte.nix
@@ -14,5 +14,7 @@ stdenv.mkDerivation {
 
   cmakeFlags = [ "-DWITH_OPENMP:STRING=TRUE" ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/documentation.nix b/nix/documentation.nix
index 83bf172c..0fef307e 100644
--- a/nix/documentation.nix
+++ b/nix/documentation.nix
@@ -14,5 +14,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { broken = true; };
+  meta = meta // { broken = true; license = lib.licenses.cc-by-nc-sa-40; };
 }
diff --git a/nix/equinox.nix b/nix/equinox.nix
index 79dff9b3..7a5af02c 100644
--- a/nix/equinox.nix
+++ b/nix/equinox.nix
@@ -1,4 +1,4 @@
-{ version, meta }:
+{ version, meta, ... }:
 
 { lib, stdenv, cmake, ninja, python2, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
@@ -18,5 +18,7 @@ stdenv.mkDerivation {
   ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; }
 }
diff --git a/nix/etesian.nix b/nix/etesian.nix
index e0b15b8e..b8c2df61 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -1,6 +1,7 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
+  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane,
+  , lib, coriolis-crlcore }:
   {
     name = "etesian";
     src = ../etesian;
@@ -13,5 +14,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Etesian" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/flute.nix b/nix/flute.nix
index 1cace7f4..c98d1636 100644
--- a/nix/flute.nix
+++ b/nix/flute.nix
@@ -7,5 +7,6 @@ let pkg =
     buildInputs = [ coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
     nativeBuildInputs = [ ];
     pythonImportsCheck = [ "Flute" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/ispd.nix b/nix/ispd.nix
index 3aae59b0..7abe8031 100644
--- a/nix/ispd.nix
+++ b/nix/ispd.nix
@@ -22,5 +22,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { broken = true; };
+  meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
index 4a1d4e4f..88901d5e 100644
--- a/nix/katabatic.nix
+++ b/nix/katabatic.nix
@@ -14,5 +14,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Katabatic" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/katana.nix b/nix/katana.nix
index 1a4f2932..aec2e4e4 100644
--- a/nix/katana.nix
+++ b/nix/katana.nix
@@ -15,5 +15,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Katana" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/kite.nix b/nix/kite.nix
index 62b0a141..54c4a87a 100644
--- a/nix/kite.nix
+++ b/nix/kite.nix
@@ -14,5 +14,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Kite" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/knik.nix b/nix/knik.nix
index 73aee664..5a0ca26f 100644
--- a/nix/knik.nix
+++ b/nix/knik.nix
@@ -18,5 +18,7 @@ stdenv.mkDerivation {
   ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/mauka.nix b/nix/mauka.nix
index 3663c3be..d2b16f3e 100644
--- a/nix/mauka.nix
+++ b/nix/mauka.nix
@@ -20,5 +20,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { broken = true; };
+  meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/metis.nix b/nix/metis.nix
index 1871dc00..45cdc558 100644
--- a/nix/metis.nix
+++ b/nix/metis.nix
@@ -19,5 +19,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { broken = true; };
+  meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/nimbus.nix b/nix/nimbus.nix
index a05e6ed5..bc2b4c74 100644
--- a/nix/nimbus.nix
+++ b/nix/nimbus.nix
@@ -19,5 +19,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { broken = true; };
+  meta = meta // { broken = true; license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/solstice.nix b/nix/solstice.nix
index 0fe42350..f33433b0 100644
--- a/nix/solstice.nix
+++ b/nix/solstice.nix
@@ -18,5 +18,7 @@ stdenv.mkDerivation {
   ];
   nativeBuildInputs = [ cmake ninja ];
 
-  inherit version meta;
+  inherit version;
+
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/tutorial.nix b/nix/tutorial.nix
index 416e3839..199e875f 100644
--- a/nix/tutorial.nix
+++ b/nix/tutorial.nix
@@ -14,5 +14,6 @@ let pkg =
     ];
     nativeBuildInputs = [ doxygen ];
     pythonImportsCheck = [ "Tutorial" ];
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 9bec4808..422db62a 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -24,5 +24,7 @@ let pkg =
     postFixup = ''
       wrapPythonPrograms
     '';
+
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index 78ec412e..f5e940e5 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -7,5 +7,7 @@ let pkg =
     buildInputs = [ libxml2 qt4 ];
     nativeBuildInputs = [ bison flex doxygen ];
     pythonImportsCheck = [ "SPICE" "LIBERTY" "DTR" "Cfg" "CIF" "AGDS" ];
+
+    meta.license = lib.licenses.gpl2Plus;
   };
 in generic pkg

From 83b266cb810cd45a0503b3a2b5e0a1e12386e8e5 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 20:17:17 +0000
Subject: [PATCH 87/94] nix: Update dependencies

---
 flake.lock | 44 +++++++++++++-------------------------------
 flake.nix  |  2 +-
 2 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/flake.lock b/flake.lock
index 9f7b19c0..8e643e50 100644
--- a/flake.lock
+++ b/flake.lock
@@ -3,11 +3,11 @@
     "alliance-check-toolkit": {
       "flake": false,
       "locked": {
-        "lastModified": 1624038537,
-        "narHash": "sha256-Z8erR1YbKR7ndHU75Yb6DOSzj07ZJB2GGx+zSJvNJ7Y=",
+        "lastModified": 1635073274,
+        "narHash": "sha256-pK0dV1ZY52TB/ZMBxXd2ekkspxSYt4h258js/I0NBWA=",
         "ref": "master",
-        "rev": "f28f970148e8f942fb2cf971d41333d42c1d886b",
-        "revCount": 269,
+        "rev": "0e5744fd98acadee44bc5cfc4949146f1d30506f",
+        "revCount": 291,
         "type": "git",
         "url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
       },
@@ -16,34 +16,17 @@
         "url": "https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git"
       }
     },
-    "c4m-pdk-freepdk45": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1615733320,
-        "narHash": "sha256-EFBYtNi9ZgLkaPrdM0lNVvfGp+/BMRH52Pm92GWcbPo=",
-        "owner": "Chips4Makers",
-        "repo": "c4m-pdk-freepdk45",
-        "rev": "985af7afbcfc3ae7c8fc7e78f688d4c5c78cab5e",
-        "type": "gitlab"
-      },
-      "original": {
-        "owner": "Chips4Makers",
-        "repo": "c4m-pdk-freepdk45",
-        "type": "gitlab"
-      }
-    },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1630612789,
-        "narHash": "sha256-f1q5ExkMX2CBqBcRmrlnpewADt3EjhyncP/PfwUhK/Q=",
-        "owner": "L-as",
+        "lastModified": 1635279144,
+        "narHash": "sha256-YnTZ/BgZukF8wt2dFhl446H6NfOYTDfz7w3BzcW1V3k=",
+        "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "11f9ff27bc66bf653ccbbfae1412e6f5705e4a5c",
+        "rev": "6fd9e0cec6118df8557407c66d8a880a2c6d0675",
         "type": "github"
       },
       "original": {
-        "owner": "L-as",
-        "ref": "alliance",
+        "owner": "NixOS",
         "repo": "nixpkgs",
         "type": "github"
       }
@@ -67,7 +50,6 @@
     "root": {
       "inputs": {
         "alliance-check-toolkit": "alliance-check-toolkit",
-        "c4m-pdk-freepdk45": "c4m-pdk-freepdk45",
         "nixpkgs": "nixpkgs",
         "pinmux": "pinmux",
         "soclayout": "soclayout"
@@ -76,11 +58,11 @@
     "soclayout": {
       "flake": false,
       "locked": {
-        "lastModified": 1625141014,
-        "narHash": "sha256-9W104e0jl2raFWtVo/J/F9bfIPi67THR5YaftT8YmYI=",
+        "lastModified": 1634647854,
+        "narHash": "sha256-hNLjvVDlGzTvpSGfNkZtqXUtlfObqI5ORyWLJ7qfxHU=",
         "ref": "master",
-        "rev": "81d267598a931153815db6cbf0e44f86973575aa",
-        "revCount": 507,
+        "rev": "6316f6a48c6a6167603f01733b5df8300dae435c",
+        "revCount": 512,
         "type": "git",
         "url": "https://git.libre-soc.org/git/soclayout.git"
       },
diff --git a/flake.nix b/flake.nix
index d61cc4e0..301de5d1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,7 +4,7 @@
   description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
 
   # Nixpkgs / NixOS version to use.
-  inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
+  inputs.nixpkgs.url = "github:NixOS/nixpkgs"; # for alliance
   inputs.alliance-check-toolkit.url = "git+https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git";
   inputs.alliance-check-toolkit.flake = false;
   inputs.soclayout.url = "git+https://git.libre-soc.org/git/soclayout.git";

From 24675803964bf0f93f375b6305413e413bde0516 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 20:38:19 +0000
Subject: [PATCH 88/94] nix: Fix missing imports

---
 nix/anabatic.nix  | 2 +-
 nix/bora.nix      | 2 +-
 nix/equinox.nix   | 2 +-
 nix/etesian.nix   | 2 +-
 nix/flute.nix     | 2 +-
 nix/katabatic.nix | 2 +-
 nix/katana.nix    | 2 +-
 nix/kite.nix      | 2 +-
 nix/tutorial.nix  | 2 +-
 nix/unicorn.nix   | 2 +-
 nix/vlsisapd.nix  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/nix/anabatic.nix b/nix/anabatic.nix
index c7479e5c..52f802b1 100644
--- a/nix/anabatic.nix
+++ b/nix/anabatic.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd
+  { doxygen, qt4, lib, coriolis-coloquinte, coriolis-vlsisapd
   , coriolis-hurricane, coriolis-crlcore
   , coriolis-flute, coriolis-etesian }:
   {
diff --git a/nix/bora.nix b/nix/bora.nix
index be2cd540..f17334fa 100644
--- a/nix/bora.nix
+++ b/nix/bora.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-vlsisapd, coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-katana
   , coriolis-flute, coriolis-anabatic
   , coriolis-lefdef, qwt6_qt4, doxygen }:
diff --git a/nix/equinox.nix b/nix/equinox.nix
index 7a5af02c..d98a0b86 100644
--- a/nix/equinox.nix
+++ b/nix/equinox.nix
@@ -20,5 +20,5 @@ stdenv.mkDerivation {
 
   inherit version;
 
-  meta = meta // { license = lib.licenses.gpl2Plus; }
+  meta = meta // { license = lib.licenses.gpl2Plus; };
 }
diff --git a/nix/etesian.nix b/nix/etesian.nix
index b8c2df61..1e7c12b7 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane,
+  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane
   , lib, coriolis-crlcore }:
   {
     name = "etesian";
diff --git a/nix/flute.nix b/nix/flute.nix
index c98d1636..604cc3fc 100644
--- a/nix/flute.nix
+++ b/nix/flute.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
+  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
   {
     name = "flute";
     src = ../flute;
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
index 88901d5e..0da14e5e 100644
--- a/nix/katabatic.nix
+++ b/nix/katabatic.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-vlsisapd, coriolis-hurricane
   , coriolis-crlcore, coriolis-flute, coriolis-knik
   , qt4, doxygen }:
   {
diff --git a/nix/katana.nix b/nix/katana.nix
index aec2e4e4..3f2bc638 100644
--- a/nix/katana.nix
+++ b/nix/katana.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd
+  { doxygen, qt4, lib, coriolis-coloquinte, coriolis-vlsisapd
   , coriolis-hurricane, coriolis-crlcore, libxml2
   , coriolis-flute, coriolis-etesian, coriolis-lefdef
   , coriolis-anabatic }:
diff --git a/nix/kite.nix b/nix/kite.nix
index 54c4a87a..a06191ed 100644
--- a/nix/kite.nix
+++ b/nix/kite.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-lefdef, coriolis-knik, coriolis-katabatic
+  { lib, coriolis-lefdef, coriolis-knik, coriolis-katabatic
   , coriolis-vlsisapd, coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
   {
diff --git a/nix/tutorial.nix b/nix/tutorial.nix
index 199e875f..265d879f 100644
--- a/nix/tutorial.nix
+++ b/nix/tutorial.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-vlsisapd, coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-lefdef, libxml2
   , doxygen }:
   {
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 422db62a..39637ae5 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { coriolis-vlsisapd, coriolis-hurricane, coriolis-tutorial
+  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-tutorial
   , coriolis-crlcore, qt4, coriolis-katana, coriolis-bora
   , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
   , coriolis-lefdef, coriolis-knik, coriolis-kite
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index f5e940e5..c01f5725 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { libxml2, qt4, bison, flex, doxygen }:
+  { lib, libxml2, qt4, bison, flex, doxygen }:
   {
     name = "vlsisapd";
     src = ../vlsisapd;

From af95f9f67111ecaf95251e880ad16aeb65904646 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 21:10:09 +0000
Subject: [PATCH 89/94] nix: Use Python 3

---
 bootstrap/cmake_modules/FindBootstrap.cmake |  2 +-
 flake.nix                                   |  6 +++---
 nix/alliance-check-toolkit.nix              |  2 +-
 nix/bootstrap.nix                           |  4 ++--
 nix/coloquinte.nix                          |  4 ++--
 nix/crlcore.nix                             | 10 +++++-----
 nix/cumulus.nix                             |  4 ++--
 nix/equinox.nix                             |  6 +++---
 nix/generic.nix                             | 12 ++++++------
 nix/ispd.nix                                |  6 +++---
 nix/knik.nix                                |  6 +++---
 nix/lefdef.nix                              |  6 +++---
 nix/libresoc.nix                            |  2 +-
 nix/mauka.nix                               |  6 +++---
 nix/metis.nix                               |  6 +++---
 nix/nimbus.nix                              |  6 +++---
 nix/oroshi.nix                              |  6 +++---
 nix/solstice.nix                            |  6 +++---
 nix/stratus1.nix                            |  6 +++---
 nix/unicorn.nix                             |  4 ++--
 nix/unittests.nix                           |  6 +++---
 21 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake
index adac9371..f6e2cc07 100644
--- a/bootstrap/cmake_modules/FindBootstrap.cmake
+++ b/bootstrap/cmake_modules/FindBootstrap.cmake
@@ -187,7 +187,7 @@
    else(ARGC LESS 1)
      foreach(component ${ARGV})
        if(${component} STREQUAL "python")
-         set(components ${components} ${component}27)
+         set(components ${components} ${component}39)
        else()
          set(components ${components} ${component})
        endif()
diff --git a/flake.nix b/flake.nix
index 301de5d1..1ed127e3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -31,7 +31,7 @@
       };
 
       pythonOverlay = self: super: {
-        python2Packages = super.python2Packages.override {
+        python3Packages = super.python3Packages.override {
           overrides = pself: psuper: {
             pyqt4 = psuper.pyqt4.overridePythonAttrs (o: rec {
               version = "4.12.1";
@@ -39,7 +39,7 @@
                 url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz";
                 sha256 = "RdckRhrliwGbm+lQdsoH4hLrcwhK7JEluyVIJcOgU4M=";
               };
-              pythonImportsCheck = [ "PyQt4.QtCore" "PyQt4.QtGui" ];
+              pythonImportsCheck = (o.pythonImportsCheck or []) ++ [ "PyQt4.QtCore" "PyQt4.QtGui" ];
             });
           };
         };
@@ -113,7 +113,7 @@
       devShell = forAllSystems (system:
         let
           pkgs = nixpkgsFor.${system};
-          env = pkgs.python2.buildEnv.override {
+          env = pkgs.python3.buildEnv.override {
             extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) pythonComponents;
           };
         in pkgs.mkShell {
diff --git a/nix/alliance-check-toolkit.nix b/nix/alliance-check-toolkit.nix
index e80d3b47..b06282e1 100644
--- a/nix/alliance-check-toolkit.nix
+++ b/nix/alliance-check-toolkit.nix
@@ -1,7 +1,7 @@
 { alliance-check-toolkit }:
 
 { stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
-, python2Packages, alliance, yosys }:
+, python3Packages, alliance, yosys }:
 
 stdenv.mkDerivation {
   pname = "alliance-check-toolkit";
diff --git a/nix/bootstrap.nix b/nix/bootstrap.nix
index dd4ee3b2..030f4047 100644
--- a/nix/bootstrap.nix
+++ b/nix/bootstrap.nix
@@ -1,13 +1,13 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, ninja }:
+{ lib, stdenv, python3, cmake, ninja }:
 
 stdenv.mkDerivation {
   pname = "coriolis-bootstrap";
 
   src = ../bootstrap;
 
-  buildInputs = [ python2 ];
+  buildInputs = [ python3 ];
   nativeBuildInputs = [ cmake ninja ];
 
   inherit version;
diff --git a/nix/coloquinte.nix b/nix/coloquinte.nix
index b1dc12e1..7f835b81 100644
--- a/nix/coloquinte.nix
+++ b/nix/coloquinte.nix
@@ -1,8 +1,8 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
+{ lib, stdenv, python3, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-coloquinte";
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index 563a7064..c0e18e5c 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,15 +1,15 @@
 { generic, ... }:
 let pkg =
   { lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
-  , coriolis-lefdef, coriolis-hurricane, python2Packages }:
+  , coriolis-lefdef, coriolis-hurricane, python3Packages }:
   rec {
     name = "crlcore";
     src = ../crlcore;
-    propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
-    nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
+    propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python3Packages.pyqt4 ];
+    nativeBuildInputs = [ bison flex doxygen python3Packages.pyqt4 ];
     postInstall = ''
-      ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
-      ln -s -t $out/${python2Packages.python.sitePackages} $out/etc/coriolis2/*
+      ln -s crlcore/helpers $out/${python3Packages.python.sitePackages}/helpers
+      ln -s -t $out/${python3Packages.python.sitePackages} $out/etc/coriolis2/*
 
       # for import check
       mkdir -p /build/coriolistop/etc/coriolis2
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
index 0b85d253..7e4aae4f 100644
--- a/nix/cumulus.nix
+++ b/nix/cumulus.nix
@@ -3,14 +3,14 @@
 let pkg =
   { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
   , coriolis-etesian, coriolis-anabatic, coriolis-katana
-  , coriolis-unicorn, python2Packages }:
+  , coriolis-unicorn, python3Packages }:
   {
     name = "cumulus";
 
     src = ../cumulus;
 
     postInstall = ''
-      ln -s -t $out/${python2Packages.python.sitePackages} $out/${python2Packages.python.sitePackages}/cumulus/*
+      ln -s -t $out/${python3Packages.python.sitePackages} $out/${python3Packages.python.sitePackages}/cumulus/*
 
       # for import check
       mkdir -p /build/coriolistop/etc/coriolis2
diff --git a/nix/equinox.nix b/nix/equinox.nix
index d98a0b86..f7946a18 100644
--- a/nix/equinox.nix
+++ b/nix/equinox.nix
@@ -1,10 +1,10 @@
 { version, meta, ... }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
+{ lib, stdenv, cmake, ninja, python3, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, qt4 }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-equinox";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../equinox;
 
   buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
+    python3 boostWithPython coriolis-bootstrap
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     qt4
   ];
diff --git a/nix/generic.nix b/nix/generic.nix
index 9f64a2fa..da733eac 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -4,7 +4,7 @@ let
   meta' = meta;
   f =
     { lib, stdenv, cmake, ninja, boost
-    , coriolis-bootstrap, python2Packages }:
+    , coriolis-bootstrap, python3Packages }:
     let self =
       { name
       , buildInputs ? []
@@ -17,25 +17,25 @@ let
       }@args':
       let
         args = builtins.removeAttrs args' (builtins.attrNames (builtins.functionArgs self));
-        boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
+        boostWithPython = boost.override { enablePython = true; inherit (python3Packages) python; };
         drv = stdenv.mkDerivation ({
           pname = "coriolis-${name}";
 
-          buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
+          buildInputs = [ python3Packages.python boostWithPython ] ++ buildInputs;
           nativeBuildInputs = [
             coriolis-bootstrap cmake ninja
-            python2Packages.pythonImportsCheckHook
+            python3Packages.pythonImportsCheckHook
           ] ++ nativeBuildInputs;
 
           postInstall = postInstall + ''
-              export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
+              export PYTHONPATH="$out/${python3Packages.python.sitePackages}:$PYTHONPATH"
           '';
 
           meta = meta' // meta;
 
           inherit version pythonImportsCheck;
         } // args);
-      in continuation (python2Packages.toPythonModule drv);
+      in continuation (python3Packages.toPythonModule drv);
     in self;
 in
 
diff --git a/nix/ispd.nix b/nix/ispd.nix
index 7abe8031..11bc92f8 100644
--- a/nix/ispd.nix
+++ b/nix/ispd.nix
@@ -1,11 +1,11 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
+{ lib, stdenv, cmake, ninja, python3, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-flute, coriolis-knik
 , coriolis-lefdef, coriolis-katabatic, libxml2, qt4 }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-ispd";
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   src = ../ispd;
 
   buildInputs = [
-    python2 boostWithPython coriolis-bootstrap libxml2
+    python3 boostWithPython coriolis-bootstrap libxml2
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     coriolis-flute coriolis-knik coriolis-lefdef
     coriolis-katabatic qt4
diff --git a/nix/knik.nix b/nix/knik.nix
index 5a0ca26f..8bc35b29 100644
--- a/nix/knik.nix
+++ b/nix/knik.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
+{ lib, stdenv, cmake, ninja, python3, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-flute, qt4 }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-knik";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../knik;
 
   buildInputs = [
-    python2 boostWithPython coriolis-bootstrap
+    python3 boostWithPython coriolis-bootstrap
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     coriolis-flute qt4
   ];
diff --git a/nix/lefdef.nix b/nix/lefdef.nix
index 811d3d8c..ae9175c4 100644
--- a/nix/lefdef.nix
+++ b/nix/lefdef.nix
@@ -1,9 +1,9 @@
 { version, meta }:
 
-{ lib, stdenv, python2, cmake, boost, bison, flex
+{ lib, stdenv, python3, cmake, boost, bison, flex
 , libxml2, zlib, ninja, coriolis-bootstrap  }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-lefdef";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  buildInputs = [ python2 boostWithPython coriolis-bootstrap bison flex zlib ];
+  buildInputs = [ python3 boostWithPython coriolis-bootstrap bison flex zlib ];
   nativeBuildInputs = [ cmake ninja ];
 
   inherit version;
diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index 487f7450..7450f78a 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -1,7 +1,7 @@
 { alliance-check-toolkit, soclayout, pinmux, ... }:
 
 { stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus, fetchurl
-, python2Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
+, python3Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
 
 let
   C4MLogo = fetchurl {
diff --git a/nix/mauka.nix b/nix/mauka.nix
index d2b16f3e..0c30a542 100644
--- a/nix/mauka.nix
+++ b/nix/mauka.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-nimbus, coriolis-metis, doxygen, boost }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-mauka";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../mauka;
 
   buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
     coriolis-metis
   ];
diff --git a/nix/metis.nix b/nix/metis.nix
index 45cdc558..5a7c1f15 100644
--- a/nix/metis.nix
+++ b/nix/metis.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-nimbus, doxygen, boost }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-metis";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../metis;
 
   buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
   ];
   nativeBuildInputs = [ cmake ninja doxygen ];
diff --git a/nix/nimbus.nix b/nix/nimbus.nix
index bc2b4c74..03d6c71c 100644
--- a/nix/nimbus.nix
+++ b/nix/nimbus.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , doxygen, boost }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-nimbus";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../nimbus;
 
   buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd
+    python3 coriolis-bootstrap coriolis-vlsisapd
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
   ];
   nativeBuildInputs = [ cmake ninja doxygen ];
diff --git a/nix/oroshi.nix b/nix/oroshi.nix
index 685ca9f8..2766b0ab 100644
--- a/nix/oroshi.nix
+++ b/nix/oroshi.nix
@@ -1,16 +1,16 @@
 { generic, ... }:
 
 let pkg =
-  { qt4, coriolis-crlcore, doxygen, lib, python2Packages
+  { qt4, coriolis-crlcore, doxygen, lib, python3Packages
   , coriolis-vlsisapd, coriolis-hurricane }:
   {
     name = "oroshi";
     src = ../oroshi;
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd qt4 python2Packages.pyqt4
+      coriolis-vlsisapd qt4 python3Packages.pyqt4
       coriolis-crlcore coriolis-hurricane qt4
-      python2Packages.numpy
+      python3Packages.numpy
     ];
     nativeBuildInputs = [ doxygen ];
 
diff --git a/nix/solstice.nix b/nix/solstice.nix
index f33433b0..77d11c03 100644
--- a/nix/solstice.nix
+++ b/nix/solstice.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
+{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-equinox, boost }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-solstice";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../solstice;
 
   buildInputs = [
-    python2 coriolis-bootstrap coriolis-vlsisapd
+    python3 coriolis-bootstrap coriolis-vlsisapd
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
     coriolis-equinox
   ];
diff --git a/nix/stratus1.nix b/nix/stratus1.nix
index 8915752a..21916a70 100644
--- a/nix/stratus1.nix
+++ b/nix/stratus1.nix
@@ -2,7 +2,7 @@
 
 let pkg =
   { lib, coriolis-crlcore, coriolis-vlsisapd, coriolis-hurricane
-  , python2Packages, coriolis-cumulus }:
+  , python3Packages, coriolis-cumulus }:
   {
     name = "coriolis-stratus1";
     src = ../stratus1;
@@ -11,8 +11,8 @@ let pkg =
       coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-cumulus
     ];
     postInstall = ''
-      ln -s -t $out/${python2Packages.python.sitePackages} \
-        $out/${python2Packages.python.sitePackages}/stratus/*
+      ln -s -t $out/${python3Packages.python.sitePackages} \
+        $out/${python3Packages.python.sitePackages}/stratus/*
     '';
     pythonImportsCheck = [ "stratus" "patterns" "patread" "synopsys" "utils" "util" ];
 
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 39637ae5..39358c62 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -6,7 +6,7 @@ let pkg =
   , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
   , coriolis-lefdef, coriolis-knik, coriolis-kite
   , coriolis-katabatic, coriolis-etesian, coriolis-equinox
-  , coriolis-solstice, libxml2, doxygen, python2Packages }:
+  , coriolis-solstice, libxml2, doxygen, python3Packages }:
   {
     name = "unicorn";
     src = ../unicorn;
@@ -18,7 +18,7 @@ let pkg =
       coriolis-katabatic coriolis-etesian coriolis-equinox
       coriolis-solstice coriolis-bora coriolis-tutorial
     ];
-    nativeBuildInputs = [ doxygen python2Packages.wrapPython ];
+    nativeBuildInputs = [ doxygen python3Packages.wrapPython ];
     pythonImportsCheck = [ "Unicorn" ];
 
     postFixup = ''
diff --git a/nix/unittests.nix b/nix/unittests.nix
index 903f582a..5a04b171 100644
--- a/nix/unittests.nix
+++ b/nix/unittests.nix
@@ -1,10 +1,10 @@
 { version, meta }:
 
-{ lib, stdenv, cmake, ninja, python2, boost
+{ lib, stdenv, cmake, ninja, python3, boost
 , coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
 , coriolis-crlcore, coriolis-lefdef, qt4 }:
 
-let boostWithPython = boost.override { enablePython = true; python = python2; }; in
+let boostWithPython = boost.override { enablePython = true; python = python3; }; in
 
 stdenv.mkDerivation {
   pname = "coriolis-unittests";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../unittests;
 
   buildInputs = [
-    python2 boostWithPython coriolis-bootstrap qt4
+    python3 boostWithPython coriolis-bootstrap qt4
     coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
     coriolis-lefdef
   ];

From b02c387ed5ff921fe6947f6e455d1ca4ca335ae7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 21:35:18 +0000
Subject: [PATCH 90/94] nix: Remove dependencies on vlsisapd

---
 nix/anabatic.nix  | 4 ++--
 nix/bora.nix      | 4 ++--
 nix/combined.nix  | 4 ++--
 nix/crlcore.nix   | 4 ++--
 nix/cumulus.nix   | 4 ++--
 nix/equinox.nix   | 4 ++--
 nix/etesian.nix   | 4 ++--
 nix/flute.nix     | 4 ++--
 nix/hurricane.nix | 6 +++---
 nix/ispd.nix      | 4 ++--
 nix/karakaze.nix  | 4 ++--
 nix/katabatic.nix | 4 ++--
 nix/katana.nix    | 4 ++--
 nix/kite.nix      | 4 ++--
 nix/knik.nix      | 4 ++--
 nix/mauka.nix     | 4 ++--
 nix/metis.nix     | 4 ++--
 nix/nimbus.nix    | 4 ++--
 nix/oroshi.nix    | 4 ++--
 nix/solstice.nix  | 4 ++--
 nix/stratus1.nix  | 4 ++--
 nix/tutorial.nix  | 4 ++--
 nix/unicorn.nix   | 4 ++--
 nix/unittests.nix | 4 ++--
 24 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/nix/anabatic.nix b/nix/anabatic.nix
index 52f802b1..f8b171b6 100644
--- a/nix/anabatic.nix
+++ b/nix/anabatic.nix
@@ -1,13 +1,13 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, lib, coriolis-coloquinte, coriolis-vlsisapd
+  { doxygen, qt4, lib, coriolis-coloquinte
   , coriolis-hurricane, coriolis-crlcore
   , coriolis-flute, coriolis-etesian }:
   {
     name = "anabatic";
     src = ../anabatic;
     buildInputs = [
-      qt4 coriolis-coloquinte coriolis-vlsisapd
+      qt4 coriolis-coloquinte
       coriolis-hurricane coriolis-crlcore
       coriolis-flute coriolis-etesian
     ];
diff --git a/nix/bora.nix b/nix/bora.nix
index f17334fa..17760915 100644
--- a/nix/bora.nix
+++ b/nix/bora.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-katana
   , coriolis-flute, coriolis-anabatic
   , coriolis-lefdef, qwt6_qt4, doxygen }:
@@ -9,7 +9,7 @@ let pkg =
     name = "bora";
     src = ../bora;
     buildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-katana qt4 coriolis-flute coriolis-anabatic
       coriolis-lefdef qwt6_qt4
     ];
diff --git a/nix/combined.nix b/nix/combined.nix
index 9d3a038a..44f7261b 100644
--- a/nix/combined.nix
+++ b/nix/combined.nix
@@ -1,7 +1,7 @@
 { version, meta, ... }:
 
 { buildEnv
-, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
+, coriolis-hurricane, coriolis-crlcore
 , coriolis-anabatic, coriolis-katana, coriolis-bora
 , coriolis-katabatic, coriolis-kite, coriolis-tutorial
 , coriolis-unicorn, coriolis-oroshi, coriolis-cumulus
@@ -18,7 +18,7 @@ buildEnv {
     coriolis-etesian coriolis-anabatic coriolis-katana
     coriolis-bora coriolis-katabatic coriolis-kite
     coriolis-tutorial coriolis-unicorn coriolis-oroshi
-    coriolis-cumulus coriolis-lefdef coriolis-vlsisapd
+    coriolis-cumulus coriolis-lefdef
     coriolis-coloquinte coriolis-equinox coriolis-knik
     coriolis-karakaze coriolis-solstice coriolis-stratus1
   ];
diff --git a/nix/crlcore.nix b/nix/crlcore.nix
index c0e18e5c..433ec9c4 100644
--- a/nix/crlcore.nix
+++ b/nix/crlcore.nix
@@ -1,11 +1,11 @@
 { generic, ... }:
 let pkg =
-  { lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
+  { lib, libxml2, qt4, bison, flex, doxygen
   , coriolis-lefdef, coriolis-hurricane, python3Packages }:
   rec {
     name = "crlcore";
     src = ../crlcore;
-    propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python3Packages.pyqt4 ];
+    propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-hurricane python3Packages.pyqt4 ];
     nativeBuildInputs = [ bison flex doxygen python3Packages.pyqt4 ];
     postInstall = ''
       ln -s crlcore/helpers $out/${python3Packages.python.sitePackages}/helpers
diff --git a/nix/cumulus.nix b/nix/cumulus.nix
index 7e4aae4f..b0b8f76d 100644
--- a/nix/cumulus.nix
+++ b/nix/cumulus.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
+  { lib, coriolis-hurricane, coriolis-crlcore
   , coriolis-etesian, coriolis-anabatic, coriolis-katana
   , coriolis-unicorn, python3Packages }:
   {
@@ -18,7 +18,7 @@ let pkg =
     '';
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-etesian coriolis-anabatic coriolis-katana
       coriolis-unicorn
     ];
diff --git a/nix/equinox.nix b/nix/equinox.nix
index f7946a18..b6fe65a0 100644
--- a/nix/equinox.nix
+++ b/nix/equinox.nix
@@ -1,7 +1,7 @@
 { version, meta, ... }:
 
 { lib, stdenv, cmake, ninja, python3, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-crlcore, qt4 }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   buildInputs = [
     python3 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-hurricane coriolis-crlcore
     qt4
   ];
   nativeBuildInputs = [ cmake ninja ];
diff --git a/nix/etesian.nix b/nix/etesian.nix
index 1e7c12b7..5fc272e7 100644
--- a/nix/etesian.nix
+++ b/nix/etesian.nix
@@ -1,12 +1,12 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, coriolis-coloquinte, coriolis-vlsisapd, coriolis-hurricane
+  { doxygen, qt4, coriolis-coloquinte, coriolis-hurricane
   , lib, coriolis-crlcore }:
   {
     name = "etesian";
     src = ../etesian;
     buildInputs = [
-      qt4 coriolis-coloquinte coriolis-vlsisapd
+      qt4 coriolis-coloquinte
       coriolis-hurricane coriolis-crlcore
     ];
     propagatedBuildInputs = [
diff --git a/nix/flute.nix b/nix/flute.nix
index 604cc3fc..aadb26f5 100644
--- a/nix/flute.nix
+++ b/nix/flute.nix
@@ -1,10 +1,10 @@
 { generic, ... }:
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore }:
+  { lib, coriolis-hurricane, coriolis-crlcore }:
   {
     name = "flute";
     src = ../flute;
-    buildInputs = [ coriolis-vlsisapd coriolis-hurricane coriolis-crlcore ];
+    buildInputs = [ coriolis-hurricane coriolis-crlcore ];
     nativeBuildInputs = [ ];
     pythonImportsCheck = [ "Flute" ];
     meta.license = lib.licenses.gpl2Plus;
diff --git a/nix/hurricane.nix b/nix/hurricane.nix
index 9ce5ab67..6626d244 100644
--- a/nix/hurricane.nix
+++ b/nix/hurricane.nix
@@ -1,13 +1,13 @@
 { version, meta, generic, ... }:
 
 let pkg =
-  { lib, libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen, coriolis-vlsisapd }:
+  { lib, libxml2, bzip2, rapidjson, qt4, bison, flex, doxygen }:
   {
     name = "hurricane";
     src = ../hurricane;
-    buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ];
+    buildInputs = [ libxml2 qt4 bzip2 rapidjson ];
     nativeBuildInputs = [ bison flex doxygen ];
-    pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg2" "Analog" ];
+    pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg" "Analog" ];
     meta.license = lib.licenses.lgpl3Plus;
   };
 in generic pkg
diff --git a/nix/ispd.nix b/nix/ispd.nix
index 11bc92f8..c5a8aea4 100644
--- a/nix/ispd.nix
+++ b/nix/ispd.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-crlcore, coriolis-flute, coriolis-knik
 , coriolis-lefdef, coriolis-katabatic, libxml2, qt4 }:
 
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
 
   buildInputs = [
     python3 boostWithPython coriolis-bootstrap libxml2
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-hurricane coriolis-crlcore
     coriolis-flute coriolis-knik coriolis-lefdef
     coriolis-katabatic qt4
   ];
diff --git a/nix/karakaze.nix b/nix/karakaze.nix
index cdc24186..601c9fb4 100644
--- a/nix/karakaze.nix
+++ b/nix/karakaze.nix
@@ -2,13 +2,13 @@
 
 let pkg =
   { lib, coriolis-crlcore, coriolis-bora, coriolis-katana, coriolis-anabatic
-  , coriolis-vlsisapd, coriolis-hurricane }:
+  , coriolis-hurricane }:
   {
     name = "coriolis-karakaze";
     src = ../karakaze;
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-katana
+      coriolis-crlcore coriolis-hurricane coriolis-katana
       coriolis-bora coriolis-anabatic
     ];
     postInstall = ''
diff --git a/nix/katabatic.nix b/nix/katabatic.nix
index 0da14e5e..de17085c 100644
--- a/nix/katabatic.nix
+++ b/nix/katabatic.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-hurricane
   , coriolis-crlcore, coriolis-flute, coriolis-knik
   , qt4, doxygen }:
   {
@@ -9,7 +9,7 @@ let pkg =
     src = ../katabatic;
 
     buildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-flute coriolis-knik qt4
     ];
     nativeBuildInputs = [ doxygen ];
diff --git a/nix/katana.nix b/nix/katana.nix
index 3f2bc638..d770c203 100644
--- a/nix/katana.nix
+++ b/nix/katana.nix
@@ -1,6 +1,6 @@
 { generic, ... }:
 let pkg =
-  { doxygen, qt4, lib, coriolis-coloquinte, coriolis-vlsisapd
+  { doxygen, qt4, lib, coriolis-coloquinte
   , coriolis-hurricane, coriolis-crlcore, libxml2
   , coriolis-flute, coriolis-etesian, coriolis-lefdef
   , coriolis-anabatic }:
@@ -8,7 +8,7 @@ let pkg =
     name = "katana";
     src = ../katana;
     buildInputs = [
-      qt4 coriolis-coloquinte coriolis-vlsisapd
+      qt4 coriolis-coloquinte
       coriolis-hurricane coriolis-crlcore
       coriolis-flute coriolis-etesian libxml2
       coriolis-lefdef coriolis-anabatic
diff --git a/nix/kite.nix b/nix/kite.nix
index a06191ed..7a5b1122 100644
--- a/nix/kite.nix
+++ b/nix/kite.nix
@@ -2,13 +2,13 @@
 
 let pkg =
   { lib, coriolis-lefdef, coriolis-knik, coriolis-katabatic
-  , coriolis-vlsisapd, coriolis-hurricane
+  , coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-flute, libxml2, doxygen }:
   {
     name = "kite";
     src = ../kite;
     buildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-katabatic qt4 coriolis-flute coriolis-knik libxml2
       coriolis-lefdef
     ];
diff --git a/nix/knik.nix b/nix/knik.nix
index 8bc35b29..f0c2abf4 100644
--- a/nix/knik.nix
+++ b/nix/knik.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-crlcore, coriolis-flute, qt4 }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   buildInputs = [
     python3 boostWithPython coriolis-bootstrap
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-hurricane coriolis-crlcore
     coriolis-flute qt4
   ];
   nativeBuildInputs = [ cmake ninja ];
diff --git a/nix/mauka.nix b/nix/mauka.nix
index 0c30a542..e1af01b3 100644
--- a/nix/mauka.nix
+++ b/nix/mauka.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-nimbus, coriolis-metis, doxygen, boost }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../mauka;
 
   buildInputs = [
-    python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    python3 coriolis-bootstrap coriolis-nimbus
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
     coriolis-metis
   ];
diff --git a/nix/metis.nix b/nix/metis.nix
index 5a7c1f15..3e2dedf7 100644
--- a/nix/metis.nix
+++ b/nix/metis.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-nimbus, doxygen, boost }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../metis;
 
   buildInputs = [
-    python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
+    python3 coriolis-bootstrap coriolis-nimbus
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
   ];
   nativeBuildInputs = [ cmake ninja doxygen ];
diff --git a/nix/nimbus.nix b/nix/nimbus.nix
index 03d6c71c..a2ab4abb 100644
--- a/nix/nimbus.nix
+++ b/nix/nimbus.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , doxygen, boost }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../nimbus;
 
   buildInputs = [
-    python3 coriolis-bootstrap coriolis-vlsisapd
+    python3 coriolis-bootstrap
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
   ];
   nativeBuildInputs = [ cmake ninja doxygen ];
diff --git a/nix/oroshi.nix b/nix/oroshi.nix
index 2766b0ab..35a2713e 100644
--- a/nix/oroshi.nix
+++ b/nix/oroshi.nix
@@ -2,13 +2,13 @@
 
 let pkg =
   { qt4, coriolis-crlcore, doxygen, lib, python3Packages
-  , coriolis-vlsisapd, coriolis-hurricane }:
+  , coriolis-hurricane }:
   {
     name = "oroshi";
     src = ../oroshi;
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd qt4 python3Packages.pyqt4
+      qt4 python3Packages.pyqt4
       coriolis-crlcore coriolis-hurricane qt4
       python3Packages.numpy
     ];
diff --git a/nix/solstice.nix b/nix/solstice.nix
index 77d11c03..d5c28b31 100644
--- a/nix/solstice.nix
+++ b/nix/solstice.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-equinox, boost }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   src = ../solstice;
 
   buildInputs = [
-    python3 coriolis-bootstrap coriolis-vlsisapd
+    python3 coriolis-bootstrap
     coriolis-crlcore coriolis-hurricane qt4 boostWithPython
     coriolis-equinox
   ];
diff --git a/nix/stratus1.nix b/nix/stratus1.nix
index 21916a70..7cee0ea4 100644
--- a/nix/stratus1.nix
+++ b/nix/stratus1.nix
@@ -1,14 +1,14 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-crlcore, coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-crlcore, coriolis-hurricane
   , python3Packages, coriolis-cumulus }:
   {
     name = "coriolis-stratus1";
     src = ../stratus1;
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-cumulus
+      coriolis-crlcore coriolis-hurricane coriolis-cumulus
     ];
     postInstall = ''
       ln -s -t $out/${python3Packages.python.sitePackages} \
diff --git a/nix/tutorial.nix b/nix/tutorial.nix
index 265d879f..961153f0 100644
--- a/nix/tutorial.nix
+++ b/nix/tutorial.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane
+  { lib, coriolis-hurricane
   , coriolis-crlcore, qt4, coriolis-lefdef, libxml2
   , doxygen }:
   {
@@ -9,7 +9,7 @@ let pkg =
     src = ../tutorial;
 
     buildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-lefdef libxml2 qt4
     ];
     nativeBuildInputs = [ doxygen ];
diff --git a/nix/unicorn.nix b/nix/unicorn.nix
index 39358c62..384cdf5c 100644
--- a/nix/unicorn.nix
+++ b/nix/unicorn.nix
@@ -1,7 +1,7 @@
 { generic, ... }:
 
 let pkg =
-  { lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-tutorial
+  { lib, coriolis-hurricane, coriolis-tutorial
   , coriolis-crlcore, qt4, coriolis-katana, coriolis-bora
   , coriolis-flute, coriolis-anabatic, coriolis-coloquinte
   , coriolis-lefdef, coriolis-knik, coriolis-kite
@@ -12,7 +12,7 @@ let pkg =
     src = ../unicorn;
 
     propagatedBuildInputs = [
-      coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+      coriolis-hurricane coriolis-crlcore
       coriolis-katana qt4 coriolis-flute coriolis-anabatic
       coriolis-lefdef libxml2 coriolis-knik coriolis-kite
       coriolis-katabatic coriolis-etesian coriolis-equinox
diff --git a/nix/unittests.nix b/nix/unittests.nix
index 5a04b171..2c25150c 100644
--- a/nix/unittests.nix
+++ b/nix/unittests.nix
@@ -1,7 +1,7 @@
 { version, meta }:
 
 { lib, stdenv, cmake, ninja, python3, boost
-, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
+, coriolis-bootstrap, coriolis-hurricane
 , coriolis-crlcore, coriolis-lefdef, qt4 }:
 
 let boostWithPython = boost.override { enablePython = true; python = python3; }; in
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   buildInputs = [
     python3 boostWithPython coriolis-bootstrap qt4
-    coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
+    coriolis-hurricane coriolis-crlcore
     coriolis-lefdef
   ];
   nativeBuildInputs = [ cmake ninja ];

From fda334e527e3c3d3269390796f5cbd68b32d2c84 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 22:11:04 +0000
Subject: [PATCH 91/94] nix: Disable tests temporarily

---
 nix/generic.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nix/generic.nix b/nix/generic.nix
index da733eac..741138bd 100644
--- a/nix/generic.nix
+++ b/nix/generic.nix
@@ -33,7 +33,8 @@ let
 
           meta = meta' // meta;
 
-          inherit version pythonImportsCheck;
+          # FIXME: inherit pythonImportsCheck;
+          inherit version;
         } // args);
       in continuation (python3Packages.toPythonModule drv);
     in self;

From 3072c548cd77f52df3c9b308194e4d8c4d3fec58 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 22:11:27 +0000
Subject: [PATCH 92/94] Ignore /result (from nix-build)

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 37f78573..8501fb43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,4 @@ documentation/RDS/RDS.toc
 cumulus/src/plugins/CoreToChip_c35b4.py
 cumulus/src/plugins/core2chip/c35b4.py
 
+/result*

From 0f66968a9c23674028a971b4f0ab8e6bd24566c9 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 22:27:24 +0000
Subject: [PATCH 93/94] nix: add compatibility files

---
 compat.nix       | 4 ++++
 default.nix      | 1 +
 flake.nix        | 2 +-
 nix/vlsisapd.nix | 1 +
 shell.nix        | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 compat.nix
 create mode 100644 default.nix
 create mode 100644 shell.nix

diff --git a/compat.nix b/compat.nix
new file mode 100644
index 00000000..180eec54
--- /dev/null
+++ b/compat.nix
@@ -0,0 +1,4 @@
+import (builtins.fetchTarball {
+  url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
+  sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5";
+})
diff --git a/default.nix b/default.nix
new file mode 100644
index 00000000..aeca3bce
--- /dev/null
+++ b/default.nix
@@ -0,0 +1 @@
+(import ./compat.nix { src = ./.; }).defaultNix
diff --git a/flake.nix b/flake.nix
index 1ed127e3..15e25d50 100644
--- a/flake.nix
+++ b/flake.nix
@@ -59,7 +59,7 @@
       generic = import ./nix/generic.nix { inherit version meta; };
 
       pythonComponents = [
-        "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
+        "hurricane" "crlcore" "flute" "etesian"
         "anabatic" "katana" "bora" "katabatic" "kite"
         "tutorial" "unicorn" "oroshi" "cumulus"
       ];
diff --git a/nix/vlsisapd.nix b/nix/vlsisapd.nix
index c01f5725..b3ba3326 100644
--- a/nix/vlsisapd.nix
+++ b/nix/vlsisapd.nix
@@ -9,5 +9,6 @@ let pkg =
     pythonImportsCheck = [ "SPICE" "LIBERTY" "DTR" "Cfg" "CIF" "AGDS" ];
 
     meta.license = lib.licenses.gpl2Plus;
+    meta.broken = true;
   };
 in generic pkg
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 00000000..9cb2616a
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1 @@
+(import ./compat.nix { src = ./.; }).shellNix

From abfc63558e008fbf7ae09cab26a9b43dbde3bbc7 Mon Sep 17 00:00:00 2001
From: Las Safin <me@las.rs>
Date: Tue, 26 Oct 2021 22:59:27 +0000
Subject: [PATCH 94/94] nix: Remove unnecessary `ln` from libresoc test

---
 nix/libresoc.nix | 1 -
 1 file changed, 1 deletion(-)

diff --git a/nix/libresoc.nix b/nix/libresoc.nix
index 7450f78a..c9310736 100644
--- a/nix/libresoc.nix
+++ b/nix/libresoc.nix
@@ -71,7 +71,6 @@ stdenv.mkDerivation rec {
     ln -s ${libresoc_logo} libresoc_logo.gds
 
     ./mksym.sh
-    ln -s ${alliance-check-toolkit}/etc/mk/users.d/user-${USER}.mk mk/users.d/user-${USER}.mk
     ./build_full_4ksram.sh
     runHook postBuild
   '';