Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenPOWER ISA #84

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
pretalx-venueless
pretalx-public-voting
;

libresoc = rec {
libresoc-nmutil = callPackage ./libresoc/libresoc-nmutil.nix {};
openpower-isa = callPackage ./libresoc/openpower-isa.nix {inherit power-instruction-analyzer libresoc-nmutil;};
power-instruction-analyzer = callPackage ./libresoc/power-instruction-analyzer.nix {};
};
};
in
self
18 changes: 18 additions & 0 deletions pkgs/libresoc/libresoc-nmutil.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{pkgs, ...}:
with pkgs.python3Packages;
buildPythonPackage rec {
pname = "libresoc-nmutil";
version = "0.0.1";

src = fetchPypi {
inherit pname version;
hash = "sha256-DPnzjdGDhAN+wYoSo6iaAK44Je/RKgTe4p/+SHIIaM0=";
};

propagatedBuildInputs = [pyvcd];

nativeCheckInputs = [nose];

# FIXME(jl): nmigen/amaranth tests
doCheck = false;
}
28 changes: 28 additions & 0 deletions pkgs/libresoc/openpower-isa.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
pkgs,
fetchgit,
power-instruction-analyzer,
libre-soc,
...
}:
with pkgs.python3Packages;
buildPythonPackage {
pname = "openpower-isa";
version = "2023-10-28";
format = "setuptools";

src = fetchgit {
url = "https://git.libre-soc.org/git/openpower-isa.git";
rev = "21f95f5bb243c937aed9f9ef28605f20b33b7b0e";
hash = "sha256-UqEBEwVnVMgAn2Y64ccYC3zDY/RLCB7463hQbms+arc=";
};

patches = [./setup-no-cprop.patch];

propagatedBuildInputs = [amaranth astor cffi ply pygdbmi libresoc-nmutil];

nativeCheckInputs = [nose power-instruction-analyzer];

dontUsePipInstall = true;
doInstallCheck = false;
}
23 changes: 23 additions & 0 deletions pkgs/libresoc/power-instruction-analyzer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{pkgs, fetchgit, ...}:
with pkgs.python3Packages;
with pkgs.rustPlatform;
buildPythonPackage rec {
pname = "power-instruction-analyzer";
version = "0.2.0";

src = fetchgit {
url = "https://git.libre-soc.org/git/power-instruction-analyzer.git";
rev = "v${version}";
hash = "sha256-UmgDykG9yn413PXrMsI4oRblCZdHbtaIZ55p89YPfQs=";
};

cargoDeps = fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-lkSdkkU0lvGtEHbM3eFrXHiUcWEPkHL1sQeebAyMUcY=";
};

format = "pyproject";

nativeBuildInputs = [cargoSetupHook maturinBuildHook];
}
Loading