Try to get Qt support to work

This commit is contained in:
Las Safin 2021-08-31 19:06:30 +00:00
parent c5fdafbf53
commit 2f11506dbf
No known key found for this signature in database
GPG Key ID: E7FA928911B61ED6
4 changed files with 40 additions and 37 deletions

View File

@ -36,8 +36,6 @@
generic = import ./nix/generic.nix { inherit version meta; }; generic = import ./nix/generic.nix { inherit version meta; };
# not generic: solstice lefdef equinox knik coloquinte bootstrap
pythonComponents = [ pythonComponents = [
"vlsisapd" "hurricane" "crlcore" "flute" "etesian" "vlsisapd" "hurricane" "crlcore" "flute" "etesian"
"anabatic" "katana" "bora" "katabatic" "kite" "anabatic" "katana" "bora" "katabatic" "kite"

View File

@ -1,20 +1,19 @@
{ generic, ... }: { generic, ... }:
let pkg = let pkg =
{ libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd { lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
, coriolis-lefdef, coriolis-hurricane, python2Packages }: , coriolis-lefdef, coriolis-hurricane, python2Packages }:
{ {
name = "crlcore"; name = "crlcore";
src = ../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 ]; nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
pythonImportsCheck = [ pythonImportsCheck = [
"CRL" "Constant" "helpers.io" "helpers.technology" "CRL" "Constant" "helpers.io" "helpers.technology"
"helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay" "helpers.utils" "helpers.analogtechno" "helpers" "helpers.overlay"
]; ];
continuation = drv: drv.overrideAttrs (o: { postInstall = ''
postInstall = (o.postInstall or "") + '' ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers '';
''; meta.license = lib.licenses.gpl2Plus;
});
}; };
in generic pkg in generic pkg

View File

@ -1,35 +1,41 @@
{ version, meta }: { version, meta }:
let f = let
{ lib, stdenv, cmake, ninja, boost meta' = meta;
, coriolis-bootstrap, python2Packages }: f =
{ name { lib, stdenv, cmake, ninja, boost
, src , coriolis-bootstrap, python2Packages }:
, buildInputs ? [] let self =
, nativeBuildInputs ? [] { name
, propagatedBuildInputs ? [] , buildInputs ? []
, pythonImportsCheck , nativeBuildInputs ? []
, continuation ? (x: x) , meta ? {}
}: , pythonImportsCheck
let , continuation ? (x: x)
boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; }; , ...
drv = stdenv.mkDerivation { }@args':
pname = "coriolis-${name}"; 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; buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
nativeBuildInputs = [ nativeBuildInputs = [
coriolis-bootstrap cmake ninja coriolis-bootstrap cmake ninja
python2Packages.pythonImportsCheckHook python2Packages.pythonImportsCheckHook
] ++ nativeBuildInputs; ] ++ nativeBuildInputs;
inherit propagatedBuildInputs;
preInstall = '' preInstall = ''
export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH" export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
''; '';
inherit version meta src pythonImportsCheck; meta = meta // meta';
};
in continuation (python2Packages.toPythonModule drv); inherit version pythonImportsCheck;
} // args);
in continuation (python2Packages.toPythonModule drv);
in self;
in in
pkg: pkg:

View File

@ -8,6 +8,6 @@ let pkg =
buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ]; buildInputs = [ libxml2 qt4 bzip2 rapidjson coriolis-vlsisapd ];
nativeBuildInputs = [ bison flex doxygen ]; nativeBuildInputs = [ bison flex doxygen ];
pythonImportsCheck = [ "Viewer" "Hurricane" "Cfg2" "Analog" ]; 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 in generic pkg