Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
59 lines
1.5 KiB
Nix
59 lines
1.5 KiB
Nix
{ lib
|
|
, buildNpmPackage
|
|
, fetchFromGitHub
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
, makeWrapper
|
|
, electron
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "pocket-casts";
|
|
version = "0.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "felicianotech";
|
|
repo = "pocket-casts-desktop-app";
|
|
rev = "v${version}";
|
|
hash = "sha256-PwM9B2Qx4TxlcahQM/KEBTzWKc4cNrleDEYKg0m8bVE=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-WPuXTcHCKrwepITGtZFCIwylVAdYlI3cNsuhqx1AEYI=";
|
|
|
|
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
|
|
|
dontNpmBuild = true;
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = pname;
|
|
desktopName = "Pocket Casts";
|
|
genericName = "Podcasts Listener";
|
|
exec = "pocket-casts";
|
|
icon = "pocket-casts";
|
|
comment = meta.description;
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
copyDesktopItems
|
|
makeWrapper
|
|
];
|
|
|
|
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
|
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/pocket-casts \
|
|
--add-flags $out/lib/node_modules/pocket-casts/main.js
|
|
'';
|
|
|
|
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; [ yayayayaka ];
|
|
mainProgram = "pocket-casts";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|