2019-07-03 20:26:30 +08:00
|
|
|
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
|
|
|
# nix.sandboxPaths = ["/opt"];
|
|
|
|
|
2022-03-20 17:45:35 +08:00
|
|
|
{ pkgs, vivadoPath ? "/opt/Xilinx/Vivado/2021.2" }:
|
2019-07-03 20:26:30 +08:00
|
|
|
|
|
|
|
pkgs.buildFHSUserEnv {
|
|
|
|
name = "vivado";
|
|
|
|
targetPkgs = pkgs: (
|
2023-11-29 11:12:32 +08:00
|
|
|
with pkgs; let
|
|
|
|
# Apply patch from https://github.com/nix-community/nix-environments/pull/54
|
|
|
|
# to fix ncurses libtinfo.so's soname issue
|
|
|
|
ncurses' = ncurses5.overrideAttrs (old: {
|
|
|
|
configureFlags = old.configureFlags ++ [ "--with-termlib" ];
|
|
|
|
postFixup = "";
|
|
|
|
});
|
|
|
|
in [
|
|
|
|
(ncurses'.override { unicodeSupport = false; })
|
2019-07-03 20:26:30 +08:00
|
|
|
zlib
|
|
|
|
libuuid
|
|
|
|
xorg.libSM
|
|
|
|
xorg.libICE
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXi
|
2023-06-07 21:15:31 +08:00
|
|
|
] ++ ( if pkgs ? libxcrypt-legacy then [ pkgs.libxcrypt-legacy ] else [])
|
2019-07-03 20:26:30 +08:00
|
|
|
);
|
|
|
|
profile = "source ${vivadoPath}/settings64.sh";
|
|
|
|
runScript = "vivado";
|
|
|
|
}
|