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: