-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
91 lines (82 loc) · 2.13 KB
/
Copy pathflake.nix
File metadata and controls
91 lines (82 loc) · 2.13 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
astal = {
url = "github:aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, astal }: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
python = (pkgs.python3.withPackages (ps: with ps; [
requests
inotify
pygobject3
pypdf
]));
nativeBuildInputs = with pkgs; [
meson
ninja
wrapGAppsHook
];
buildInputs = with astal.packages.${system}; [
io
astal4
battery
hyprland
wireplumber
mpris
tray
bluetooth
apps
notifd
network
python
pkgs.poppler_gi
pkgs.coreutils
pkgs.dart-sass
pkgs.gobject-introspection
pkgs.networkmanager
pkgs.gtk4
pkgs.gtk4-layer-shell
pkgs.libadwaita
];
in {
devShells.${system}.default = pkgs.mkShell {
venvDir = ".venv";
PYTHONPATH = ''${python}/${python.sitePackages}:$PYTHONPATH'';
packages = nativeBuildInputs ++ buildInputs ++ [
python.pkgs.venvShellHook
pkgs.pkg-config
];
};
packages.${system}.default = pkgs.python311Packages.buildPythonApplication rec {
version = "0.1.0";
pname = "xtreme_shell";
name = "${pname}-${version}";
pyproject = false;
src = ./.;
inherit nativeBuildInputs buildInputs;
strictDeps = false;
doCheck = false;
dontWrapGApps = true;
mesonFlags = [
"-Dudevrules=etc/udev/rules.d"
];
patches = [
(pkgs.replaceVars ./nix/fixUdevRules.patch {
chgrp = "${pkgs.coreutils}/bin/chgrp";
chmod = "${pkgs.coreutils}/bin/chmod";
})
./nix/fixPythonModules.patch
];
preFixup = ''
makeWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${pkgs.gtk4-layer-shell}/lib")
makeWrapperArgs+=(--prefix PATH : "${pkgs.dart-sass}/bin")
makeWrapperArgs+=(--prefix PYTHONPATH : "${self}/${python.sitePackages}:$PYTHONPATH")
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
};
};
}