Skip to content

Commit

Permalink
haskellPackages.libtorch-ffi: Fix the link to libtorch (#367998)
Browse files Browse the repository at this point in the history
  • Loading branch information
maralorn authored Jan 3, 2025
2 parents f371cde + 0145fac commit d3780c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/development/haskell-modules/configuration-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1536,4 +1536,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;
}));
}

0 comments on commit d3780c9

Please sign in to comment.