podcastindex-db: init at 2025-04-27
This commit is contained in:
74
pkgs/by-name/podcastindex-db/package.nix
Normal file
74
pkgs/by-name/podcastindex-db/package.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
_experimental-update-script-combinators,
|
||||
curl,
|
||||
fetchFromGitea,
|
||||
git,
|
||||
gnutar,
|
||||
lib,
|
||||
nix-update-script,
|
||||
sqlite,
|
||||
stdenv,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "podcastindex-db";
|
||||
version = "0-unstable-2025-04-27";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.uninsane.org";
|
||||
owner = "colin";
|
||||
repo = "podcastindex-db-mirror";
|
||||
rev = "354ad295ea6b46055e71405d77e841d20b265e8c";
|
||||
hash = "sha256-nhjZ2AIlDa7OX5/UFOqF5acyKT5wkdyD9/mpbp4bzvE=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
cp podcastindex_feeds.csv $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = rec {
|
||||
updateNixFromMirror = nix-update-script {
|
||||
extraArgs = [ "--version" "branch" ];
|
||||
};
|
||||
mirror-update-script = writeShellApplication {
|
||||
name = "mirror-update-script";
|
||||
runtimeInputs = [
|
||||
curl
|
||||
git
|
||||
gnutar
|
||||
sqlite
|
||||
];
|
||||
text = ''
|
||||
set -x
|
||||
pushd "$(mktemp -d podcastindex.XXXXXXXX --tmpdir)"
|
||||
|
||||
git clone git@git.uninsane.org:colin/podcastindex-db-mirror.git
|
||||
cd podcastindex-db-mirror
|
||||
./update
|
||||
|
||||
git push origin master
|
||||
|
||||
popd
|
||||
'';
|
||||
};
|
||||
updateMirrorFromUpstream = lib.getExe mirror-update-script;
|
||||
updateScript = _experimental-update-script-combinators.sequence [
|
||||
updateMirrorFromUpstream
|
||||
updateNixFromMirror
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "csv database of 800k+ known public podcasts";
|
||||
homepage = "https://podcastindex.org";
|
||||
maintainers = with maintainers; [ colinsane ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user