1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-23 09:51:00 +03:00

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,31 +0,0 @@
{ stdenv, pkgs, lib, fetchFromSourcehut }:
let
perl = pkgs.perl.withPackages (pps: [
pps.CryptSSLeay
pps.WWWMechanize
pps.XMLLibXML
]);
in
stdenv.mkDerivation rec {
pname = "srht-gen-oauth-tok";
version = "0.1";
src = fetchFromSourcehut {
domain = "entropic.network";
owner = "~nessdoor";
repo = pname;
rev = version;
hash = "sha256-GcqP3XbVw2sR5n4+aLUmA4fthNkuVAGnhV1h7suJYdI=";
};
buildInputs = [ perl ];
nativeBuildInputs = [ perl ];
installPhase = "install -Dm755 srht-gen-oauth-tok $out/bin/srht-gen-oauth-tok";
meta = {
description = "A script to register a new Sourcehut OAuth token for the given user";
license = lib.licenses.gpl3;
};
}