pkgs: extract podgrab from 'services/podgrab'

This commit is contained in:
Bruno BELANYI 2021-04-19 17:45:05 +00:00
parent edb9c46106
commit b06f265291
3 changed files with 33 additions and 28 deletions

View file

@ -1,2 +1,4 @@
{ pkgs }:
{ }
{
podgrab = pkgs.callPackage ./podgrab { };
}

29
pkgs/podgrab/default.nix Normal file
View file

@ -0,0 +1,29 @@
{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "podgrab";
version = "2021-03-26";
src = fetchFromGitHub {
owner = "akhilrex";
repo = "podgrab";
rev = "3179a875b8b638fb86d0e829d12a9761c1cd7f90";
sha256 = "sha256-vhxIm20ZUi+RusrAsSY54tv/D570/oMO5qLz9dNqgqo=";
};
vendorSha256 = "sha256-xY9xNuJhkWPgtqA/FBVIp7GuWOv+3nrz6l3vaZVLlIE=";
postInstall = ''
mkdir -p $out/share/
cp -r "$src/client" "$out/share/"
cp -r "$src/webassets" "$out/share/"
'';
meta = with lib; {
description = ''
A self-hosted podcast manager to download episodes as soon as they become live
'';
homepage = "https://github.com/akhilrex/podgrab";
license = licenses.gpl3;
};
}

View file

@ -8,33 +8,7 @@ let
domain = config.networking.domain;
podgrabDomain = "podgrab.${domain}";
podgrabPkg = with pkgs; with stdenv; buildGoModule rec {
pname = "podgrab";
version = "2021-03-26";
src = fetchFromGitHub {
owner = "akhilrex";
repo = "podgrab";
rev = "3179a875b8b638fb86d0e829d12a9761c1cd7f90";
sha256 = "sha256-vhxIm20ZUi+RusrAsSY54tv/D570/oMO5qLz9dNqgqo=";
};
vendorSha256 = "sha256-xY9xNuJhkWPgtqA/FBVIp7GuWOv+3nrz6l3vaZVLlIE=";
postInstall = ''
mkdir -p $out/share/
cp -r "$src/client" "$out/share/"
cp -r "$src/webassets" "$out/share/"
'';
meta = with lib; {
description = ''
A self-hosted podcast manager to download episodes as soon as they become live
'';
homepage = "https://github.com/akhilrex/podgrab";
license = licenses.gpl3;
};
};
podgrabPkg = pkgs.ambroisie.podgrab;
in
{
options.my.services.podgrab = with lib; {