forked from M-Labs/nix-scripts
32 lines
893 B
Nix
32 lines
893 B
Nix
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
|
# nix.sandboxPaths = ["/opt"];
|
|
|
|
{ pkgs, vivadoPath ? "/opt/Xilinx/Vivado/2021.2" }:
|
|
|
|
pkgs.buildFHSUserEnv {
|
|
name = "vivado";
|
|
targetPkgs = pkgs: (
|
|
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; })
|
|
zlib
|
|
libuuid
|
|
xorg.libSM
|
|
xorg.libICE
|
|
xorg.libXrender
|
|
xorg.libX11
|
|
xorg.libXext
|
|
xorg.libXtst
|
|
xorg.libXi
|
|
] ++ ( if pkgs ? libxcrypt-legacy then [ pkgs.libxcrypt-legacy ] else [])
|
|
);
|
|
profile = "source ${vivadoPath}/settings64.sh";
|
|
runScript = "vivado";
|
|
}
|