forked from GeopJr/Tuba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
90 lines (77 loc) · 2.2 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
{
description = "Browse the Fediverse";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/master";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { system = system; };
nativeBuildInputs = with pkgs; [
meson
ninja
vala
pkg-config
desktop-file-utils
python39
gtk3
wrapGAppsHook
];
buildInputs = with pkgs; [
meson
ninja
vala
glib
gtk4
json-glib
libxml2
libgee
libsoup
libadwaita
libsecret
];
in
{
devShells = {
${system} = {
default = pkgs.mkShell {
packages = buildInputs ++ nativeBuildInputs;
};
};
};
packages = {
${system} = {
tuba =
pkgs.stdenv.mkDerivation {
name = "tuba";
src = self;
nativeBuildInputs = nativeBuildInputs;
buildInputs = buildInputs;
preFixup = with pkgs; ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS" \
--prefix XDG_DATA_DIRS : "$out/share" \
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/dev.geopjr.Tuba" \
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
--prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
)
'';
configurePhase = "
meson setup builddir --prefix=$out
meson configure builddir -Ddevel=true
";
buildPhase = "meson compile -C builddir";
installPhase = "
patchShebangs build-aux/post_install.py
ninja -C builddir install
";
postInstallPhase = "
build-aux/post_install.py
";
};
default = self.packages.${system}.tuba;
};
};
};
}