{
"nodes": {
+ "c4m-jtag": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1619101523,
+ "narHash": "sha256-y1OY8URcE1lnu5L7IDFcJ8zT8sqlrfMP9VPNmVvACGk=",
+ "ref": "master",
+ "rev": "c2bf4810f9f91ced7fcda777b92b86ab353da288",
+ "revCount": 146,
+ "type": "git",
+ "url": "https://git.libre-soc.org/git/c4m-jtag.git"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.libre-soc.org/git/c4m-jtag.git"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1630612789,
},
"root": {
"inputs": {
+ "c4m-jtag": "c4m-jtag",
"nixpkgs": "nixpkgs"
}
}
description = "FOSS CPU/GPU/VPU/SoC all in one, see https://libre-soc.org/";
inputs.nixpkgs.url = "github:L-as/nixpkgs?ref=alliance"; # for alliance
+ inputs.c4m-jtag.url = "git+https://git.libre-soc.org/git/c4m-jtag.git";
+ inputs.c4m-jtag.flake = false;
- outputs = { self, nixpkgs }:
+ outputs = { self, nixpkgs, c4m-jtag }:
let
- version = builtins.substring 0 8 self.lastModifiedDate;
-
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
in
{
- overlay = self: super: {
- python3Packages = super.python3Packages.override {
- overrides = pself: psuper: {
- 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 {};
+ overlay = final: prev: {
+ python3Packages = prev.python3Packages.override {
+ overrides = pfinal: pprev: {
+ libresoc-ieee754fpu = pfinal.callPackage ./nix/ieee754fpu.nix {};
+ libresoc-openpower-isa = pfinal.callPackage ./nix/openpower-isa.nix {};
+ c4m-jtag = pfinal.callPackage (import ./nix/c4m-jtag.nix { src = c4m-jtag; version = c4m-jtag.lastModifiedDate; }) {};
+ bigfloat = pfinal.callPackage ./nix/bigfloat.nix {};
+ modgrammar = pfinal.callPackage ./nix/modgrammar.nix {};
+ libresoc-nmutil = pfinal.callPackage ./nix/nmutil.nix {};
};
};
- libresoc-verilog = self.callPackage (import ./nix/verilog.nix { inherit version; }) {};
+ libresoc-verilog = final.callPackage (import ./nix/verilog.nix { version = self.lastModifiedDate; }) {};
};
packages = forAllSystems (system: {
-{ lib, buildPythonPackage, bigfloat, fetchPypi, gmp, mpfr, six }:
+{ lib, buildPythonPackage, fetchPypi, gmp, mpfr, six }:
buildPythonPackage rec {
pname = "bigfloat";
--- /dev/null
+{ version, src }:
+
+{ lib, python, buildPythonPackage, nmigen-soc, nmigen, modgrammar }:
+
+buildPythonPackage {
+ pname = "libresoc-openpower-isa";
+ inherit version src;
+
+ propagatedBuildInputs = [ nmigen-soc nmigen modgrammar ];
+
+ doCheck = false;
+
+ pythonImportsCheck = [ "c4m.nmigen.jtag.tap" ];
+
+ meta = with lib; {
+ homepage = "https://pypi.org/project/libresoc-openpower-isa/";
+ license = licenses.lgpl3Plus;
+ };
+}
doCheck = false;
+ prePatch = ''
+ touch ./src/ieee754/part/__init__.py
+ '';
+
+ pythonImportsCheck = [ "ieee754.part" ];
+
meta = with lib; {
homepage = "https://pypi.org/project/libresoc-ieee754fpu/";
license = licenses.lgpl3Plus;
--- /dev/null
+{ lib, buildPythonPackage, fetchFromGitHub }:
+
+buildPythonPackage rec {
+ pname = "modgrammar";
+ version = "unstable-2020-09-20";
+
+ src = fetchFromGitHub {
+ owner = "bloerwald";
+ repo = "modgrammar";
+ rev = "d363ad5a86584e560a8b03cbe11c0168d7610691";
+ sha256 = "SO2qjfEVaJfgbA5HLJYwXlaeUzt5EFoljYQ2SsdDCbc=";
+ };
+
+ doCheck = false;
+
+ meta = with lib; {
+ homepage = "https://pypi.org/project/modgrammar/";
+ # license = licenses.bsd; # FIXME: Which BSD?
+ };
+}
strictDeps = true;
- nativeBuildInputs = with python3Packages; [ nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa ];
+ nativeBuildInputs = with python3Packages; [
+ c4m-jtag nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa
+ ];
configurePhase = "true";