nixpkgs/pkgs/applications/audio/pocket-casts/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.5 KiB
Nix
Raw Normal View History

2023-02-07 19:48:25 +00:00
{ lib
2023-11-08 22:13:05 +00:00
, buildNpmPackage
2023-02-07 19:48:25 +00:00
, fetchFromGitHub
, makeDesktopItem
2023-11-08 22:13:05 +00:00
, copyDesktopItems
2023-02-07 19:48:25 +00:00
, makeWrapper
2023-11-08 22:13:05 +00:00
, electron
2023-02-07 19:48:25 +00:00
}:
2021-10-25 06:21:15 +01:00
2023-11-08 22:13:05 +00:00
buildNpmPackage rec {
2021-10-25 06:21:15 +01:00
pname = "pocket-casts";
2023-10-25 16:53:21 +01:00
version = "0.7.0";
2021-10-25 06:21:15 +01:00
2023-02-07 19:48:25 +00:00
src = fetchFromGitHub {
owner = "felicianotech";
repo = "pocket-casts-desktop-app";
rev = "v${version}";
2023-11-08 22:13:05 +00:00
hash = "sha256-d4uVeHy4/91Ki6Wk6GlOt2lcK6U+M7fOryiOYA7q/x4=";
2021-10-25 06:21:15 +01:00
};
2023-11-08 22:13:05 +00:00
npmDepsHash = "sha256-rMLUQGcbBJBbxXP67lXp0ww8U2HYM/m1CP2dOw1cCHc=";
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
dontNpmBuild = true;
2023-02-07 19:48:25 +00:00
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Pocket Casts";
genericName = "Podcasts Listener";
exec = "pocket-casts";
icon = "pocket-casts";
comment = meta.description;
})
];
2021-10-25 06:21:15 +01:00
nativeBuildInputs = [
2023-02-07 19:48:25 +00:00
copyDesktopItems
2021-10-25 06:21:15 +01:00
makeWrapper
];
2023-11-08 22:13:05 +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-25 06:21:15 +01:00
2023-02-07 19:48:25 +00:00
makeWrapper ${electron}/bin/electron $out/bin/pocket-casts \
2023-11-08 22:13:05 +00:00
--add-flags $out/lib/node_modules/pocket-casts/main.js
2021-10-25 06:21:15 +01: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-11-08 22:13:05 +00:00
mainProgram = "pocket-casts";
2023-02-07 19:48:25 +00:00
platforms = platforms.linux;
2021-10-25 06:21:15 +01:00
};
}