build breakage on nixos 21.05 #131

Closed
opened 2021-06-24 20:55:59 +08:00 by sb10q · 0 comments
Owner

Clang doesn't find includes as they have been moved into the lib output.

Workaround:

diff --git a/shell.nix b/shell.nix
index cb800cc..e7b6396 100644
--- a/shell.nix
+++ b/shell.nix
@@ -7,6 +7,8 @@ let
   artiqpkgs = import "${artiq-fast}/default.nix" { inherit pkgs; };
   vivado = import "${artiq-fast}/vivado.nix" { inherit pkgs; };
   zc706-szl = (import zynq-rs).zc706-szl;
+
+  clang = pkgs.runCommand "clang" {} "mkdir $out; cp -r ${pkgs.llvmPackages_9.clang-unwrapped}/* ${pkgs.llvmPackages_9.clang-unwrapped.lib}/* $out";
 in
   pkgs.stdenv.mkDerivation {
     name = "artiq-zynq-env";
@@ -15,7 +17,7 @@ in
       rustPlatform.rust.rustc
       rustPlatform.rust.cargo
       pkgs.llvmPackages_9.llvm
-      pkgs.llvmPackages_9.clang-unwrapped
+      clang
       pkgs.cacert
       cargo-xbuild
 

pkgs.buildEnv and pkgs.symlinkJoin do not work.

Clang doesn't find includes as they have been moved into the ``lib`` output. Workaround: ``` diff --git a/shell.nix b/shell.nix index cb800cc..e7b6396 100644 --- a/shell.nix +++ b/shell.nix @@ -7,6 +7,8 @@ let artiqpkgs = import "${artiq-fast}/default.nix" { inherit pkgs; }; vivado = import "${artiq-fast}/vivado.nix" { inherit pkgs; }; zc706-szl = (import zynq-rs).zc706-szl; + + clang = pkgs.runCommand "clang" {} "mkdir $out; cp -r ${pkgs.llvmPackages_9.clang-unwrapped}/* ${pkgs.llvmPackages_9.clang-unwrapped.lib}/* $out"; in pkgs.stdenv.mkDerivation { name = "artiq-zynq-env"; @@ -15,7 +17,7 @@ in rustPlatform.rust.rustc rustPlatform.rust.cargo pkgs.llvmPackages_9.llvm - pkgs.llvmPackages_9.clang-unwrapped + clang pkgs.cacert cargo-xbuild ``` ``pkgs.buildEnv`` and ``pkgs.symlinkJoin`` do not work.
sb10q closed this issue 2021-06-25 15:58:32 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#131
No description provided.