X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=nix%2Fverilog.nix;h=600b6939d7a82cfcdb65a34213633bc93d6ea42a;hb=597c0544a35bdd47bd2bd8a1560e7251b4032a4b;hp=cb6df044788efbae3c918bc48dc74eb1bd18b648;hpb=ca291ae0f5d1b15caededd4151dec79292be4228;p=soc.git diff --git a/nix/verilog.nix b/nix/verilog.nix index cb6df044..600b6939 100644 --- a/nix/verilog.nix +++ b/nix/verilog.nix @@ -1,35 +1,20 @@ { version }: -{ stdenv, python3Packages }: - -stdenv.mkDerivation { - pname = "libresoc.v"; +{ runCommand, python3Packages, libresoc-pinmux }: + +let script = '' + mkdir pinmux + ln -s ${libresoc-pinmux} pinmux/ls180 + export PINMUX="$(realpath ./pinmux)" + python3 -m soc.simple.issuer_verilog \ + --debug=jtag --enable-core --enable-pll \ + --enable-xics --enable-sram4x4kblock --disable-svp64 \ + $out +''; in +runCommand "libresoc.v" { inherit version; - src = ../.; - - strictDeps = true; - - nativeBuildInputs = with python3Packages; [ nmigen-soc python libresoc-ieee754fpu libresoc-openpower-isa ]; - - configurePhase = "true"; - - buildPhase = '' - runHook preBuild - cd src - export PYTHONPATH="$PWD:$PYTHONPATH" - python3 soc/simple/issuer_verilog.py \ - --debug=jtag --enable-core --enable-pll \ - --enable-xics --enable-sram4x4kblock --disable-svp64 \ - libresoc.v - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mv libresoc.v $out - runHook postInstall - ''; - - fixupPhase = "true"; -} + nativeBuildInputs = (with python3Packages; [ + libresoc-soc + ]) ++ [ libresoc-pinmux ]; +} script