From: Las Safin Date: Wed, 6 Oct 2021 09:17:51 +0000 (+0000) Subject: flake.nix: Clean up X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bc15764d691ca9f42c0e9833f4708941dab4b82;p=soc.git flake.nix: Clean up --- diff --git a/flake.nix b/flake.nix index 2027d9bf..c45eeb3d 100644 --- a/flake.nix +++ b/flake.nix @@ -69,7 +69,7 @@ src = yosys; }); - libresoc-pre-litex = final.callPackage (import ./nix/pre-litex.nix { version = getv self; }) { python3Packages = final.python37Packages; }; + libresoc-verilog = final.callPackage (import ./nix/verilog.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ls180 = final.callPackage (import ./nix/ls180.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ecp5 = final.callPackage (import ./nix/ecp5.nix { version = getv self; }) { python3Packages = final.python37Packages; }; libresoc-ecp5-program = final.callPackage (import ./nix/ecp5-program.nix { version = getv self; }) { python3Packages = final.python37Packages; }; @@ -86,7 +86,7 @@ packages = forAllSystems (system: { soc = nixpkgsFor.${system}.python37Packages.libresoc-soc; - pre-litex = nixpkgsFor.${system}.libresoc-pre-litex; + verilog = nixpkgsFor.${system}.libresoc-verilog; pinmux = nixpkgsFor.${system}.libresoc-pinmux; ls180 = nixpkgsFor.${system}.libresoc-ls180; ecp5 = nixpkgsFor.${system}.libresoc-ecp5; @@ -95,6 +95,6 @@ debugNixpkgs = nixpkgsFor.${system}; }); - defaultPackage = forAllSystems (system: self.packages.${system}.pre-litex); + defaultPackage = forAllSystems (system: self.packages.${system}.verilog); }; } diff --git a/nix/ecp5-program.nix b/nix/ecp5-program.nix index 09ce2194..4d696b22 100644 --- a/nix/ecp5-program.nix +++ b/nix/ecp5-program.nix @@ -1,7 +1,6 @@ { version }: -{ writeShellScript, openocd, python3Packages, libresoc-ecp5, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross -, nextpnr, trellis }: +{ writeShellScript, openocd, python3Packages, libresoc-ecp5, nextpnr, trellis }: let pythonWithEnv = python3Packages.python.withPackages (ps: with ps; [ diff --git a/nix/ecp5.nix b/nix/ecp5.nix index 025799b0..1c82ee4b 100644 --- a/nix/ecp5.nix +++ b/nix/ecp5.nix @@ -1,10 +1,10 @@ { version }: -{ stdenv, python3Packages, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross +{ stdenv, python3Packages, yosys, libresoc-verilog, libresoc-pinmux, pkgsCross , nextpnr, trellis }: stdenv.mkDerivation { - pname = "libresoc-versa-ecp5"; + pname = "libresoc-versa-ecp5.v"; inherit version; src = ../src/soc/litex/florent; @@ -25,7 +25,7 @@ stdenv.mkDerivation { runHook preBuild export PINMUX="$(mktemp -d)" ln -s ${libresoc-pinmux} "$PINMUX/ls180" - cp ${libresoc-pre-litex} libresoc/libresoc.v + cp ${libresoc-verilog} libresoc/libresoc.v ./versa_ecp5.py --sys-clk-freq=55e6 --build runHook postBuild ''; diff --git a/nix/ls180.nix b/nix/ls180.nix index 37b97506..028fbcb0 100644 --- a/nix/ls180.nix +++ b/nix/ls180.nix @@ -1,6 +1,6 @@ { version }: -{ stdenv, python3Packages, yosys, libresoc-pre-litex, libresoc-pinmux, pkgsCross }: +{ stdenv, python3Packages, yosys, libresoc-verilog, libresoc-pinmux, pkgsCross }: stdenv.mkDerivation { pname = "libresoc-ls1804k"; @@ -24,7 +24,7 @@ stdenv.mkDerivation { runHook preBuild export PINMUX="$(mktemp -d)" ln -s ${libresoc-pinmux} "$PINMUX/ls180" - cp ${libresoc-pre-litex} libresoc/libresoc.v + cp ${libresoc-verilog} libresoc/libresoc.v ./ls180soc.py --build --platform=ls180sram4k --num-srams=2 --srams4k runHook postBuild ''; diff --git a/nix/pre-litex.nix b/nix/pre-litex.nix deleted file mode 100644 index cf405e1a..00000000 --- a/nix/pre-litex.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ version }: - -{ 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-ls1804k-pre-litex.v" { - inherit version; - - nativeBuildInputs = (with python3Packages; [ - libresoc-soc - ]) ++ [ libresoc-pinmux ]; -} script diff --git a/nix/verilog.nix b/nix/verilog.nix new file mode 100644 index 00000000..600b6939 --- /dev/null +++ b/nix/verilog.nix @@ -0,0 +1,20 @@ +{ version }: + +{ 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; + + nativeBuildInputs = (with python3Packages; [ + libresoc-soc + ]) ++ [ libresoc-pinmux ]; +} script