From 3e09e48152b0d6d4db2fc28bd3b49db5b58daa25 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 25 Aug 2021 12:49:05 +0800 Subject: [PATCH] flake: set up Vivado --- flake.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/flake.nix b/flake.nix index 4c031cf7b..d72123cf6 100644 --- a/flake.nix +++ b/flake.nix @@ -170,6 +170,26 @@ }; }; + vivado = pkgs.buildFHSUserEnv { + name = "vivado"; + targetPkgs = pkgs: ( + with pkgs; [ + ncurses5 + zlib + libuuid + xorg.libSM + xorg.libICE + xorg.libXrender + 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 ]); devShell.x86_64-linux = pkgs.mkShell { @@ -181,6 +201,7 @@ pkgs.llvmPackages_11.clang-unwrapped pkgs.llvm_11 pkgs.lld_11 + vivado ]; TARGET_AR="llvm-ar"; }; @@ -193,5 +214,6 @@ nixConfig = { binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; + sandboxPaths = ["/opt"]; }; }