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.4 KiB
Nix
Raw Normal View History

2023-02-07 20:48:25 +01:00
{ lib
, stdenv
, fetchFromGitHub
, electron
, copyDesktopItems
, makeDesktopItem
, makeWrapper
}:
2021-10-25 07:21:15 +02:00
stdenv.mkDerivation rec {
2021-10-25 07:21:15 +02:00
pname = "pocket-casts";
2022-11-15 22:39:46 +01:00
version = "0.6.0";
2021-10-25 07:21:15 +02:00
2023-02-07 20:48:25 +01:00
src = fetchFromGitHub {
owner = "felicianotech";
repo = "pocket-casts-desktop-app";
rev = "v${version}";
sha256 = "sha256-WMv2G4b7kYnWy0pz8YyI2eTdefs1mtWau+HQLiRygjE=";
2021-10-25 07:21:15 +02:00
};
2023-02-07 20:48:25 +01:00
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Pocket Casts";
genericName = "Podcasts Listener";
exec = "pocket-casts";
icon = "pocket-casts";
comment = meta.description;
})
];
2021-10-25 07:21:15 +02:00
nativeBuildInputs = [
2023-02-07 20:48:25 +01:00
copyDesktopItems
2021-10-25 07:21:15 +02:00
makeWrapper
];
installPhase = ''
runHook preInstall
2023-02-07 20:48:25 +01:00
mkdir -p $out/bin $out/opt/pocket-casts $out/share/pixmaps
2022-11-15 22:39:46 +01:00
2023-02-07 20:48:25 +01: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-25 07:21:15 +02:00
2023-02-07 20:48:25 +01:00
makeWrapper ${electron}/bin/electron $out/bin/pocket-casts \
--add-flags $out/opt/pocket-casts/main.js
2021-10-25 07:21:15 +02:00
2023-02-07 20:48:25 +01:00
runHook postInstall
2021-10-25 07:21:15 +02: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-07 20:48:25 +01:00
platforms = platforms.linux;
2021-10-25 07:21:15 +02:00
};
}