Skip to content

Commit

Permalink
feat(pkgs/auth-thu): fetch its source use nvfetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
wrvsrx committed Mar 2, 2024
1 parent f4a071e commit db1319d
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 15 deletions.
29 changes: 15 additions & 14 deletions pkgs/to-normal-packages/auth-thu/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule
, fetchurl
, lib
, source
}:
buildGoModule {
pname = "auth-thu";
version = "dev";
src = fetchFromGitHub ({
owner = "z4yx";
repo = "GoAuthing";
rev = "8247b3a47ca5fd4ed30fe0b50d3d3db6b4b96c37";
fetchSubmodules = false;
sha256 = "sha256-aIa2OfoXmbikWpMzEqD3fNLAynp7wA+3qhwQSnRe8DE=";
});
vendorHash = "sha256-LSGyy4i4JWopX54wWXZwEtRQfijCgA618FeQErwdy8o=";
inherit (source) pname src;
version = source.version;
vendorHash = "sha256-GRviH+w9WjjuvE0078NU4b9Hf/ZqBaQ9BxiWXeiGeWU=";
patches = [
(fetchurl {
url = "https://github.com/z4yx/GoAuthing/pull/35/commits/5692ef96394416339f507b86cef648a4d4f0937c.patch";
hash = "sha256-qBV6gMioAu7wvyVfP9JNPXF1SLaqxblYCxRO9hLVgv8=";
})
];
subPackages = [ "cli" ];
postInstall = ''
mv $out/bin/cli $out/bin/$pname
'';
postInstall = "mv $out/bin/cli $out/bin/$pname";
meta = with lib; {
description =
"Authentication utility for srun4000 (auth.tsinghua.edu.cn / net.tsinghua.edu.cn / Tsinghua-IPv4)";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/to-normal-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
callIFD = import ../callIFD.nix;
in
rec {
auth-thu = callPackage ./auth-thu { };
auth-thu = callPackage ./auth-thu { source = sources.auth-thu; };
autodiff = callPackage ./autodiff { source = sources.autodiff; };
inherit (callPackage ./noto-fonts-cjk { })
noto-fonts-cjk-sans-fix-weight
Expand Down
20 changes: 20 additions & 0 deletions pkgs/to-sources/_sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@
},
"version": "1.4.4"
},
"auth-thu": {
"cargoLocks": null,
"date": "2023-12-19",
"extract": null,
"name": "auth-thu",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "z4yx",
"repo": "GoAuthing",
"rev": "40e2145985c532504bc6dea05c96bc28e7e9e41d",
"sha256": "sha256-cqtDzfYVDPTeDRfB9WPJqvG4AgFANDmKwZ/nXkL6RYg=",
"type": "github"
},
"version": "40e2145985c532504bc6dea05c96bc28e7e9e41d"
},
"autobean-format": {
"cargoLocks": null,
"date": "2023-09-17",
Expand Down
12 changes: 12 additions & 0 deletions pkgs/to-sources/_sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
sha256 = "sha256-PSIWbOyBtJTVslp3tP5YX81YzTQC5DCfs4WhwwmwFew=";
};
};
auth-thu = {
pname = "auth-thu";
version = "40e2145985c532504bc6dea05c96bc28e7e9e41d";
src = fetchFromGitHub {
owner = "z4yx";
repo = "GoAuthing";
rev = "40e2145985c532504bc6dea05c96bc28e7e9e41d";
fetchSubmodules = false;
sha256 = "sha256-cqtDzfYVDPTeDRfB9WPJqvG4AgFANDmKwZ/nXkL6RYg=";
};
date = "2023-12-19";
};
autobean-format = {
pname = "autobean-format";
version = "7849d89eefb433036736bbb1c3168eb02337d34c";
Expand Down
4 changes: 4 additions & 0 deletions pkgs/to-sources/nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,7 @@ fetch.github = "kovidgoyal/calibre"
[metacubexd]
src.github_tag = "MetaCubeX/metacubexd"
fetch.url = "https://github.com/MetaCubeX/metacubexd/releases/download/$ver/compressed-dist.tgz"

[auth-thu]
src.git = "https://github.com/z4yx/GoAuthing"
fetch.github = "z4yx/GoAuthing"

0 comments on commit db1319d

Please sign in to comment.