nixpkgs/pkgs/applications/misc/thedesk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.3 KiB
Nix
Raw Normal View History

2021-11-12 00:59:51 +00:00
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
, alsa-lib, gtk3, libxshmfence, mesa, nss }:
stdenv.mkDerivation rec {
pname = "thedesk";
2024-06-27 04:33:19 +00:00
version = "24.2.1";
2021-11-12 00:59:51 +00:00
src = fetchurl {
url = "https://github.com/cutls/TheDesk/releases/download/v${version}/${pname}_${version}_amd64.deb";
2024-06-27 04:33:19 +00:00
sha256 = "sha256-AdjygNnQ3qQB03cGcQ5EB0cY3XXWLrzfCqw/U8tq1Yo=";
2021-11-12 00:59:51 +00:00
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
];
buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss ];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
# binary is not used and probably vulnerable to CVE(s)
rm $out/opt/TheDesk/thedesk
2021-11-12 00:59:51 +00:00
substituteInPlace $out/share/applications/thedesk.desktop \
--replace '/opt/TheDesk' $out/bin
makeWrapper ${electron}/bin/electron $out/bin/thedesk \
--add-flags $out/opt/TheDesk/resources/app.asar
runHook postInstall
'';
meta = with lib; {
description = "Mastodon/Misskey Client for PC";
homepage = "https://thedesk.top";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2021-11-12 00:59:51 +00:00
license = licenses.gpl3Only;
maintainers = [ ];
2021-11-12 00:59:51 +00:00
platforms = [ "x86_64-linux" ];
2024-02-11 02:19:15 +00:00
mainProgram = "thedesk";
2021-11-12 00:59:51 +00:00
};
}