nix: Use Python 3
This commit is contained in:
parent
2467580396
commit
af95f9f671
|
@ -187,7 +187,7 @@
|
|||
else(ARGC LESS 1)
|
||||
foreach(component ${ARGV})
|
||||
if(${component} STREQUAL "python")
|
||||
set(components ${components} ${component}27)
|
||||
set(components ${components} ${component}39)
|
||||
else()
|
||||
set(components ${components} ${component})
|
||||
endif()
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
};
|
||||
|
||||
pythonOverlay = self: super: {
|
||||
python2Packages = super.python2Packages.override {
|
||||
python3Packages = super.python3Packages.override {
|
||||
overrides = pself: psuper: {
|
||||
pyqt4 = psuper.pyqt4.overridePythonAttrs (o: rec {
|
||||
version = "4.12.1";
|
||||
|
@ -39,7 +39,7 @@
|
|||
url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz";
|
||||
sha256 = "RdckRhrliwGbm+lQdsoH4hLrcwhK7JEluyVIJcOgU4M=";
|
||||
};
|
||||
pythonImportsCheck = [ "PyQt4.QtCore" "PyQt4.QtGui" ];
|
||||
pythonImportsCheck = (o.pythonImportsCheck or []) ++ [ "PyQt4.QtCore" "PyQt4.QtGui" ];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -113,7 +113,7 @@
|
|||
devShell = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
env = pkgs.python2.buildEnv.override {
|
||||
env = pkgs.python3.buildEnv.override {
|
||||
extraLibs = builtins.map (x: pkgs.${"coriolis-${x}"}) pythonComponents;
|
||||
};
|
||||
in pkgs.mkShell {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ alliance-check-toolkit }:
|
||||
|
||||
{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
|
||||
, python2Packages, alliance, yosys }:
|
||||
, python3Packages, alliance, yosys }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "alliance-check-toolkit";
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, python2, cmake, ninja }:
|
||||
{ lib, stdenv, python3, cmake, ninja }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-bootstrap";
|
||||
|
||||
src = ../bootstrap;
|
||||
|
||||
buildInputs = [ python2 ];
|
||||
buildInputs = [ python3 ];
|
||||
nativeBuildInputs = [ cmake ninja ];
|
||||
|
||||
inherit version;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, python2, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
|
||||
{ lib, stdenv, python3, cmake, boost, qt4, ninja, coriolis-bootstrap, doxygen }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-coloquinte";
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{ generic, ... }:
|
||||
let pkg =
|
||||
{ lib, libxml2, qt4, bison, flex, doxygen, coriolis-vlsisapd
|
||||
, coriolis-lefdef, coriolis-hurricane, python2Packages }:
|
||||
, coriolis-lefdef, coriolis-hurricane, python3Packages }:
|
||||
rec {
|
||||
name = "crlcore";
|
||||
src = ../crlcore;
|
||||
propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python2Packages.pyqt4 ];
|
||||
nativeBuildInputs = [ bison flex doxygen python2Packages.pyqt4 ];
|
||||
propagatedBuildInputs = [ libxml2 qt4 coriolis-lefdef coriolis-vlsisapd coriolis-hurricane python3Packages.pyqt4 ];
|
||||
nativeBuildInputs = [ bison flex doxygen python3Packages.pyqt4 ];
|
||||
postInstall = ''
|
||||
ln -s crlcore/helpers $out/${python2Packages.python.sitePackages}/helpers
|
||||
ln -s -t $out/${python2Packages.python.sitePackages} $out/etc/coriolis2/*
|
||||
ln -s crlcore/helpers $out/${python3Packages.python.sitePackages}/helpers
|
||||
ln -s -t $out/${python3Packages.python.sitePackages} $out/etc/coriolis2/*
|
||||
|
||||
# for import check
|
||||
mkdir -p /build/coriolistop/etc/coriolis2
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
let pkg =
|
||||
{ lib, coriolis-vlsisapd, coriolis-hurricane, coriolis-crlcore
|
||||
, coriolis-etesian, coriolis-anabatic, coriolis-katana
|
||||
, coriolis-unicorn, python2Packages }:
|
||||
, coriolis-unicorn, python3Packages }:
|
||||
{
|
||||
name = "cumulus";
|
||||
|
||||
src = ../cumulus;
|
||||
|
||||
postInstall = ''
|
||||
ln -s -t $out/${python2Packages.python.sitePackages} $out/${python2Packages.python.sitePackages}/cumulus/*
|
||||
ln -s -t $out/${python3Packages.python.sitePackages} $out/${python3Packages.python.sitePackages}/cumulus/*
|
||||
|
||||
# for import check
|
||||
mkdir -p /build/coriolistop/etc/coriolis2
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta, ... }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, boost
|
||||
{ lib, stdenv, cmake, ninja, python3, boost
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-crlcore, qt4 }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-equinox";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../equinox;
|
||||
|
||||
buildInputs = [
|
||||
python2 boostWithPython coriolis-bootstrap
|
||||
python3 boostWithPython coriolis-bootstrap
|
||||
coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
|
||||
qt4
|
||||
];
|
||||
|
|
|
@ -4,7 +4,7 @@ let
|
|||
meta' = meta;
|
||||
f =
|
||||
{ lib, stdenv, cmake, ninja, boost
|
||||
, coriolis-bootstrap, python2Packages }:
|
||||
, coriolis-bootstrap, python3Packages }:
|
||||
let self =
|
||||
{ name
|
||||
, buildInputs ? []
|
||||
|
@ -17,25 +17,25 @@ let
|
|||
}@args':
|
||||
let
|
||||
args = builtins.removeAttrs args' (builtins.attrNames (builtins.functionArgs self));
|
||||
boostWithPython = boost.override { enablePython = true; inherit (python2Packages) python; };
|
||||
boostWithPython = boost.override { enablePython = true; inherit (python3Packages) python; };
|
||||
drv = stdenv.mkDerivation ({
|
||||
pname = "coriolis-${name}";
|
||||
|
||||
buildInputs = [ python2Packages.python boostWithPython ] ++ buildInputs;
|
||||
buildInputs = [ python3Packages.python boostWithPython ] ++ buildInputs;
|
||||
nativeBuildInputs = [
|
||||
coriolis-bootstrap cmake ninja
|
||||
python2Packages.pythonImportsCheckHook
|
||||
python3Packages.pythonImportsCheckHook
|
||||
] ++ nativeBuildInputs;
|
||||
|
||||
postInstall = postInstall + ''
|
||||
export PYTHONPATH="$out/${python2Packages.python.sitePackages}:$PYTHONPATH"
|
||||
export PYTHONPATH="$out/${python3Packages.python.sitePackages}:$PYTHONPATH"
|
||||
'';
|
||||
|
||||
meta = meta' // meta;
|
||||
|
||||
inherit version pythonImportsCheck;
|
||||
} // args);
|
||||
in continuation (python2Packages.toPythonModule drv);
|
||||
in continuation (python3Packages.toPythonModule drv);
|
||||
in self;
|
||||
in
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, boost
|
||||
{ lib, stdenv, cmake, ninja, python3, boost
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-crlcore, coriolis-flute, coriolis-knik
|
||||
, coriolis-lefdef, coriolis-katabatic, libxml2, qt4 }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-ispd";
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
|||
src = ../ispd;
|
||||
|
||||
buildInputs = [
|
||||
python2 boostWithPython coriolis-bootstrap libxml2
|
||||
python3 boostWithPython coriolis-bootstrap libxml2
|
||||
coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
|
||||
coriolis-flute coriolis-knik coriolis-lefdef
|
||||
coriolis-katabatic qt4
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, boost
|
||||
{ lib, stdenv, cmake, ninja, python3, boost
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-crlcore, coriolis-flute, qt4 }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-knik";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../knik;
|
||||
|
||||
buildInputs = [
|
||||
python2 boostWithPython coriolis-bootstrap
|
||||
python3 boostWithPython coriolis-bootstrap
|
||||
coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
|
||||
coriolis-flute qt4
|
||||
];
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, python2, cmake, boost, bison, flex
|
||||
{ lib, stdenv, python3, cmake, boost, bison, flex
|
||||
, libxml2, zlib, ninja, coriolis-bootstrap }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-lefdef";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
buildInputs = [ python2 boostWithPython coriolis-bootstrap bison flex zlib ];
|
||||
buildInputs = [ python3 boostWithPython coriolis-bootstrap bison flex zlib ];
|
||||
nativeBuildInputs = [ cmake ninja ];
|
||||
|
||||
inherit version;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ alliance-check-toolkit, soclayout, pinmux, ... }:
|
||||
|
||||
{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus, fetchurl
|
||||
, python2Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
|
||||
, python3Packages, alliance, yosys, writeShellScriptBin, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
C4MLogo = fetchurl {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
|
||||
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-nimbus, coriolis-metis, doxygen, boost }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-mauka";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../mauka;
|
||||
|
||||
buildInputs = [
|
||||
python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
|
||||
python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
|
||||
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
|
||||
coriolis-metis
|
||||
];
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
|
||||
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-nimbus, doxygen, boost }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-metis";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../metis;
|
||||
|
||||
buildInputs = [
|
||||
python2 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
|
||||
python3 coriolis-bootstrap coriolis-vlsisapd coriolis-nimbus
|
||||
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
|
||||
];
|
||||
nativeBuildInputs = [ cmake ninja doxygen ];
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
|
||||
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, doxygen, boost }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-nimbus";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../nimbus;
|
||||
|
||||
buildInputs = [
|
||||
python2 coriolis-bootstrap coriolis-vlsisapd
|
||||
python3 coriolis-bootstrap coriolis-vlsisapd
|
||||
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
|
||||
];
|
||||
nativeBuildInputs = [ cmake ninja doxygen ];
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ generic, ... }:
|
||||
|
||||
let pkg =
|
||||
{ qt4, coriolis-crlcore, doxygen, lib, python2Packages
|
||||
{ qt4, coriolis-crlcore, doxygen, lib, python3Packages
|
||||
, coriolis-vlsisapd, coriolis-hurricane }:
|
||||
{
|
||||
name = "oroshi";
|
||||
src = ../oroshi;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
coriolis-vlsisapd qt4 python2Packages.pyqt4
|
||||
coriolis-vlsisapd qt4 python3Packages.pyqt4
|
||||
coriolis-crlcore coriolis-hurricane qt4
|
||||
python2Packages.numpy
|
||||
python3Packages.numpy
|
||||
];
|
||||
nativeBuildInputs = [ doxygen ];
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, qt4, coriolis-crlcore
|
||||
{ lib, stdenv, cmake, ninja, python3, qt4, coriolis-crlcore
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-equinox, boost }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-solstice";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../solstice;
|
||||
|
||||
buildInputs = [
|
||||
python2 coriolis-bootstrap coriolis-vlsisapd
|
||||
python3 coriolis-bootstrap coriolis-vlsisapd
|
||||
coriolis-crlcore coriolis-hurricane qt4 boostWithPython
|
||||
coriolis-equinox
|
||||
];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let pkg =
|
||||
{ lib, coriolis-crlcore, coriolis-vlsisapd, coriolis-hurricane
|
||||
, python2Packages, coriolis-cumulus }:
|
||||
, python3Packages, coriolis-cumulus }:
|
||||
{
|
||||
name = "coriolis-stratus1";
|
||||
src = ../stratus1;
|
||||
|
@ -11,8 +11,8 @@ let pkg =
|
|||
coriolis-vlsisapd coriolis-crlcore coriolis-hurricane coriolis-cumulus
|
||||
];
|
||||
postInstall = ''
|
||||
ln -s -t $out/${python2Packages.python.sitePackages} \
|
||||
$out/${python2Packages.python.sitePackages}/stratus/*
|
||||
ln -s -t $out/${python3Packages.python.sitePackages} \
|
||||
$out/${python3Packages.python.sitePackages}/stratus/*
|
||||
'';
|
||||
pythonImportsCheck = [ "stratus" "patterns" "patread" "synopsys" "utils" "util" ];
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ let pkg =
|
|||
, coriolis-flute, coriolis-anabatic, coriolis-coloquinte
|
||||
, coriolis-lefdef, coriolis-knik, coriolis-kite
|
||||
, coriolis-katabatic, coriolis-etesian, coriolis-equinox
|
||||
, coriolis-solstice, libxml2, doxygen, python2Packages }:
|
||||
, coriolis-solstice, libxml2, doxygen, python3Packages }:
|
||||
{
|
||||
name = "unicorn";
|
||||
src = ../unicorn;
|
||||
|
@ -18,7 +18,7 @@ let pkg =
|
|||
coriolis-katabatic coriolis-etesian coriolis-equinox
|
||||
coriolis-solstice coriolis-bora coriolis-tutorial
|
||||
];
|
||||
nativeBuildInputs = [ doxygen python2Packages.wrapPython ];
|
||||
nativeBuildInputs = [ doxygen python3Packages.wrapPython ];
|
||||
pythonImportsCheck = [ "Unicorn" ];
|
||||
|
||||
postFixup = ''
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ version, meta }:
|
||||
|
||||
{ lib, stdenv, cmake, ninja, python2, boost
|
||||
{ lib, stdenv, cmake, ninja, python3, boost
|
||||
, coriolis-bootstrap, coriolis-vlsisapd, coriolis-hurricane
|
||||
, coriolis-crlcore, coriolis-lefdef, qt4 }:
|
||||
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
let boostWithPython = boost.override { enablePython = true; python = python3; }; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "coriolis-unittests";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
|||
src = ../unittests;
|
||||
|
||||
buildInputs = [
|
||||
python2 boostWithPython coriolis-bootstrap qt4
|
||||
python3 boostWithPython coriolis-bootstrap qt4
|
||||
coriolis-vlsisapd coriolis-hurricane coriolis-crlcore
|
||||
coriolis-lefdef
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue