2024-12-26 15:56:35 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
pythonldlibpath = pkgs.lib.makeLibraryPath (with pkgs; [
|
|
|
|
libGL
|
|
|
|
glib
|
|
|
|
zlib
|
|
|
|
zstd
|
|
|
|
stdenv.cc.cc
|
|
|
|
curl
|
|
|
|
openssl
|
|
|
|
attr
|
|
|
|
libssh
|
|
|
|
bzip2
|
|
|
|
libxml2
|
|
|
|
acl
|
|
|
|
libsodium
|
|
|
|
util-linux
|
|
|
|
xz
|
|
|
|
systemd
|
|
|
|
]);
|
|
|
|
# Darwin requires a different library path prefix
|
|
|
|
wrapPrefix = if (!pkgs.stdenv.isDarwin) then "LD_LIBRARY_PATH" else "DYLD_LIBRARY_PATH";
|
2025-02-21 22:04:44 +01:00
|
|
|
# pythonOverlay = (pkgs.python313.withPackages (ps: [
|
2025-02-03 21:44:48 +01:00
|
|
|
# (ps.torch.override { rocmSupport = true; })
|
|
|
|
# ]));
|
|
|
|
|
2024-12-26 15:56:35 +01:00
|
|
|
patchedpython = (pkgs.symlinkJoin {
|
|
|
|
name = "python";
|
2025-02-21 22:04:44 +01:00
|
|
|
paths = [ pkgs.python313 ];
|
2024-12-26 15:56:35 +01:00
|
|
|
buildInputs = [ pkgs.makeWrapper ];
|
|
|
|
postBuild = ''
|
2025-02-21 22:04:44 +01:00
|
|
|
wrapProgram "$out/bin/python3.13" --prefix ${wrapPrefix} : "${pythonldlibpath}"
|
2024-12-26 15:56:35 +01:00
|
|
|
'';
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
home.packages = [
|
|
|
|
patchedpython
|
|
|
|
];
|
|
|
|
}
|