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
|
{
stdenv,
lib,
fetchFromGitHub,
fetchFromGitLab,
makeWrapper,
git,
meson,
ninja,
vala,
sassc,
pkg-config,
gobject-introspection,
wayland-scanner,
glib,
gtk4,
gtk4-layer-shell,
json-glib,
gmp,
librsvg,
networkmanager,
wayland,
libpulseaudio,
alsa-lib,
upower,
brightnessctl
}:
let
dep-gvc = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "libgnome-volume-control";
rev = "91f3f41490666a526ed78af744507d7ee1134323";
hash = "sha256-lpDWVlRFngMSNfACrfJ5vRTZ2xdlwcrh4/YGcNDogys=";
};
in stdenv.mkDerivation {
pname = "foobar";
version = "1.0.0";
src = ./..;
postUnpack = ''
pushd "$sourceRoot"
cp -R --no-preserve=mode,ownership ${dep-gvc} subprojects/gvc
popd
'';
# needed to enable support for SVG icons in GTK
postInstall = ''
wrapProgram "$out/bin/foobar" \
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
'';
nativeBuildInputs = [ makeWrapper git meson ninja vala sassc pkg-config gobject-introspection wayland-scanner ];
buildInputs = [ glib gtk4 gtk4-layer-shell json-glib gmp librsvg networkmanager wayland libpulseaudio alsa-lib upower brightnessctl ];
meta = with lib; {
homepage = "https://github.com/hannesschulze/foobar";
description = "A simple bar, launcher, control center, and notification daemon.";
maintainers = [
{ name = "Hannes Schulze"; }
];
license = licenses.mit;
mainProgram = "foobar";
};
}
|