2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
|
|
|
|
, alsa-lib, gtk3, libXScrnSaver, libXtst, mesa, nss }:
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-10-28 06:52:43 +00:00
|
|
|
pname = "pocket-casts";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.6.0";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/felicianotech/pocket-casts-desktop-app/releases/download/v${version}/${pname}_${version}_amd64.deb";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-nHdF9RDOkM9HwwmK/axiIPM4nmKrWp/FHNC/EI1vTTc=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ alsa-lib gtk3 libXScrnSaver libXtst mesa nss ];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
unpackCmd = ''
|
|
|
|
# If unpacking using -x option, there is a permission error
|
|
|
|
dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner;
|
2021-10-28 06:52:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
mkdir -p $out
|
|
|
|
mv bin $out
|
|
|
|
mv lib $out
|
|
|
|
mv share $out
|
|
|
|
|
|
|
|
cp $out/lib/pocket-casts/resources/app/icon.png $out/share/pixmaps/pocket-casts.png
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
substituteInPlace $out/share/applications/pocket-casts.desktop \
|
2022-11-21 17:40:18 +00:00
|
|
|
--replace Name=pocket-casts "Name=Pocket Casts" \
|
|
|
|
--replace GenericName=pocket-casts "GenericName=Podcasts App" \
|
|
|
|
--replace Exec=pocket-casts Exec=$out/bin/pocket-casts
|
2021-10-28 06:52:43 +00:00
|
|
|
makeWrapper ${electron}/bin/electron \
|
|
|
|
$out/bin/pocket-casts \
|
2022-11-21 17:40:18 +00:00
|
|
|
--add-flags $out/lib/pocket-casts/resources/app/main.js
|
2021-10-28 06:52:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pocket Casts webapp, packaged for the Linux Desktop";
|
|
|
|
homepage = "https://github.com/felicianotech/pocket-casts-desktop-app";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|