tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
premid: init at 2.3.2
natto1784
4 years ago
b03feaf8
09f0d12e
+94
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
premid
default.nix
top-level
all-packages.nix
+92
pkgs/applications/misc/premid/default.nix
···
1
1
+
{ autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook, fetchurl, copyDesktopItems
2
2
+
, alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
3
3
+
, freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
4
4
+
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
5
5
+
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence
6
6
+
, mesa, nspr, nss, pango, systemd, libappindicator-gtk3, libdbusmenu
7
7
+
}:
8
8
+
9
9
+
stdenv.mkDerivation rec {
10
10
+
pname = "premid";
11
11
+
version = "2.3.2";
12
12
+
13
13
+
src = fetchurl {
14
14
+
url = "https://github.com/premid/Linux/releases/download/v${version}/${pname}.tar.gz";
15
15
+
sha256 = "sha256-TuID63cVZkQ2kBl2iZeuVvjRUJYBt62ppPvgffBlOXY=";
16
16
+
};
17
17
+
18
18
+
nativeBuildInputs = [
19
19
+
autoPatchelfHook
20
20
+
wrapGAppsHook
21
21
+
copyDesktopItems
22
22
+
];
23
23
+
24
24
+
buildInputs = [
25
25
+
alsa-lib
26
26
+
cups
27
27
+
libdrm
28
28
+
libuuid
29
29
+
libXdamage
30
30
+
libX11
31
31
+
libXScrnSaver
32
32
+
libXtst
33
33
+
libxcb
34
34
+
libxshmfence
35
35
+
mesa
36
36
+
nss
37
37
+
];
38
38
+
39
39
+
dontWrapGApps = true;
40
40
+
dontBuild = true;
41
41
+
dontConfigure = true;
42
42
+
43
43
+
libPath = lib.makeLibraryPath [
44
44
+
libcxx systemd libpulseaudio libdrm mesa
45
45
+
stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
46
46
+
gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
47
47
+
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
48
48
+
libXtst nspr nss libxcb pango systemd libXScrnSaver
49
49
+
libappindicator-gtk3 libdbusmenu
50
50
+
];
51
51
+
52
52
+
installPhase = ''
53
53
+
mkdir -p $out/{bin,opt/PreMiD,share/pixmaps}
54
54
+
mv * $out/opt/PreMiD
55
55
+
56
56
+
chmod +x $out/opt/PreMiD/${pname}
57
57
+
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
58
58
+
$out/opt/PreMiD/${pname}
59
59
+
60
60
+
wrapProgram $out/opt/PreMiD/${pname} \
61
61
+
"''${gappsWrapperArgs[@]}" \
62
62
+
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
63
63
+
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}
64
64
+
65
65
+
ln -s $out/opt/PreMiD/${pname} $out/bin/
66
66
+
'';
67
67
+
68
68
+
# This is the icon used by the desktop file
69
69
+
postInstall = ''
70
70
+
ln -s $out/opt/PreMiD/assets/appIcon.png $out/share/pixmaps/${pname}.png
71
71
+
'';
72
72
+
73
73
+
desktopItems = [
74
74
+
(makeDesktopItem {
75
75
+
name = pname;
76
76
+
exec = "PreMiD";
77
77
+
icon = pname;
78
78
+
desktopName = "PreMiD";
79
79
+
genericName = meta.description;
80
80
+
mimeType = "x-scheme-handler/premid";
81
81
+
})
82
82
+
];
83
83
+
84
84
+
meta = with lib; {
85
85
+
description = "A simple, configurable utility to show your web activity as playing status on Discord";
86
86
+
homepage = "https://premid.app";
87
87
+
downloadPage = "https://premid.app/downloads";
88
88
+
license = licenses.mpl20;
89
89
+
maintainers = with maintainers; [ natto1784 ];
90
90
+
platforms = [ "x86_64-linux" ];
91
91
+
};
92
92
+
}
+2
pkgs/top-level/all-packages.nix
···
26712
26712
26713
26713
qiv = callPackage ../applications/graphics/qiv { };
26714
26714
26715
26715
+
premid = callPackage ../applications/misc/premid { };
26716
26716
+
26715
26717
processing = callPackage ../applications/graphics/processing {
26716
26718
jdk = oraclejdk8;
26717
26719
};