Fix c4m-jtag
authorLas Safin <me@las.rs>
Sun, 12 Sep 2021 19:35:23 +0000 (19:35 +0000)
committerLas Safin <me@las.rs>
Sun, 12 Sep 2021 19:35:23 +0000 (19:35 +0000)
flake.nix
nix/c4m-jtag.nix
nix/openpower-isa.nix

index 3df85429d6ecc8b346c5dd66793d1de6a7a4a877..591b34e2f82d28dc9b98483994b44a338c65921e 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -33,6 +33,7 @@
 
       packages = forAllSystems (system: {
         verilog = nixpkgsFor.${system}.libresoc-verilog;
+        openpower-isa = nixpkgsFor.${system}.python3Packages.libresoc-openpower-isa;
       });
 
       defaultPackage = forAllSystems (system: self.packages.${system}.verilog);
index cf4dcf4d79c4e75f427cb79e59f700fabffa9350..1107244a54fc948d5059c011d56ec6249322cd70 100644 (file)
@@ -1,17 +1,23 @@
 { version, src }:
 
-{ lib, python, buildPythonPackage, nmigen-soc, nmigen, modgrammar }:
+{ lib, python, buildPythonPackage, nmigen-soc, nmigen, modgrammar, setuptools-scm }:
 
 buildPythonPackage {
-  pname = "libresoc-openpower-isa";
-  inherit version src;
+  pname = "c4m-jtag";
+  inherit src;
+  version = "2.17";
 
+  nativeBuildInputs = [ setuptools-scm ];
   propagatedBuildInputs = [ nmigen-soc nmigen modgrammar ];
 
   doCheck = false;
 
   pythonImportsCheck = [ "c4m.nmigen.jtag.tap" ];
 
+  prePatch = ''
+    sed -i -e 's/use_scm_version=scm_version..,//g' setup.py
+  '';
+
   meta = with lib; {
     homepage = "https://pypi.org/project/libresoc-openpower-isa/";
     license = licenses.lgpl3Plus;
index 7413bed1aaf610d1fead35d9dab7c305887537c4..5aee8b1e4d6752cfa21582787bbe915dc326aec6 100644 (file)
@@ -22,7 +22,7 @@ buildPythonPackage {
     cp -rT ./openpower $out/${python.sitePackages}/../openpower/
   '';
 
-  pythonImportsCheck = [ "openpower.decoder.power_decoder2" ];
+  pythonImportsCheck = [ "openpower.decoder.power_decoder2" "openpower" ];
 
   meta = with lib; {
     homepage = "https://pypi.org/project/libresoc-openpower-isa/";