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; };
# not generic: solstice lefdef equinox knik coloquinte bootstrap
pythonComponents = [
"vlsisapd" "hurricane" "crlcore" "flute" "etesian"
"anabatic" "katana" "bora" "katabatic" "kite"

View File

@ -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

View File

@ -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:

View File

@ -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