{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": { "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": { "ani-cli": {
"type": "GitRelease", "type": "GitRelease",
"repository": { "repository": {
@ -59,6 +75,22 @@
"url": null, "url": null,
"hash": "037psx1j608hkl8d3d84ybyvh8fky82i1ihkpa0xnavqagnjc0fr" "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": { "mov-cli": {
"type": "GitRelease", "type": "GitRelease",
"repository": { "repository": {

View file

@ -2,13 +2,16 @@
lib, lib,
stdenvNoCC, stdenvNoCC,
fetchurl, fetchurl,
}: pins,
stdenvNoCC.mkDerivation (finalAttrs: { }: let
pin = pins.ai-robots-txt;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ai-robots-txt"; pname = "ai-robots-txt";
version = "1.28"; inherit (pin) version;
src = fetchurl { src = fetchurl {
url = "https://github.com/ai-robots-txt/ai.robots.txt/releases/download/v${finalAttrs.version}/robots.txt"; url = "https://github.com/ai-robots-txt/ai.robots.txt/releases/download/${finalAttrs.version}/robots.txt";
hash = "sha256-Cx01MI5Rss08lLgzwoppou0nqD0HxvfUbsa1NRVp8eQ="; hash = "sha256-Cx01MI5Rss08lLgzwoppou0nqD0HxvfUbsa1NRVp8eQ=";
}; };
@ -20,9 +23,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook preInstall 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
''; '';
@ -34,4 +35,4 @@ stdenvNoCC.mkDerivation (finalAttrs: {
maintainers = with lib.maintainers; [NotAShelf]; maintainers = with lib.maintainers; [NotAShelf];
platforms = lib.platforms.all; platforms = lib.platforms.all;
}; };
}) })

View file

@ -1,15 +1,17 @@
{ {
lib,
stdenvNoCC, stdenvNoCC,
fetchzip, fetchzip,
lib, pins,
}: let }: let
pname = "headscale-ui"; pin = pins.headscale-ui;
version = "2025.03.21";
in in
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation (finalAttrs: {
inherit pname version; pname = "headscale-ui";
inherit (pin) version;
src = fetchzip { 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="; sha256 = "sha256-Autk8D9G1Ott2ahbgJ7mGZKDChsSDgfrOhnurNiIdsQ=";
}; };
@ -29,4 +31,4 @@ in
license = [lib.licenses.bsd3]; license = [lib.licenses.bsd3];
maintainers = with lib.maintainers; [NotAShelf]; maintainers = with lib.maintainers; [NotAShelf];
}; };
} })