From a3a738c0ffc8743112b4bef1bfcfd512a1aaff9d Mon Sep 17 00:00:00 2001 From: Las Safin Date: Fri, 3 Sep 2021 12:50:39 +0000 Subject: [PATCH] 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