From 7661abe6e1ba8dbfdaa7c174109b431d2132d211 Mon Sep 17 00:00:00 2001 From: Las Safin Date: Sun, 29 Aug 2021 18:25:21 +0000 Subject: [PATCH] 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"