-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.nix
46 lines (41 loc) · 1.09 KB
/
package.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
{
lib,
buildPythonPackage,
python311Packages,
psmisc,
gobject-introspection,
gtk3,
dbus-python,
wrapGAppsHook,
}: let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
poetryBlock = pyproject.tool.poetry;
dependencyReplacements = {
wxpython = python311Packages.wxPython_4_2;
};
in
buildPythonPackage rec {
pname = poetryBlock.name;
version = poetryBlock.version;
src = ./.;
doCheck = false;
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
];
propagatedBuildInputs = let
dependencyNames = (lib.attrNames poetryBlock.dependencies) ++ ["setuptools" "pygobject3" "pystray" "dbus-python"];
dependencies = map (name: python311Packages.${name} or dependencyReplacements.${name}) dependencyNames;
in
dependencies ++ [
psmisc
gtk3
dbus-python
];
meta = with lib; {
description = poetryBlock.description;
homepage = poetryBlock.homepage;
license = licenses.${toLower poetryBlock.license};
maintainers = with lib.maintainers; [kittywitch];
};
}