1 { autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook, fetchurl, copyDesktopItems
2 , alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
3 , freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
4 , libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
5 , libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence
6 , mesa, nspr, nss, pango, systemd, libappindicator-gtk3, libdbusmenu
9 stdenv.mkDerivation rec {
14 url = "https://github.com/premid/Linux/releases/download/v${version}/${pname}.tar.gz";
15 sha256 = "sha256-ime6SCxm+fhMR2wagv1RItqwLjPxvJnVziW3DZafP50=";
43 libPath = lib.makeLibraryPath [
44 libcxx systemd libpulseaudio libdrm mesa
45 stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
46 gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
47 libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
48 libXtst nspr nss libxcb pango systemd libXScrnSaver
49 libappindicator-gtk3 libdbusmenu
53 mkdir -p $out/{bin,opt/PreMiD,share/pixmaps}
56 chmod +x $out/opt/PreMiD/${pname}
57 patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
58 $out/opt/PreMiD/${pname}
60 wrapProgram $out/opt/PreMiD/${pname} \
61 "''${gappsWrapperArgs[@]}" \
62 --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
63 --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}
65 ln -s $out/opt/PreMiD/${pname} $out/bin/
68 # This is the icon used by the desktop file
70 ln -s $out/opt/PreMiD/assets/appIcon.png $out/share/pixmaps/${pname}.png
78 desktopName = "PreMiD";
79 genericName = meta.description;
80 mimeTypes = [ "x-scheme-handler/premid" ];
85 description = "A simple, configurable utility to show your web activity as playing status on Discord";
86 homepage = "https://premid.app";
87 downloadPage = "https://premid.app/downloads";
88 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
89 license = licenses.mpl20;
90 maintainers = with maintainers; [ natto1784 ];
91 platforms = [ "x86_64-linux" ];
92 mainProgram = "premid";