-
Notifications
You must be signed in to change notification settings - Fork 31
/
flake.nix
107 lines (89 loc) · 2.67 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
description = "newm - Wayland compositor";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
pywmpkg.url = "github:jbuchermn/pywm";
pywmpkg.inputs.nixpkgs.follows = "nixpkgs";
pywmpkg.inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs, pywmpkg, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(self: super: rec {
python3 = super.python3.override {
packageOverrides = self1: super1: {
pywm = pywmpkg.packages.${system}.pywm;
dasbus = super1.buildPythonPackage rec {
pname = "dasbus";
version = "1.6";
src = super1.fetchPypi {
inherit pname version;
sha256 = "sha256-FJrY/Iw9KYMhq1AVm1R6soNImaieR+IcbULyyS5W6U0=";
};
setuptoolsCheckPhase = "true";
propagatedBuildInputs = with super1; [ pygobject3 ];
};
thefuzz = super1.buildPythonPackage rec {
pname = "thefuzz";
version = "0.19.0";
src = super1.fetchPypi {
inherit pname version;
sha256 = "sha256-b3Em2y8silQhKwXjp0DkX0KRxJfXXSB1Fyj2Nbt0qj0=";
};
propagatedBuildInputs = with super1; [
python-Levenshtein
pycodestyle
];
};
};
};
python3Packages = python3.pkgs;
})
];
};
in
{
packages.newm =
pkgs.python3.pkgs.buildPythonApplication rec {
pname = "newm";
version = "0.3alpha";
src = ./.;
propagatedBuildInputs = with pkgs.python3Packages; [
pywm
pycairo
psutil
python-pam
pyfiglet
dasbus
thefuzz
setuptools
];
setuptoolsCheckPhase = "true";
};
devShell = let
my-python = pkgs.python3;
python-with-my-packages = my-python.withPackages (ps: with ps; [
pywm
pycairo
psutil
python-pam
pyfiglet
dasbus
thefuzz
python-lsp-server
(pylsp-mypy.overrideAttrs (old: { pytestCheckPhase = "true"; }))
mypy
yappi
]);
in
pkgs.mkShell {
buildInputs = [ python-with-my-packages ];
};
}
);
}