flake: clean up vivado, add installer environment

This commit is contained in:
Sebastien Bourdeauducq 2021-08-25 13:22:44 +08:00 committed by occheung
parent 9addd08587
commit 035d15af9d

View File

@ -29,6 +29,18 @@
rustc = rust; rustc = rust;
cargo = rust; cargo = rust;
}); });
vivadoDeps = pkgs: with pkgs; [
ncurses5
zlib
libuuid
xorg.libSM
xorg.libICE
xorg.libXrender
xorg.libX11
xorg.libXext
xorg.libXtst
xorg.libXi
];
in rec { in rec {
packages.x86_64-linux = rec { packages.x86_64-linux = rec {
sipyco = pkgs.python3Packages.buildPythonPackage { sipyco = pkgs.python3Packages.buildPythonPackage {
@ -168,26 +180,18 @@
doCheck = false; # TODO: fix misoc bitrot and re-enable tests doCheck = false; # TODO: fix misoc bitrot and re-enable tests
propagatedBuildInputs = with pkgs.python3Packages; [ jinja2 numpy migen pyserial asyncserial ]; propagatedBuildInputs = with pkgs.python3Packages; [ jinja2 numpy migen pyserial asyncserial ];
}; };
};
vivado = pkgs.buildFHSUserEnv { vivadoEnv = pkgs.buildFHSUserEnv {
name = "vivado"; name = "vivado-env";
targetPkgs = pkgs: ( targetPkgs = vivadoDeps;
with pkgs; [ };
ncurses5
zlib vivado = pkgs.buildFHSUserEnv {
libuuid name = "vivado";
xorg.libSM targetPkgs = vivadoDeps;
xorg.libICE profile = "source /opt/Xilinx/Vivado/2020.1/settings64.sh";
xorg.libXrender runScript = "vivado";
xorg.libX11 };
xorg.libXext
xorg.libXtst
xorg.libXi
]
);
profile = "source /opt/Xilinx/Vivado/2020.1/settings64.sh";
runScript = "vivado";
}; };
defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]); defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]);
@ -201,7 +205,9 @@
pkgs.llvmPackages_11.clang-unwrapped pkgs.llvmPackages_11.clang-unwrapped
pkgs.llvm_11 pkgs.llvm_11
pkgs.lld_11 pkgs.lld_11
vivado # use the vivado-env command to enter a FHS shell that lets you run the Vivado installer
packages.x86_64-linux.vivadoEnv
packages.x86_64-linux.vivado
]; ];
TARGET_AR="llvm-ar"; TARGET_AR="llvm-ar";
}; };