-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
flake.nix
93 lines (79 loc) · 2.58 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
{
description = "Sublime Music development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { system = system; };
nativeBuildInputs = with pkgs; [
gobject-introspection
python3Packages.setuptools
wrapGAppsHook
];
in {
packages.sublime-music = pkgs.python3Packages.buildPythonApplication {
pname = "sublime-music";
version = "0.12.0";
format = "flit";
src = ./.;
inherit nativeBuildInputs;
buildInputs = with pkgs; [ gtk3 pango libnotify networkmanager ];
propagatedBuildInputs = with pkgs.python3Packages; [
bleach
bottle
dataclasses-json
deepdiff
keyring
mpv
peewee
PyChromecast
pygobject3
python-dateutil
python-Levenshtein
requests
semver
thefuzz
];
# hook for gobject-introspection doesn't like strictDeps
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
# Skip checks
doCheck = false;
# Also run the python import check for sanity
pythonImportsCheck = [ "sublime_music" ];
postInstall = ''
install -Dm444 sublime-music.desktop -t $out/share/applications
install -Dm444 sublime-music.metainfo.xml -t $out/share/metainfo
for size in 16 22 32 48 64 72 96 128 192 512 1024; do
install -Dm444 logo/rendered/"$size".png \
$out/share/icons/hicolor/"$size"x"$size"/apps/sublime-music.png
done
'';
};
devShells.default = pkgs.mkShell {
inherit nativeBuildInputs;
buildInputs = with pkgs; [
bashInteractive
gcc
git
glib
gtk3
libnotify
pango
pkg-config
pre-commit
];
propagatedBuildInputs = with pkgs; [ cairo mpv python310 rnix-lsp ];
shellHook = ''
set -x
export LD_LIBRARY_PATH=${pkgs.mpv}/lib
export XDG_DATA_DIRS="$GSETTINGS_SCHEMA_PATH:${pkgs.arc-theme}/share:${pkgs.arc-icon-theme}/share"
export SOURCE_DATE_EPOCH=315532800
set +x
'';
};
}));
}