-
Notifications
You must be signed in to change notification settings - Fork 18
/
flake.nix
63 lines (54 loc) · 1.42 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
{
description = "FastAnime Project Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
python = pkgs.python312;
pythonPackages = python.pkgs;
fastanimeEnv = pythonPackages.buildPythonApplication {
pname = "fastanime";
version = "v2.8.6";
src = ./.;
preBuild = ''
sed -i 's/rich>=13.9.2/rich>=13.8.1/' pyproject.toml
sed -i 's/pycryptodome>=3.21.0/pycryptodome>=3.20.0/' pyproject.toml
'';
# Add runtime dependencies
propagatedBuildInputs = with pythonPackages; [
click
inquirerpy
requests
rich
thefuzz
yt-dlp
dbus-python
hatchling
plyer
mpv
fastapi
pycryptodome
pypresence
];
# Ensure compatibility with the pyproject.toml
format = "pyproject";
};
in
{
packages.default = fastanimeEnv;
# DevShell for development
devShells.default = pkgs.mkShell {
buildInputs = [
fastanimeEnv
pythonPackages.hatchling
pkgs.mpv
pkgs.libmpv
pkgs.fzf
pkgs.rofi
];
};
});
}