a3d4720129
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
|
|
, alsa-lib, gtk3, libxshmfence, mesa, nss }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "thedesk";
|
|
version = "23.0.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/cutls/TheDesk/releases/download/v${version}/${pname}_${version}_amd64.deb";
|
|
sha256 = "sha256-X1WNfpsHRkk2UNTExn338r4pWhtC1osrCo6V8g7Pxcc=";
|
|
};
|
|
|
|
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
|
|
|
|
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 ];
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|