Skip to content

Commit

Permalink
Merge pull request #54 from nix-community/xilinx
Browse files Browse the repository at this point in the history
xilinx-vitis: add fixes for libidn/ncurses and fix eval
  • Loading branch information
Mic92 authored Nov 20, 2023
2 parents 29a23f8 + 9a9e652 commit 9604a9e
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions envs/xilinx-vitis/shell.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
{ pkgs ? import <nixpkgs> {}
, extraPkgs ? []
{ pkgs ? import <nixpkgs> { }
, extraPkgs ? [ ]
, runScript ? "bash"
, xilinxName ? "xilinx-env"
}:

(pkgs.buildFHSUserEnv {
name = xilinxName;
inherit runScript;
targetPkgs = pkgs: with pkgs; [
targetPkgs = pkgs: with pkgs; let
ncurses' = ncurses5.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [ "--with-termlib" ];
postFixup = "";
});
in
[
bash
coreutils
zlib
lsb-release
stdenv.cc.cc
ncurses5
# https://github.com/NixOS/nixpkgs/issues/218534
# postFixup would create symlinks for the non-unicode version but since it breaks
# in buildFHSUserEnv, we just install both variants
ncurses'
(ncurses'.override { unicodeSupport = false; })
xorg.libXext
xorg.libX11
xorg.libXrender
Expand All @@ -31,6 +41,14 @@
libxcrypt-legacy # required for Vivado
python3

(libidn.overrideAttrs (_old: {
# we need libidn.so.11 but nixpkgs has libidn.so.12
src = fetchurl {
url = "mirror://gnu/libidn/libidn-1.34.tar.gz";
sha256 = "sha256-Nxnil18vsoYF3zR5w4CvLPSrTpGeFQZSfkx2cK//bjw=";
};
}))

# to compile some xilinx examples
opencl-clhpp
ocl-icd
Expand All @@ -42,7 +60,7 @@
unzip
nettools
] ++ extraPkgs;
multiPkgs = null;
multiPkgs = ps: [];
profile = ''
export LC_NUMERIC="en_US.UTF-8"
source /opt/xilinx/Vitis/*/settings64.sh
Expand Down

0 comments on commit 9604a9e

Please sign in to comment.