2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, electron
|
|
|
|
, copyDesktopItems
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
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
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "felicianotech";
|
|
|
|
repo = "pocket-casts-desktop-app";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-WMv2G4b7kYnWy0pz8YyI2eTdefs1mtWau+HQLiRygjE=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
desktopName = "Pocket Casts";
|
|
|
|
genericName = "Podcasts Listener";
|
|
|
|
exec = "pocket-casts";
|
|
|
|
icon = "pocket-casts";
|
|
|
|
comment = meta.description;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
nativeBuildInputs = [
|
2023-02-09 11:40:11 +00:00
|
|
|
copyDesktopItems
|
2021-10-28 06:52:43 +00:00
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
mkdir -p $out/bin $out/opt/pocket-casts $out/share/pixmaps
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
cp -r main.js tray-icon.png LICENSE $out/opt/pocket-casts
|
|
|
|
install -Dm644 icon.png $out/share/pixmaps/pocket-casts.png
|
|
|
|
install -Dm644 icon-x360.png $out/share/pixmaps/pocket-casts-x360.png
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/pocket-casts \
|
|
|
|
--add-flags $out/opt/pocket-casts/main.js
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
runHook postInstall
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
2023-02-09 11:40:11 +00:00
|
|
|
platforms = platforms.linux;
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
}
|