pocket-casts: init at 0.5.0

This commit is contained in:
P. R. d. O 2021-10-24 23:21:15 -06:00 committed by Raphael Megzari
parent cf01d286a6
commit 4f25697acf
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,58 @@
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron_12,
alsa-lib, gtk3, libXScrnSaver, libXtst, mesa, nss }:
let
# Using Electron 12 to solve errors regarding threading
electron = electron_12;
in stdenv.mkDerivation rec {
pname = "pocket-casts";
version = "0.5.0";
src = fetchurl {
url = "https://github.com/felicianotech/pocket-casts-desktop-app/releases/download/v${version}/${pname}_${version}_amd64.deb";
sha256 = "sha256-frBtIxwRO/6k6j0itqN10t+9AyNadqXm8vC1YP960ts=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
];
buildInputs = [ alsa-lib gtk3 libXScrnSaver libXtst mesa nss ];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
mv "$out/opt/Pocket Casts" $out/opt/pocket-casts
mv $out/share/icons/hicolor/0x0 $out/share/icons/hicolor/256x256
runHook postInstall
'';
postFixup = ''
substituteInPlace $out/share/applications/pocket-casts.desktop --replace '"/opt/Pocket Casts/pocket-casts"' $out/bin/pocket-casts
substituteInPlace $out/share/applications/pocket-casts.desktop --replace '/usr/share/icons/hicolor/0x0/apps/pocket-casts.png' "pocket-casts"
makeWrapper ${electron}/bin/electron \
$out/bin/pocket-casts \
--add-flags $out/opt/pocket-casts/resources/app.asar
'';
meta = with lib; {
description = "Pocket Casts webapp, packaged for the Linux Desktop";
homepage = "https://github.com/felicianotech/pocket-casts-desktop-app";
license = licenses.mit;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -3400,6 +3400,8 @@ with pkgs;
pn = callPackage ../tools/text/pn { };
pocket-casts = callPackage ../applications/audio/pocket-casts { };
poweralertd = callPackage ../tools/misc/poweralertd { };
ps_mem = callPackage ../tools/system/ps_mem { };