srht-gen-oauth-tok: init at 0.1

Promote the srht-gen-oauth-tok package to a Nixpkgs package.
This commit is contained in:
Tomas Antonio Lopez 2024-02-07 03:05:04 +01:00
parent 147cc4061e
commit 1c2a4b971e
2 changed files with 14 additions and 3 deletions

View File

@ -102,6 +102,6 @@ in
environment.systemPackages = with pkgs; [
hut # For interacting with the Sourcehut APIs via CLI
(callPackage ../srht-gen-oauth-tok.nix { }) # To automatically generate OAuth tokens
srht-gen-oauth-tok # To automatically generate user OAuth tokens
];
}

View File

@ -1,4 +1,4 @@
{ stdenv, pkgs, lib, fetchFromSourcehut }:
{ stdenv, pkgs, lib, fetchFromSourcehut, nixosTests }:
let
perl = pkgs.perl.withPackages (pps: [
@ -24,8 +24,19 @@ stdenv.mkDerivation rec {
installPhase = "install -Dm755 srht-gen-oauth-tok $out/bin/srht-gen-oauth-tok";
passthru.tests.sourcehut = nixosTests.sourcehut;
meta = {
description = "A script to register a new Sourcehut OAuth token for the given user";
description = "A script to register a new Sourcehut OAuth token for a given user";
longDescription = ''
srht-gen-oauth-tok is a Perl script for automating the generation of user
OAuth tokens for Sourcehut-based code forges. This is done by emulating a
browser and interacting with the Web interface.
'';
maintainers = with lib.maintainers; [ nessdoor ];
mainProgram = "srht-gen-oauth-tok";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
sourceProvenance = [ lib.sourceTypes.fromSource ];
};
}