Skip to content

Commit

Permalink
xilinx-vitis: add fixes for libidn/ncurses and fix eval
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 20, 2023
1 parent 29a23f8 commit 9a9e652
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

2 comments on commit 9a9e652

@peteut
Copy link
Contributor

@peteut peteut commented on 9a9e652 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 thanks for that, it is also required to for the yocto env (when using meta-xilinx-* layers).

@Mic92
Copy link
Member Author

@Mic92 Mic92 commented on 9a9e652 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peteut ok. Please provide a patch for that. I don't have a test environment for yocto.

Please sign in to comment.