diff options
author | EuAndreh <eu@euandre.org> | 2023-03-31 11:59:52 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-31 15:53:25 -0300 |
commit | 4a7f3e164ca3ab0e910f80cf4ad892999d7ecda8 (patch) | |
tree | e3bba8fb90ced8d18ec5eaefd0f3f522eb088f4f | |
parent | paku.lock: s/packages/pkgs/ (diff) | |
download | package-repository-4a7f3e164ca3ab0e910f80cf4ad892999d7ecda8.tar.gz package-repository-4a7f3e164ca3ab0e910f80cf4ad892999d7ecda8.tar.xz |
paku.lock: Generate this file from src/bin/paku.in
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | default.nix | 73 | ||||
-rw-r--r-- | paku.json | 70 | ||||
-rw-r--r-- | paku.lock | 372 | ||||
-rwxr-xr-x | src/bin/paku.in | 208 | ||||
-rw-r--r-- | src/org/euandre/packages.scm | 61 |
6 files changed, 464 insertions, 326 deletions
@@ -25,6 +25,12 @@ derived-assets = \ all: guix nix debian alpine homebrew $(derived-assets) + +refresh: src/bin/paku + paku refresh < paku.json > paku.lock + + + paku.lock: src/bin/paku Makefile touch $@ diff --git a/default.nix b/default.nix index 3f9db4d..5272575 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ self: super: { org-euandre = rec { git-permalink-0-1-0 = pkgs.stdenv.mkDerivation rec { name = "git-permalink"; - version = "v0.1.0"; + version = "0.1.0"; src = fetchTarball { url = @@ -38,7 +38,7 @@ self: super: { }; git-permalink-0-2-0 = pkgs.stdenv.mkDerivation rec { name = "git-permalink"; - version = "v0.2.0"; + version = "0.2.0"; src = fetchTarball { url = @@ -71,40 +71,6 @@ self: super: { platforms = platforms.unix; }; }; - remembering-0-1-2 = pkgs.stdenv.mkDerivation rec { - name = "remembering"; - version = "v0.1.2"; - - src = fetchTarball { - url = - "https://euandre.org/git/remembering/snapshot/remembering-v0.1.2.tar.xz"; - sha256 = "1mrkyfcgz77hw7mpgqrnsaws9qng2awf8flslzf1s1gikk3zljns"; - }; - - nativeBuildInputs = with pkgs; [ - ]; - - buildInputs = with pkgs; [ - ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - doCheck = true; - enableParallelBuilding = true; - - meta = with pkgs.lib; { - description = "Add memory to dmenu, fzf and similar tools"; - longDescription = '' - It can wrap such tools to accumulate preferences over time, and - re-arrange the input according to common picks. - ''; - homepage = "https://euandre.org/s/remembering/"; - changelog = "https://euandre.org/s/remembering/CHANGELOG.html"; - downloadPage = "https://euandre.org/s/remembering/#releases"; - license = licenses.agpl3Plus; - platforms = platforms.unix; - }; - }; td = pkgs.stdenv.mkDerivation rec { name = "td"; version = "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8"; @@ -141,40 +107,5 @@ self: super: { platforms = platforms.unix; }; }; - guile-heredoc = pkgs.stdenv.mkDerivation rec { - name = "guile-heredoc"; - version = "065435cdce609604e33b879b9be3e81ab89f3e7b"; - - src = fetchTarball { - url = - "https://euandre.org/git/guile-heredoc/snapshot/guile-heredoc-065435cdce609604e33b879b9be3e81ab89f3e7b.tar.xz"; - sha256 = "179qq17mgi4kakhj9w1dk26afljh5yad4j9ih9d8wms70x6h211m"; - }; - - nativeBuildInputs = with pkgs; [ - texinfo - ]; - - buildInputs = with pkgs; [ - guile - ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - doCheck = true; - enableParallelBuilding = true; - - meta = with pkgs.lib; { - description = "Guile heredoc syntax"; - longDescription = '' - Guile heredoc syntax long. - ''; - homepage = "https://euandre.org/s/guile-heredoc/"; - changelog = "https://euandre.org/s/guile-heredoc/CHANGELOG.html"; - downloadPage = "https://euandre.org/s/guile-heredoc/#releases"; - license = licenses.agpl3Plus; - platforms = platforms.unix; - }; - }; }; } @@ -1,14 +1,51 @@ { - "tarball-template": "https://euandre.org/git/@name@/snapshot/@name@-@version@.tar.xz", - "repository-template": "https://euandre.org/git/@name@/", + "guix": { + "module-use": [ + "guile", + "texinfo" + ] + }, + "mappings": { + "guix": { + "packages": { + "guile": [ + "guile-3.0" + ] + } + } + }, + "namespace": "org.euandre", + "name": "EuAndreh", + "maintainer": { + "name": "EuAndreh", + "email": "eu@euandre.org" + }, + "base-url": "https://euandre.org/s/package-repository", + "vcs": { + "git": "git://euandre.org/package-repository", + "http": "https://euandre.org/git/package-repository", + "tarball": "https://euandre.org/git/package-repository/snapshot/package-repository-main.tar.xz" + }, "defaults": { + "templates": { + "tarball": "https://euandre.org/git/@name@/snapshot/@name@-@version@.tar.xz", + "repository": "https://euandre.org/git/@name@/", + "base-url": "https://euandre.org/s/@name@", + "homepage": "https://euandre.org/s/@name@/", + "changelog": "https://euandre.org/s/@name@/CHANGELOG.html", + "downloads-page": "https://euandre.org/s/@name@/#releases", + "fname": "@name@-@version@.tar.xz" + }, "format": ".tar.xz", "maintainer": "EuAndreh <eu@euandre.org>", + "default_branch": "main", "versions": { - "branches": [], "tags": "all", - "latest": "main" + "branches": [ + "main" + ] }, + "license": "AGPL-3.0-or-later", "architectures": [ "i386", "x86_64", @@ -18,8 +55,29 @@ }, "packages": { "any": [ - "git-permalink", - "remembering", + { + "name": "git-permalink", + "branches": [], + "exclude-tags": [ + "v0.2.1", + "v0.2.2", + "v0.2.3", + "v0.3.0", + "v0.3.1" + ] + }, + { + "name": "remembering", + "branches": [], + "exclude-tags": [ + "v0.1.0", + "v0.1.1", + "v0.1.2", + "v0.2.0", + "v0.2.1", + "v0.3.0" + ] + }, "td" ], "all": [ @@ -1,191 +1,189 @@ { - "datadir": ".paku", - "guix": { - "module-use": [ - "guile", - "texinfo" - ] - }, - "mappings": { - "guix": { - "packages": { - "guile": [ - "guile-3.0" - ] - } - } - }, - "namespace": "org.euandre", - "maintainer": { - "name": "EuAndreh", - "email": "eu@euandre.org" - }, - "name": "EuAndreh", - "base-url": "https://euandre.org/s/package-repository", - "vcs": { - "git": "git://euandre.org/package-repository", - "http": "https://euandre.org/git/package-repository/", - "tarball": "https://euandre.org/git/package-repository/snapshot/package-repository-main.tar.xz" - }, - "pkgs": [ - { - "name": "git-permalink", - "license": "AGPL-3.0-or-later", - "native-inputs": [], - "inputs": [], - "version": "0.1.0", - "vversion": "v0.1.0", - "date": "2021-06-13", - "label": "0-1-0", - "sha256": "252c98e349fed8df180ace540675b69a811ff56a9f06fa505eb475e047648a1f", - "sha256guix": "07waci3y0xdlbr8gl1lzdbsiz0csnrshcm6f18cdzn7y97irhb15", - "sha256nix": "1jb0rgcj5b4bkm5gds3l0dymf3gd644r2njmirs9345vf54if45y", - "sha512": "4d508704333c7c19432a5e021e561e5fe96175631230b09a672cfca984c55ee83dc55e82f4c29e7666db55997ddff59e54fc1d3c4cd72f78dc688fd1dd68a091", - "url": "https://euandre.org/git/git-permalink/snapshot/git-permalink-v0.1.0.tar.xz", - "base-url": "https://euandre.org/s/git-permalink", - "homepage": "https://euandre.org/s/git-permalink/", - "changelog": "https://euandre.org/s/git-permalink/CHANGELOG.html", - "downloads-page": "https://euandre.org/s/git-permalink/#releases", - "fname": "git-permalink-v0.1.0.tar.xz", - "manpages": true, - "i18n": false, - "maintainer": "EuAndreh <eu@euandre.org>", - "maintainer-b64": "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", - "architectures": "any", - "type": "tag", - "description": "Git extension to generate web permalinks of files in a repository", - "description-b64": "R2l0IGV4dGVuc2lvbiB0byBnZW5lcmF0ZSB3ZWIgcGVybWFsaW5rcyBvZiBmaWxlcyBpbiBhIHJlcG9zaXRvcnk=", - "long-description": "It knows about many of the existing code forges, but allows for URL\ntemplate overrides to be used on custom domains or deployments via git\nconfig.", - "long-description-b64": "SXQga25vd3MgYWJvdXQgbWFueSBvZiB0aGUgZXhpc3RpbmcgY29kZSBmb3JnZXMsIGJ1dCBhbGxvd3MgZm9yIFVSTAp0ZW1wbGF0ZSBvdmVycmlkZXMgdG8gYmUgdXNlZCBvbiBjdXN0b20gZG9tYWlucyBvciBkZXBsb3ltZW50cyB2aWEgZ2l0CmNvbmZpZy4=" - }, - { - "name": "git-permalink", - "license": "AGPL-3.0-or-later", - "native-inputs": [], - "inputs": [], - "version": "0.2.0", - "vversion": "v0.2.0", - "date": "2021-06-19", - "label": "0-2-0", - "sha256": "9ea6562812f6127771bc2b86919ea63056fcc0f5c1e556875855c924ee8b1183", - "sha256guix": "10qiigp29jamb23mdrf1yp0gqmihlsg931ibpiqpf4pn28l5d9ly", - "sha256nix": "1bzx4gdfc87jfshaqifxpc3llp2j98wkzjjslzwbrqn59jzakxc9", - "sha512": "c75da25709b6b074812d34dfa5371a6dd53d31f1ce2828c594cf3c62bdd90b421d14f5733782fcaed178db830236eeb87a8ae2fb90e773270222ae64750625d0", - "url": "https://euandre.org/git/git-permalink/snapshot/git-permalink-v0.2.0.tar.xz", - "base-url": "https://euandre.org/s/git-permalink", - "homepage": "https://euandre.org/s/git-permalink/", - "changelog": "https://euandre.org/s/git-permalink/CHANGELOG.html", - "downloads-page": "https://euandre.org/s/git-permalink/#releases", - "fname": "git-permalink-v0.2.0.tar.xz", - "manpages": true, - "i18n": false, - "maintainer": "EuAndreh <eu@euandre.org>", - "maintainer-b64": "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", - "architectures": "any", - "type": "tag", - "description": "Git extension to generate web permalinks of files in a repository", - "description-b64": "R2l0IGV4dGVuc2lvbiB0byBnZW5lcmF0ZSB3ZWIgcGVybWFsaW5rcyBvZiBmaWxlcyBpbiBhIHJlcG9zaXRvcnk=", - "long-description": "It knows about many of the existing code forges, but allows for URL\ntemplate overrides to be used on custom domains or deployments via git\nconfig.", - "long-description-b64": "SXQga25vd3MgYWJvdXQgbWFueSBvZiB0aGUgZXhpc3RpbmcgY29kZSBmb3JnZXMsIGJ1dCBhbGxvd3MgZm9yIFVSTAp0ZW1wbGF0ZSBvdmVycmlkZXMgdG8gYmUgdXNlZCBvbiBjdXN0b20gZG9tYWlucyBvciBkZXBsb3ltZW50cyB2aWEgZ2l0CmNvbmZpZy4=" - }, - { - "name": "remembering", - "license": "AGPL-3.0-or-later", - "native-inputs": [], - "inputs": [], - "version": "0.1.2", - "vversion": "v0.1.2", - "date": "2021-01-26", - "label": "0-1-2", - "sha256": "bbf0fd451d3de3b09a01cfbcc74482741463f9d8ac73ba6024e538c203b1dfeb", - "sha256guix": "1syzn41w4f754ihblwxcv3wn653lh92cgg6g06db1qrx3m2zvw5v", - "sha256nix": "1mrkyfcgz77hw7mpgqrnsaws9qng2awf8flslzf1s1gikk3zljns", - "sha512": "9611c50963e9db2a2732e07e64d4435ececff291bd2302ffca93fbe596144a97cb06b1f464385de19151841b44e0bf151cc92ce28eb01d836e3dfcca05170999", - "url": "https://euandre.org/git/remembering/snapshot/remembering-v0.1.2.tar.xz", - "base-url": "https://euandre.org/s/remembering", - "homepage": "https://euandre.org/s/remembering/", - "changelog": "https://euandre.org/s/remembering/CHANGELOG.html", - "downloads-page": "https://euandre.org/s/remembering/#releases", - "fname": "remembering-v0.1.2.tar.xz", - "manpages": true, - "i18n": false, - "maintainer": "EuAndreh <eu@euandre.org>", - "maintainer-b64": "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", - "architectures": "any", - "type": "tag", - "description": "Add memory to dmenu, fzf and similar tools", - "description-b64": "QWRkIG1lbW9yeSB0byBkbWVudSwgZnpmIGFuZCBzaW1pbGFyIHRvb2xz", - "long-description": "It can wrap such tools to accumulate preferences over time, and\nre-arrange the input according to common picks.", - "long-description-b64": "SXQgY2FuIHdyYXAgc3VjaCB0b29scyB0byBhY2N1bXVsYXRlIHByZWZlcmVuY2VzIG92ZXIgdGltZSwgYW5kCnJlLWFycmFuZ2UgdGhlIGlucHV0IGFjY29yZGluZyB0byBjb21tb24gcGlja3Mu" - }, - { - "name": "td", - "license": "AGPL-3.0-or-later", - "native-inputs": [], - "inputs": [], - "version": "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", - "vversion": "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", - "date": "2022-03-27", - "label": "latest", - "sha256": "a25561ae8062788bfb79df2de5f26e5f1100638fbeabff934490cdf0a9dde105", - "sha256guix": "01g1vnlz1kch8j9zzaxyixih04azdvrfabfzg7xqny32h2p62md2", - "sha256nix": "1xqr2vc270jydk508pbkhcchmbg74w4bf83ch2d85nqja14r64n9", - "sha512": "59071e6fbe3a70a8c0b435a050f274f768e1476759e8645d960e5f1a12d88f9eab6765b3ecc7a2696a9205f454d6d3ae5a080d63b133b3574baeb48f048a1952", - "url": "https://euandre.org/git/td/snapshot/td-4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8.tar.xz", - "base-url": "https://euandre.org/s/td", - "homepage": "https://euandre.org/s/td/", - "changelog": "https://euandre.org/s/td/CHANGELOG.html", - "downloads-page": "https://euandre.org/s/td/#releases", - "fname": "td-4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8.tar.xz", - "manpages": true, - "i18n": true, - "maintainer": "EuAndreh <eu@euandre.org>", - "maintainer-b64": "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", - "architectures": "any", - "type": "latest", - "description": "Minimalistic bug tracker CLI", - "description-b64": "TWluaW1hbGlzdGljIGJ1ZyB0cmFja2VyIENMSQ==", - "long-description": "Create and maintain a TODOs.md files as a bug database.\n\nIt is a tool for distributed, offline issue tracking, reified as a simple text\nfile in the repository.", - "long-description-b64": "Q3JlYXRlIGFuZCBtYWludGFpbiBhIFRPRE9zLm1kIGZpbGVzIGFzIGEgYnVnIGRhdGFiYXNlLgoKSXQgaXMgYSB0b29sIGZvciBkaXN0cmlidXRlZCwgb2ZmbGluZSBpc3N1ZSB0cmFja2luZywgcmVpZmllZCBhcyBhIHNpbXBsZSB0ZXh0CmZpbGUgaW4gdGhlIHJlcG9zaXRvcnku" - }, - { - "name": "guile-heredoc", - "license": "AGPL-3.0-or-later", - "architectures": [ - "i386", - "x86_64", - "arm", - "aarch64" - ], - "native-inputs": [ - "texinfo" + "base-url" : "https://euandre.org/s/package-repository", + "datadir" : ".paku", + "defaults" : { + "architectures" : [ + "i386", + "x86_64", + "arm", + "aarch64" ], - "inputs": [ - "guile" + "default_branch" : "main", + "format" : ".tar.xz", + "license" : "AGPL-3.0-or-later", + "maintainer" : "EuAndreh <eu@euandre.org>", + "templates" : { + "base-url" : "https://euandre.org/s/@name@", + "changelog" : "https://euandre.org/s/@name@/CHANGELOG.html", + "downloads-page" : "https://euandre.org/s/@name@/#releases", + "fname" : "@name@-@version@.tar.xz", + "homepage" : "https://euandre.org/s/@name@/", + "repository" : "https://euandre.org/git/@name@/", + "tarball" : "https://euandre.org/git/@name@/snapshot/@name@-@version@.tar.xz" + }, + "versions" : { + "branches" : [ + "main" + ], + "tags" : "all" + } + }, + "guix" : { + "module-use" : [ + "guile", + "texinfo" + ] + }, + "maintainer" : { + "email" : "eu@euandre.org", + "name" : "EuAndreh" + }, + "mappings" : { + "guix" : { + "packages" : { + "guile" : [ + "guile-3.0" + ] + } + } + }, + "name" : "EuAndreh", + "namespace" : "org.euandre", + "packages" : { + "all" : [ + "guile-heredoc" ], - "type": "latest", - "version": "065435cdce609604e33b879b9be3e81ab89f3e7b", - "vversion": "065435cdce609604e33b879b9be3e81ab89f3e7b", - "date": "2022-11-16", - "label": "latest", - "sha256": "4d6e5171f36d48ab2341cc9e3346262f9ec7c9f0fd3d88ec6e204ef2160821f8", - "sha256guix": "1y1110bg4ki0dvn8hggxy34wg7ig4r3377nc84isnj3dydqm2vjd", - "sha256nix": "179qq17mgi4kakhj9w1dk26afljh5yad4j9ih9d8wms70x6h211m", - "sha512": "09071e6fbe3a70a8c0b435a050f274f768e1476759e8645d960e5f1a12d88f9eab6765b3ecc7a2696a9205f454d6d3ae5a080d63b133b3574baeb48f048a1952", - "url": "https://euandre.org/git/guile-heredoc/snapshot/guile-heredoc-065435cdce609604e33b879b9be3e81ab89f3e7b.tar.xz", - "base-url": "https://euandre.org/s/guile-heredoc", - "homepage": "https://euandre.org/s/guile-heredoc/", - "changelog": "https://euandre.org/s/guile-heredoc/CHANGELOG.html", - "downloads-page": "https://euandre.org/s/guile-heredoc/#releases", - "fname": "guile-heredoc-065435cdce609604e33b879b9be3e81ab89f3e7b.tar.xz", - "manpages": true, - "i18n": false, - "maintainer": "EuAndreh <eu@euandre.org>", - "maintainer-b64": "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", - "description": "Guile heredoc syntax", - "description-b64": "R3VpbGUgaGVyZWRvYyBzeW50YXg=", - "long-description": "Guile heredoc syntax long.", - "long-description-b64": "R3VpbGUgaGVyZWRvYyBzeW50YXggbG9uZy4=" - } - ] + "any" : [ + { + "branches" : [], + "exclude-tags" : [ + "v0.2.1", + "v0.2.2", + "v0.2.3", + "v0.3.0", + "v0.3.1" + ], + "name" : "git-permalink" + }, + { + "branches" : [], + "exclude-tags" : [ + "v0.1.0", + "v0.1.1", + "v0.1.2", + "v0.2.0", + "v0.2.1", + "v0.3.0" + ], + "name" : "remembering" + }, + "td" + ] + }, + "pkgs" : [ + { + "architectures" : "any", + "base-url" : "https://euandre.org/s/git-permalink", + "changelog" : "https://euandre.org/s/git-permalink/CHANGELOG.html", + "date" : "2021-06-13", + "description" : "Git extension to generate web permalinks of files in a repository", + "description-b64" : "R2l0IGV4dGVuc2lvbiB0byBnZW5lcmF0ZSB3ZWIgcGVybWFsaW5rcyBvZiBmaWxlcyBpbiBhIHJlcG9zaXRvcnk=", + "downloads-page" : "https://euandre.org/s/git-permalink/#releases", + "fname" : "git-permalink-v0.1.0.tar.xz", + "homepage" : "https://euandre.org/s/git-permalink/", + "i18n" : false, + "inputs" : [], + "label" : "0-1-0", + "license" : "AGPL-3.0-or-later", + "long-description" : "It knows about many of the existing code forges, but allows for URL\ntemplate overrides to be used on custom domains or deployments via git\nconfig.", + "long-description-b64" : "SXQga25vd3MgYWJvdXQgbWFueSBvZiB0aGUgZXhpc3RpbmcgY29kZSBmb3JnZXMsIGJ1dCBhbGxvd3MgZm9yIFVSTAp0ZW1wbGF0ZSBvdmVycmlkZXMgdG8gYmUgdXNlZCBvbiBjdXN0b20gZG9tYWlucyBvciBkZXBsb3ltZW50cyB2aWEgZ2l0CmNvbmZpZy4=", + "maintainer" : "EuAndreh <eu@euandre.org>", + "maintainer-b64" : "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", + "manpages" : true, + "name" : "git-permalink", + "native-inputs" : [], + "revision" : "40320b17d1a51c8cc187891388195a3b57e714f5", + "sha256" : "252c98e349fed8df180ace540675b69a811ff56a9f06fa505eb475e047648a1f", + "sha256guix" : "07waci3y0xdlbr8gl1lzdbsiz0csnrshcm6f18cdzn7y97irhb15", + "sha256nix" : "1jb0rgcj5b4bkm5gds3l0dymf3gd644r2njmirs9345vf54if45y", + "sha512" : "4d508704333c7c19432a5e021e561e5fe96175631230b09a672cfca984c55ee83dc55e82f4c29e7666db55997ddff59e54fc1d3c4cd72f78dc688fd1dd68a091", + "type" : "tag", + "url" : "https://euandre.org/git/git-permalink/snapshot/git-permalink-v0.1.0.tar.xz", + "version" : "0.1.0", + "vlabel" : "0.1.0", + "vname" : "v0.1.0", + "vversion" : "v0.1.0" + }, + { + "architectures" : "any", + "base-url" : "https://euandre.org/s/git-permalink", + "changelog" : "https://euandre.org/s/git-permalink/CHANGELOG.html", + "date" : "2021-06-19", + "description" : "Git extension to generate web permalinks of files in a repository", + "description-b64" : "R2l0IGV4dGVuc2lvbiB0byBnZW5lcmF0ZSB3ZWIgcGVybWFsaW5rcyBvZiBmaWxlcyBpbiBhIHJlcG9zaXRvcnk=", + "downloads-page" : "https://euandre.org/s/git-permalink/#releases", + "fname" : "git-permalink-v0.2.0.tar.xz", + "homepage" : "https://euandre.org/s/git-permalink/", + "i18n" : false, + "inputs" : [], + "label" : "0-2-0", + "license" : "AGPL-3.0-or-later", + "long-description" : "It knows about many of the existing code forges, but allows for URL\ntemplate overrides to be used on custom domains or deployments via git\nconfig.", + "long-description-b64" : "SXQga25vd3MgYWJvdXQgbWFueSBvZiB0aGUgZXhpc3RpbmcgY29kZSBmb3JnZXMsIGJ1dCBhbGxvd3MgZm9yIFVSTAp0ZW1wbGF0ZSBvdmVycmlkZXMgdG8gYmUgdXNlZCBvbiBjdXN0b20gZG9tYWlucyBvciBkZXBsb3ltZW50cyB2aWEgZ2l0CmNvbmZpZy4=", + "maintainer" : "EuAndreh <eu@euandre.org>", + "maintainer-b64" : "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", + "manpages" : true, + "name" : "git-permalink", + "native-inputs" : [], + "revision" : "2b98d4b91dbde288a6168594ec9c48a60dd91f83", + "sha256" : "9ea6562812f6127771bc2b86919ea63056fcc0f5c1e556875855c924ee8b1183", + "sha256guix" : "10qiigp29jamb23mdrf1yp0gqmihlsg931ibpiqpf4pn28l5d9ly", + "sha256nix" : "1bzx4gdfc87jfshaqifxpc3llp2j98wkzjjslzwbrqn59jzakxc9", + "sha512" : "c75da25709b6b074812d34dfa5371a6dd53d31f1ce2828c594cf3c62bdd90b421d14f5733782fcaed178db830236eeb87a8ae2fb90e773270222ae64750625d0", + "type" : "tag", + "url" : "https://euandre.org/git/git-permalink/snapshot/git-permalink-v0.2.0.tar.xz", + "version" : "0.2.0", + "vlabel" : "0.2.0", + "vname" : "v0.2.0", + "vversion" : "v0.2.0" + }, + { + "architectures" : "any", + "base-url" : "https://euandre.org/s/td", + "changelog" : "https://euandre.org/s/td/CHANGELOG.html", + "date" : "2022-03-27", + "description" : "Minimalistic bug tracker CLI", + "description-b64" : "TWluaW1hbGlzdGljIGJ1ZyB0cmFja2VyIENMSQ==", + "downloads-page" : "https://euandre.org/s/td/#releases", + "fname" : "td-4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8.tar.xz", + "homepage" : "https://euandre.org/s/td/", + "i18n" : true, + "inputs" : [], + "label" : "latest", + "license" : "AGPL-3.0-or-later", + "long-description" : "Create and maintain a TODOs.md files as a bug database.\n\nIt is a tool for distributed, offline issue tracking, reified as a simple text\nfile in the repository.", + "long-description-b64" : "Q3JlYXRlIGFuZCBtYWludGFpbiBhIFRPRE9zLm1kIGZpbGVzIGFzIGEgYnVnIGRhdGFiYXNlLgoKSXQgaXMgYSB0b29sIGZvciBkaXN0cmlidXRlZCwgb2ZmbGluZSBpc3N1ZSB0cmFja2luZywgcmVpZmllZCBhcyBhIHNpbXBsZSB0ZXh0CmZpbGUgaW4gdGhlIHJlcG9zaXRvcnku", + "maintainer" : "EuAndreh <eu@euandre.org>", + "maintainer-b64" : "RXVBbmRyZWggPGV1QGV1YW5kcmUub3JnPg==", + "manpages" : true, + "name" : "td", + "native-inputs" : [], + "revision" : "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", + "sha256" : "a25561ae8062788bfb79df2de5f26e5f1100638fbeabff934490cdf0a9dde105", + "sha256guix" : "01g1vnlz1kch8j9zzaxyixih04azdvrfabfzg7xqny32h2p62md2", + "sha256nix" : "1xqr2vc270jydk508pbkhcchmbg74w4bf83ch2d85nqja14r64n9", + "sha512" : "59071e6fbe3a70a8c0b435a050f274f768e1476759e8645d960e5f1a12d88f9eab6765b3ecc7a2696a9205f454d6d3ae5a080d63b133b3574baeb48f048a1952", + "type" : "branch", + "url" : "https://euandre.org/git/td/snapshot/td-4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8.tar.xz", + "version" : "main", + "vlabel" : "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", + "vname" : "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8", + "vversion" : "4a8a7a2662c94b2581f587e9a4b81feba4f5e7d8" + } + ], + "vcs" : { + "git" : "git://euandre.org/package-repository", + "http" : "https://euandre.org/git/package-repository", + "tarball" : "https://euandre.org/git/package-repository/snapshot/package-repository-main.tar.xz" + } } diff --git a/src/bin/paku.in b/src/bin/paku.in index f5392bd..d2900f2 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -6,10 +6,16 @@ use feature 'signatures'; no warnings ('experimental::signatures'); use Scalar::Util qw(looks_like_number); use Getopt::Std (); + use JSON (); + use File::Basename (); +use File::Temp (); +use File::Fetch (); + use Digest::MD5 (); use Digest::SHA (); +use MIME::Base64 (); sub usage($fh) { print $fh <<~'EOF' @@ -245,7 +251,7 @@ sub emit_nix() { print <<~EOF; $pkg->{name}$suffix = pkgs.stdenv.mkDerivation rec { name = "$pkg->{name}"; - version = "$pkg->{vversion}"; + version = "$pkg->{vlabel}"; src = fetchTarball { url = @@ -336,7 +342,7 @@ sub emit_guix() { (define-public $name (package (name "$pkg->{name}") - (version "$pkg->{version}") + (version "$pkg->{vlabel}") (source (origin (method url-fetch) @@ -954,6 +960,203 @@ sub emit_html() { } +sub run_template($name, $version, $template) { + return ($template =~ s/\@name\@/$name/gr) =~ s/\@version\@/$version/gr; +} + +sub set_difference($s1, $s2) { + my %idx = (); + for (@{$s1}) { + $idx{$_} = 1; + } + for (@{$s2}) { + delete $idx{$_}; + } + return keys(%idx); +} + +sub emit_refresh() { + my $json_str = do { + local $/; + <STDIN>; + }; + my $json = JSON::decode_json($json_str); + + my $defaults = { + datadir => '.paku', + guix => {}, + mappings => {}, + maintainer => { + name => '', + email => '', + }, + namespace => '', + name => '', + 'base-url' => '', + vcs => { + git => '', + http => '', + tarball => '', + }, + pkgs => [], + }; + my $out = { + %$defaults, + %$json, + }; + + my $default_package = { + maintainer => $out->{defaults}{maintainer} || '', + 'exclude-tags' => [], + }; + for my $package_any (@{$out->{packages}{any}}) { + my $package = ref $package_any ? + { %$default_package, %$package_any } : + { %$default_package, name => $package_any }; + + my $repo_url = run_template($package->{name}, '', $out->{defaults}{templates}{repository}); + my $dir = File::Temp::newdir(); + `git clone '$repo_url' '$dir'`; + die if $?; + + my @versions = (); + my $tags_any = $package->{tags} || $out->{defaults}{versions}{tags}; + my @tags = (); + if (ref $tags_any) { + push @tags, @$tags_any; + } elsif ($tags_any eq 'all') { + my @ret = `git -C '$dir' tag`; + die if $?; + chomp @ret; + + push @tags, set_difference(\@ret, $package->{'exclude-tags'}); + } else { + die "Unknown value of \"tags\": $tags_any"; + } + + for (@tags) { + my $ver = $_ =~ s/^v//gr; + my %version = ( + type => 'tag', + vversion => $_, + version => $ver, + vname => $_, + vlabel => $ver, + label => $ver =~ s/\./-/gr, + ); + push @versions, \%version; + } + + my $default_branch = + $package->{default_branch} || + $out->{defaults}{default_branch} || + 'main'; + my $branches = $package->{branches} || $out->{defaults}{versions}{branches}; + for (@{$branches}) { + my $revision = `git -C '$dir' rev-parse '$_'`; + die if $?; + chomp $revision; + + my $label = $_ eq $default_branch ? 'latest' : $_; + + my %version = ( + type => 'branch', + vversion => $revision, + version => $_, + vname => $revision, + vlabel => $revision, + label => $label, + ); + push @versions, \%version; + } + + for my $version (@versions) { + my $pkg = { + %$version, + name => $package->{name}, + architectures => 'any', + }; + + my $revision = `git -C '$dir' rev-parse '$pkg->{vversion}'`; + die if $?; + chomp $revision; + $pkg->{revision} = $revision; + + `git -C '$dir' checkout '$pkg->{vversion}'`; + die if $?; + my $url = run_template($package->{name}, $pkg->{vname}, $out->{defaults}{templates}{tarball}); + $pkg->{url} = $url; + + my $date = `git -C '$dir' log -1 --format=%cs`; + die if $?; + chomp $date; + $pkg->{date} = $date; + + $pkg->{manpages} = -d "$dir/doc/" ? JSON::true : JSON::false; + $pkg->{i18n} = -d "$dir/po/" ? JSON::true : JSON::false; + + for (qw(description long-description)) { + my $s = do { local(@ARGV, $/) = "$dir/$_"; <> }; + chomp $s; + $pkg->{$_} = $package->{$_} || $s; + } + + my @sha_guix = `guix download '$url'`; + die if $?; + chomp @sha_guix; + $pkg->{sha256guix} = $sha_guix[-1]; + + my $sha_nix = `nix-prefetch-url --unpack '$url'`; + die if $?; + chomp $sha_nix; + $pkg->{sha256nix} = $sha_nix; + + + my $ff = File::Fetch->new(uri => $url); + my $where = $ff->fetch(to => '/tmp'); + my $fh; + + open ($fh, '<', $where) or die "Can't open \"$where\": $!"; + my $sha256 = Digest::SHA->new(256)->addfile($fh)->hexdigest; + close $fh; + $pkg->{sha256} = $sha256; + + open ($fh, '<', $where) or die "Can't open \"$where\": $!"; + my $sha512 = Digest::SHA->new(512)->addfile($fh)->hexdigest; + close $fh; + $pkg->{sha512} = $sha512; + + unlink $where; + + + for (qw(base-url homepage changelog downloads-page fname)) { + $pkg->{$_} = $package->{$_} || + run_template( + $pkg->{name}, + $pkg->{vversion}, + $out->{defaults}{templates}{$_} + ); + } + + for (qw(inputs native-inputs)) { + $pkg->{$_} = $package->{$_} || []; + } + + for (qw(maintainer license)) { + $pkg->{$_} = $package->{$_} || $out->{defaults}{$_}; + } + + for (qw(maintainer description long-description)) { + $pkg->{"$_-b64"} = MIME::Base64::encode_base64($pkg->{$_}, ''); + } + + push @{$out->{pkgs}}, $pkg; + } + } + print JSON->new->pretty->canonical->encode($out); +} + + my %actions = ( 'debian-packages' => \&emit_packages, 'debian-release' => \&emit_release, @@ -965,6 +1168,7 @@ my %actions = ( alpine => \&emit_alpine, homebrew => \&emit_homebrew, html => \&emit_html, + refresh => \&emit_refresh, ); my $action = $ARGV[0] or die "Missing ACTION"; diff --git a/src/org/euandre/packages.scm b/src/org/euandre/packages.scm index c4c03cd..38a0e52 100644 --- a/src/org/euandre/packages.scm +++ b/src/org/euandre/packages.scm @@ -65,34 +65,6 @@ config.") (home-page "https://euandre.org/s/git-permalink/") (license licenses:agpl3+))) -(define-public remembering-0-1-2 - (package - (name "remembering") - (version "0.1.2") - (source - (origin - (method url-fetch) - (uri "https://euandre.org/git/remembering/snapshot/remembering-v0.1.2.tar.xz") - (sha256 - (base32 "1syzn41w4f754ihblwxcv3wn653lh92cgg6g06db1qrx3m2zvw5v")))) - (build-system gnu-build-system) - (native-inputs - (list)) - (inputs - (list)) - (arguments - (list - #:make-flags #~(list (string-append "PREFIX=" #$output)) - #:phases - #~(modify-phases %standard-phases - (delete 'configure)))) - (synopsis "Add memory to dmenu, fzf and similar tools") - (description - "It can wrap such tools to accumulate preferences over time, and -re-arrange the input according to common picks.") - (home-page "https://euandre.org/s/remembering/") - (license licenses:agpl3+))) - (define-public td (package (name "td") @@ -123,38 +95,7 @@ file in the repository.") (home-page "https://euandre.org/s/td/") (license licenses:agpl3+))) -(define-public guile-heredoc - (package - (name "guile-heredoc") - (version "065435cdce609604e33b879b9be3e81ab89f3e7b") - (source - (origin - (method url-fetch) - (uri "https://euandre.org/git/guile-heredoc/snapshot/guile-heredoc-065435cdce609604e33b879b9be3e81ab89f3e7b.tar.xz") - (sha256 - (base32 "1y1110bg4ki0dvn8hggxy34wg7ig4r3377nc84isnj3dydqm2vjd")))) - (build-system gnu-build-system) - (native-inputs - (list - texinfo)) - (inputs - (list - guile-3.0)) - (arguments - (list - #:make-flags #~(list (string-append "PREFIX=" #$output)) - #:phases - #~(modify-phases %standard-phases - (delete 'configure)))) - (synopsis "Guile heredoc syntax") - (description - "Guile heredoc syntax long.") - (home-page "https://euandre.org/s/guile-heredoc/") - (license licenses:agpl3+))) - (list git-permalink-0-1-0 git-permalink-0-2-0 - remembering-0-1-2 - td - guile-heredoc) + td) |