From 3da785b16b2ac0e2a3ee3b1e43824e872f18a19c Mon Sep 17 00:00:00 2001 From: Las Safin Date: Sat, 11 Sep 2021 17:43:23 +0000 Subject: [PATCH] Python dependencies --- flake.nix | 1 + nix/bigfloat.nix | 4 ++-- nix/ieee754fpu.nix | 4 ++-- nix/nmutil.nix | 21 +++++++++++++++++++++ nix/openpower-isa.nix | 4 +++- 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 nix/nmutil.nix diff --git a/flake.nix b/flake.nix index 5b1e57a5..75e3ed63 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ libresoc-ieee754fpu = pself.callPackage ./nix/ieee754fpu.nix {}; libresoc-openpower-isa = pself.callPackage ./nix/openpower-isa.nix {}; bigfloat = pself.callPackage ./nix/bigfloat.nix {}; + libresoc-nmutil = pself.callPackage ./nix/nmutil.nix {}; }; }; diff --git a/nix/bigfloat.nix b/nix/bigfloat.nix index f7675cf6..c3f81883 100644 --- a/nix/bigfloat.nix +++ b/nix/bigfloat.nix @@ -1,10 +1,10 @@ -{ lib, buildPythonPackage, bigfloat, fetchPypi, gmp, mpfr }: +{ lib, buildPythonPackage, bigfloat, fetchPypi, gmp, mpfr, six }: buildPythonPackage rec { pname = "bigfloat"; version = "0.4.0"; - buildInputs = [ gmp mpfr ]; + buildInputs = [ gmp mpfr six ]; src = fetchPypi { inherit pname version; diff --git a/nix/ieee754fpu.nix b/nix/ieee754fpu.nix index 3ec8486d..ac221c93 100644 --- a/nix/ieee754fpu.nix +++ b/nix/ieee754fpu.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, bigfloat, fetchgit }: +{ lib, buildPythonPackage, libresoc-nmutil, bigfloat, fetchgit }: buildPythonPackage { pname = "libresoc-ieee754fpu"; @@ -10,7 +10,7 @@ buildPythonPackage { sha256 = "wbr1vGFzUlUtBT6IcRsykADYeksiVoq/LacU/dbRQ0o="; }; - propagatedBuildInputs = [ bigfloat ]; + propagatedBuildInputs = [ libresoc-nmutil bigfloat ]; doCheck = false; diff --git a/nix/nmutil.nix b/nix/nmutil.nix new file mode 100644 index 00000000..cda043be --- /dev/null +++ b/nix/nmutil.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, bigfloat, fetchgit, pyvcd }: + +buildPythonPackage { + pname = "libresoc-nmutil"; + version = "unstable-2021-08-24"; + + nativeBuildInputs = [ pyvcd ]; + + src = fetchgit { + url = "https://git.libre-soc.org/git/nmutil.git"; + rev = "efda080db6978d249a23003bec734f1cc07de329"; + sha256 = "nTgUiZc4CC0VoUND29kHSIyMlP9IB3oZfehutoNK07w="; + }; + + doCheck = false; + + meta = with lib; { + homepage = "https://pypi.org/project/libresoc-ieee754fpu/"; + license = licenses.lgpl3Plus; + }; +} diff --git a/nix/openpower-isa.nix b/nix/openpower-isa.nix index 67cd8778..76c4987b 100644 --- a/nix/openpower-isa.nix +++ b/nix/openpower-isa.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchgit }: +{ lib, buildPythonPackage, fetchgit, libresoc-nmutil, astor, nmigen, ply, pygdbmi }: buildPythonPackage { pname = "libresoc-openpower-isa"; @@ -10,6 +10,8 @@ buildPythonPackage { sha256 = "0EekUouTQruTXGO5jlPJtqh0DOudghILy0nca5eaZz8="; }; + propagatedBuildInputs = [ libresoc-nmutil astor nmigen ply pygdbmi ]; + doCheck = false; meta = with lib; { -- 2.30.2