-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
91 lines (77 loc) · 2.53 KB
/
flake.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
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/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
let
out = system:
let pkgs = nixpkgs.legacyPackages."${system}";
in
{
devShell = pkgs.mkShell {
buildInputs = (with pkgs; [
python3
gtk3
gobject-introspection
]) ++ (with pkgs.python3.pkgs; [
pygobject3
pycairo
black
isort
]);
};
packages.pye-menu = pkgs.python3.pkgs.buildPythonPackage {
name = "pye-menu";
src = ./src;
propagatedBuildInputs = (with pkgs; [
python3
gtk3
# See https://github.com/NixOS/nixpkgs/issues/56943
gobject-introspection
]) ++ (with pkgs.python3.pkgs; [
pygobject3
pycairo
]);
propagatedNativeBuildInputs = with pkgs; [
wrapGAppsHook
gobject-introspection
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with pkgs.lib; {
description = "Python library and application for makig pie menus";
license = licenses.mit;
maintainers = with maintainers; [ kovirobi ];
};
};
packages.pen-menu = pkgs.python3.pkgs.buildPythonApplication {
pname = "pen-pye-menu";
version = "1.0";
src = ./examples;
propagatedBuildInputs = [
self.defaultPackage."${system}"
pkgs.python3.pkgs.i3ipc
];
preConfigure = ''
substituteAllInPlace pen_menu
'';
i3msg = "${pkgs.i3}/bin/i3-msg";
mpc = "${pkgs.mpc_cli}/bin/mpc";
loginctl = "${pkgs.systemd}/bin/#ctl";
flameshot = "${pkgs.flameshot}/bin/flameshot";
meta = with pkgs.lib; {
description = "Example Python pie menu";
license = licenses.mit;
maintainers = with maintainers; [ kovirobi ];
};
};
defaultPackage = self.packages."${system}".pye-menu;
defaultApp = utils.lib.mkApp {
drv = self.defaultPackage."${system}";
};
}; in
with utils.lib; eachSystem defaultSystems out;
}