{headscale-ui, ai-robots-txt}: track with npins

This commit is contained in:
raf 2025-04-19 18:55:29 +03:00
commit f0e6e546d8
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 69 additions and 34 deletions

View file

@ -1,5 +1,21 @@
{
"pins": {
"ai-robots-txt": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "ai-robots-txt",
"repo": "ai.robots.txt"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "v1.28",
"revision": "e0cdb278fbd243f554579fe5050850f124b286a8",
"url": "https://api.github.com/repos/ai-robots-txt/ai.robots.txt/tarball/v1.28",
"hash": "1lv5alddyk2wcqnsnb2x7i0n9m127mjmaa083im14a4hygw7d7r7"
},
"ani-cli": {
"type": "GitRelease",
"repository": {
@ -59,6 +75,22 @@
"url": null,
"hash": "037psx1j608hkl8d3d84ybyvh8fky82i1ihkpa0xnavqagnjc0fr"
},
"headscale-ui": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "gurucomputing",
"repo": "headscale-ui"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "2025.03.21",
"revision": "84aec5f45a64d5537237f2fccdf86581df42726b",
"url": "https://api.github.com/repos/gurucomputing/headscale-ui/tarball/2025.03.21",
"hash": "1zs6f5da9d0a8vin98alfsdyip1av624yyl43kjyw88dicw78y3n"
},
"mov-cli": {
"type": "GitRelease",
"repository": {

View file

@ -2,36 +2,37 @@
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ai-robots-txt";
version = "1.28";
pins,
}: let
pin = pins.ai-robots-txt;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ai-robots-txt";
inherit (pin) version;
src = fetchurl {
url = "https://github.com/ai-robots-txt/ai.robots.txt/releases/download/v${finalAttrs.version}/robots.txt";
hash = "sha256-Cx01MI5Rss08lLgzwoppou0nqD0HxvfUbsa1NRVp8eQ=";
};
src = fetchurl {
url = "https://github.com/ai-robots-txt/ai.robots.txt/releases/download/${finalAttrs.version}/robots.txt";
hash = "sha256-Cx01MI5Rss08lLgzwoppou0nqD0HxvfUbsa1NRVp8eQ=";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
installPhase = ''
runHook preInstall
mkdir -p $out/share
mkdir -p $out/share
cp $src $out/share/robots.txt
# Only copy relevant files
cp .htaccess nginx-block-ai-bots.conf nginx-block-ai-bots.conf able-of-bot-metrics.md $out/share
runHook postInstall
'';
runHook postInstall
'';
meta = {
description = "List of AI agents and robots to block";
homepage = "https://github.com/ai-robots-txt/ai.robots.txt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [NotAShelf];
platforms = lib.platforms.all;
};
})
meta = {
description = "List of AI agents and robots to block";
homepage = "https://github.com/ai-robots-txt/ai.robots.txt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [NotAShelf];
platforms = lib.platforms.all;
};
})

View file

@ -1,15 +1,17 @@
{
lib,
stdenvNoCC,
fetchzip,
lib,
pins,
}: let
pname = "headscale-ui";
version = "2025.03.21";
pin = pins.headscale-ui;
in
stdenvNoCC.mkDerivation {
inherit pname version;
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "headscale-ui";
inherit (pin) version;
src = fetchzip {
url = "https://github.com/gurucomputing/headscale-ui/releases/download/${version}/headscale-ui.zip";
url = "https://github.com/gurucomputing/headscale-ui/releases/download/${finalAttrs.version}/headscale-ui.zip";
sha256 = "sha256-Autk8D9G1Ott2ahbgJ7mGZKDChsSDgfrOhnurNiIdsQ=";
};
@ -29,4 +31,4 @@ in
license = [lib.licenses.bsd3];
maintainers = with lib.maintainers; [NotAShelf];
};
}
})