diff --git a/flake.nix b/flake.nix index 48062e7..750d518 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ litedram liteeth litescope + litespi pythondata-cpu-vexriscv pythondata-software-compiler_rt pythondata-software-picolibc diff --git a/litex/default.nix b/litex/default.nix index a754421..62b82e1 100644 --- a/litex/default.nix +++ b/litex/default.nix @@ -8,6 +8,7 @@ in final: prev: { litedram = python-final.callPackage(import ./litedram.nix tag) { }; liteeth = python-final.callPackage(import ./liteeth.nix tag) { }; litescope = python-final.callPackage(import ./litescope.nix tag) { }; + litespi = python-final.callPackage(import ./litespi.nix tag) { }; pythondata-cpu-vexriscv = python-final.callPackage(import ./pythondata-cpu-vexriscv.nix tag) { }; pythondata-software-compiler_rt = python-final.callPackage(import ./pythondata-software-compiler_rt.nix tag) { }; pythondata-software-picolibc = python-final.callPackage(import ./pythondata-software-picolibc.nix tag) { }; diff --git a/litex/litespi.nix b/litex/litespi.nix new file mode 100644 index 0000000..9437817 --- /dev/null +++ b/litex/litespi.nix @@ -0,0 +1,34 @@ +tag: { + pkgs +, lib +, buildPythonPackage +, migen +, setuptools +, litex +}: buildPythonPackage { + pname = "litespi"; + version = "${tag}"; + + src = pkgs.fetchFromGitHub { + owner = "litex-hub"; + repo = "litespi"; + rev = "${tag}"; + hash = "sha256-XYeWokF1IGtZWRK+6jhRSN91MOV5vyh5aO08sbtFBxw="; + }; + + buildInputs = [ + litex + ]; + + propagatedBuildInputs = [ + migen + ]; + + nativeCheckInputs = [ + ]; + + checkPhase = '' + python -m unittest test + ''; + doCheck = true; +}