wip
[soc.git] / nix / soc.nix
1 { version }:
2
3 { lib, buildPythonPackage, yosys, runCommand, c4m-jtag, nmigen-soc
4 , libresoc-ieee754fpu, libresoc-openpower-isa, python }:
5
6 let
7 # If we use ../. as source, then any change to
8 # any unrelated Nix file would cause a rebuild,
9 # since the build would have access to it.
10 src = runCommand "libresoc-soc-source" {} ''
11 mkdir $out
12 cp -r ${../src} -T $out/src
13 cp -r ${../pinmux} -T $out/pinmux
14 cp -r ${../setup.py} -T $out/setup.py
15 '';
16 in
17 buildPythonPackage {
18 pname = "libresoc-soc";
19 inherit version src;
20
21 propagatedBuildInputs = [
22 c4m-jtag nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa yosys
23 ];
24
25 doCheck = false;
26
27 pythonImportsCheck = [ "soc" ];
28
29 meta = with lib; {
30 homepage = "https://libre-soc.org/";
31 license = licenses.lgpl3Plus;
32 };
33 }