-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
72 lines (69 loc) · 2.13 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
{
description = "A flake for the recap application";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
python3Packages = pkgs.python3Packages;
makePythonPackage = args: python3Packages.buildPythonPackage (args // {
preBuild = ''
export HOME=$(mktemp -d)
'';
});
reqs = {
addict = makePythonPackage {
pname = "addict";
version = "unspecified";
src = pkgs.fetchFromGitHub {
owner = "mewwts";
repo = "addict";
rev = "cf29d47eab24a7d935cb6841d13eac686dcd6e86";
sha256 = "0id13ry1qavhs5yzij63w3p4jys809s8x5183pfxscalnx4p4lnc";
};
};
python-rofi = makePythonPackage {
pname = "python-rofi";
version = "unspecified";
src = pkgs.fetchFromGitHub {
owner = "dustinlacewell";
repo = "python-rofi";
rev = "7f5e8ca81392aacfdd216488d76f564f9fc9b70c";
sha256 = "0zl4bki4sxvwplqsx187hdz6ln2r8mw803n2sbac5h65p1bbln6b";
};
};
};
in
{
packages.recap = pkgs.python3Packages.buildPythonApplication ({
pname = "recap";
version = "unspecified"; # You should specify a version here
src = ./.;
checkInputs = [ pkgs.python3Packages.pytest ];
checkPhase = null;
propagatedBuildInputs = [
reqs.addict
python3Packages.attrdict
python3Packages.click
python3Packages.toml
reqs.python-rofi
pkgs.ffmpeg
pkgs.maim
pkgs.slop
pkgs.xclip
pkgs.xorg.xdpyinfo
];
} // {
preBuild = ''
export HOME=$(mktemp -d)
'';
});
defaultPackage = self.packages.${system}.recap;
}
);
}