-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathshell.nix
69 lines (67 loc) · 1.73 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ pkgs ? import <nixpkgs> { config.allowUnfree = true; } }:
let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix";
ref = "refs/tags/3.5.0";
}) {
mkPython = { # replace with mkPythonShell if shell is wanted
requirements = builtins.readFile ./requirements.txt;
};
};
unstable = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {};
in
pkgs.mkShell {
packages = with pkgs; [
(python3.withPackages (pypkgs: with pypkgs; [
injector
matplotlib
packaging
peewee
pynvml
pygobject3
xlib
pyxdg
requests
rx
gtk3
reactivex
py3nvml
]))
glib
libgee
#pantheon
# lib
wrapGAppsHook
pkg-config
meson
ninja
cmake
gobject-introspection
desktop-file-utils
gtk3
libdazzle
libnotify
# needed it because I use the unstable kernel in my configuration.nix
unstable.linuxPackages.nvidia_x11
#linuxPackages.nvidia_x11
appstream-glib
appstream
flatpak-builder
libayatana-appindicator
];
shellHook = ''
# Fix missing site-packages like gi
site_packages=$(python3 -c "import site; print(site.getsitepackages()[0])")
export PYTHONPATH="$site_packages"
# Ensure NVML library is in LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${unstable.linuxPackages.nvidia_x11}/lib:$LD_LIBRARY_PATH
'';
}
# prePatch = ''
# patchShebangs scripts/{make_local_manifest,meson_post_install}.py
#
# substituteInPlace gwe/repository/nvidia_repository.py \
# --replace "from py3nvml import py3nvml" "import pynvml" \
# --replace "py3nvml.py3nvml" "pynvml" \
# --replace "py3nvml" "pynvml"
# '';