Loading pkgs/development/compilers/yosys/default.nix +11 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ , abc-verifier , bash , bison , boost , fetchFromGitHub , flex , libffi Loading @@ -18,6 +19,7 @@ , yosys-bluespec , yosys-ghdl , yosys-symbiflow , enablePython ? false # enable python binding }: # NOTE: as of late 2020, yosys has switched to an automation robot that Loading Loading @@ -68,6 +70,10 @@ let ghdl = yosys-ghdl; } // (yosys-symbiflow); boost_python = boost.override { enablePython = true; python = python3; }; in stdenv.mkDerivation (finalAttrs: { pname = "yosys"; Loading @@ -90,7 +96,7 @@ in stdenv.mkDerivation (finalAttrs: { (python3.withPackages (pp: with pp; [ click ])) ]; ] ++ lib.optional enablePython boost_python; makeFlags = [ "PREFIX=${placeholder "out"}"]; Loading Loading @@ -123,6 +129,10 @@ in stdenv.mkDerivation (finalAttrs: { echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (allegedly ${finalAttrs.version}), failing." exit 1 fi '' + lib.optionalString enablePython '' echo "ENABLE_PYOSYS := 1" >> Makefile.conf echo "PYTHON_DESTDIR := $out/${python3.sitePackages}" >> Makefile.conf echo "BOOST_PYTHON_LIB := -lboost_python${lib.versions.major python3.version}${lib.versions.minor python3.version}" >> Makefile.conf ''; checkTarget = "test"; Loading pkgs/top-level/all-packages.nix +1 −0 Original line number Diff line number Diff line Loading @@ -17414,6 +17414,7 @@ with pkgs; yasm = callPackage ../development/compilers/yasm { }; yosys = callPackage ../development/compilers/yosys { }; yosysWithPython = callPackage ../development/compilers/yosys { enablePython = true; }; yosys-bluespec = callPackage ../development/compilers/yosys/plugins/bluespec.nix { }; yosys-ghdl = callPackage ../development/compilers/yosys/plugins/ghdl.nix { }; yosys-synlig = callPackage ../development/compilers/yosys/plugins/synlig.nix { }; pkgs/top-level/python-packages.nix +5 −0 Original line number Diff line number Diff line Loading @@ -16061,6 +16061,11 @@ self: super: with self; { yolink-api = callPackage ../development/python-modules/yolink-api { }; yosys = toPythonModule (pkgs.yosys.override { python3 = python; enablePython = true; }); youless-api = callPackage ../development/python-modules/youless-api { }; youtube-dl = callPackage ../tools/misc/youtube-dl { }; Loading
pkgs/development/compilers/yosys/default.nix +11 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ , abc-verifier , bash , bison , boost , fetchFromGitHub , flex , libffi Loading @@ -18,6 +19,7 @@ , yosys-bluespec , yosys-ghdl , yosys-symbiflow , enablePython ? false # enable python binding }: # NOTE: as of late 2020, yosys has switched to an automation robot that Loading Loading @@ -68,6 +70,10 @@ let ghdl = yosys-ghdl; } // (yosys-symbiflow); boost_python = boost.override { enablePython = true; python = python3; }; in stdenv.mkDerivation (finalAttrs: { pname = "yosys"; Loading @@ -90,7 +96,7 @@ in stdenv.mkDerivation (finalAttrs: { (python3.withPackages (pp: with pp; [ click ])) ]; ] ++ lib.optional enablePython boost_python; makeFlags = [ "PREFIX=${placeholder "out"}"]; Loading Loading @@ -123,6 +129,10 @@ in stdenv.mkDerivation (finalAttrs: { echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (allegedly ${finalAttrs.version}), failing." exit 1 fi '' + lib.optionalString enablePython '' echo "ENABLE_PYOSYS := 1" >> Makefile.conf echo "PYTHON_DESTDIR := $out/${python3.sitePackages}" >> Makefile.conf echo "BOOST_PYTHON_LIB := -lboost_python${lib.versions.major python3.version}${lib.versions.minor python3.version}" >> Makefile.conf ''; checkTarget = "test"; Loading
pkgs/top-level/all-packages.nix +1 −0 Original line number Diff line number Diff line Loading @@ -17414,6 +17414,7 @@ with pkgs; yasm = callPackage ../development/compilers/yasm { }; yosys = callPackage ../development/compilers/yosys { }; yosysWithPython = callPackage ../development/compilers/yosys { enablePython = true; }; yosys-bluespec = callPackage ../development/compilers/yosys/plugins/bluespec.nix { }; yosys-ghdl = callPackage ../development/compilers/yosys/plugins/ghdl.nix { }; yosys-synlig = callPackage ../development/compilers/yosys/plugins/synlig.nix { };
pkgs/top-level/python-packages.nix +5 −0 Original line number Diff line number Diff line Loading @@ -16061,6 +16061,11 @@ self: super: with self; { yolink-api = callPackage ../development/python-modules/yolink-api { }; yosys = toPythonModule (pkgs.yosys.override { python3 = python; enablePython = true; }); youless-api = callPackage ../development/python-modules/youless-api { }; youtube-dl = callPackage ../tools/misc/youtube-dl { };