2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, buildNpmPackage
|
2023-02-09 11:40:11 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, makeDesktopItem
|
2024-01-02 11:29:13 +00:00
|
|
|
, copyDesktopItems
|
2023-02-09 11:40:11 +00:00
|
|
|
, makeWrapper
|
2024-01-02 11:29:13 +00:00
|
|
|
, electron
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildNpmPackage rec {
|
2021-10-28 06:52:43 +00:00
|
|
|
pname = "pocket-casts";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7.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}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-d4uVeHy4/91Ki6Wk6GlOt2lcK6U+M7fOryiOYA7q/x4=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
npmDepsHash = "sha256-rMLUQGcbBJBbxXP67lXp0ww8U2HYM/m1CP2dOw1cCHc=";
|
|
|
|
|
|
|
|
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
|
|
|
|
|
|
|
dontNpmBuild = true;
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 $out/lib/node_modules/pocket-casts/icon.png $out/share/pixmaps/pocket-casts.png
|
|
|
|
install -Dm644 $out/lib/node_modules/pocket-casts/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 \
|
2024-01-02 11:29:13 +00:00
|
|
|
--add-flags $out/lib/node_modules/pocket-casts/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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "pocket-casts";
|
2023-02-09 11:40:11 +00:00
|
|
|
platforms = platforms.linux;
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
}
|