From ca85403559eeaf4282074d5679b39a5cb1948e52 Mon Sep 17 00:00:00 2001 From: Junji Hashimoto Date: Sat, 28 Dec 2024 17:24:34 +0900 Subject: [PATCH 1/2] haskellPackages.libtorch-ffi: Fix the link to libtorch --- pkgs/development/haskell-modules/configuration-nix.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 276c3e6459026..940c2d31d6e2f 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1521,4 +1521,13 @@ self: super: builtins.intersectAttrs super { # certificate used only 1024 Bit RSA key and SHA-1, which is not allowed in OpenSSL 3.1+ # security level 2 openssl-streams = appendPatch ./patches/openssl-streams-cert.patch super.openssl-streams; + + libtorch-ffi = appendConfigureFlags ([ + "--extra-include-dirs=${lib.getDev pkgs.libtorch-bin}/include/torch/csrc/api/include" + ] ++ (lib.optionals pkgs.config.cudaSupport [ "-f" "cuda" ]) + ) (super.libtorch-ffi.override ({ + c10 = pkgs.libtorch-bin; + torch = pkgs.libtorch-bin; + torch_cpu = pkgs.libtorch-bin; + })); } From 0145fac03b41ddc9ef961d507af19b6ca0f93268 Mon Sep 17 00:00:00 2001 From: Junji Hashimoto Date: Sun, 29 Dec 2024 07:26:33 +0900 Subject: [PATCH 2/2] haskellPackages.sysinfo: Disable the test. Metrics are not collected properly on the sandbox of macOS. --- pkgs/development/haskell-modules/configuration-darwin.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index e65e33a8cc116..fec2d81f3bf0d 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -388,6 +388,8 @@ self: super: ({ http-reverse-proxy = dontCheck super.http-reverse-proxy; servant-auth-server = dontCheck super.servant-auth-server; + sysinfo = dontCheck super.sysinfo; + } // lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 { # aarch64-darwin # Workarounds for justStaticExecutables on aarch64-darwin. Since dead code