Create Python Wrapper
This commit is contained in:
parent
3ced4c6162
commit
9180f5b309
|
@ -8,11 +8,11 @@
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-DuhR3y0gPZG0AJ2FDd+nUKzQMwT+c/DFIUWNDQ5Uyx4=",
|
"narHash": "sha256-DuhR3y0gPZG0AJ2FDd+nUKzQMwT+c/DFIUWNDQ5Uyx4=",
|
||||||
"path": "/nix/store/v7xsk4kvdnnpj7zvr4bl47wxycbx4qy6-source/home/ags",
|
"path": "/nix/store/b101vshx5jj03vhqdh6j12hk6vkbk9x8-source/home/ags",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/v7xsk4kvdnnpj7zvr4bl47wxycbx4qy6-source/home/ags",
|
"path": "/nix/store/b101vshx5jj03vhqdh6j12hk6vkbk9x8-source/home/ags",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
nodejs
|
nodejs
|
||||||
luarocks
|
luarocks
|
||||||
jre
|
jre
|
||||||
python3
|
python312Packages.pip
|
||||||
python311Packages.pip
|
python312Packages.debugpy
|
||||||
python311Packages.debugpy
|
|
||||||
unzip
|
unzip
|
||||||
dotnet-sdk_8
|
dotnet-sdk_8
|
||||||
cargo
|
cargo
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(import ./common.nix { inherit inputs config pkgs; })
|
(import ./common.nix { inherit inputs config pkgs; })
|
||||||
|
(import ./python.nix { inherit inputs config pkgs; })
|
||||||
(import ../hyprland { inherit inputs pkgs; })
|
(import ../hyprland { inherit inputs pkgs; })
|
||||||
../rofi
|
../rofi
|
||||||
../alacritty
|
../alacritty
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ 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";
|
||||||
|
patchedpython = (pkgs.symlinkJoin {
|
||||||
|
name = "python";
|
||||||
|
paths = [ pkgs.python312 ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram "$out/bin/python3.12" --prefix ${wrapPrefix} : "${pythonldlibpath}"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
home.packages = [
|
||||||
|
patchedpython
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue