sshwifty: init at 0.4.0-beta-release (#419484)

authored by Gaétan Lepage and committed by GitHub 7fe71e3b 7b268bf9

+66
+66
pkgs/by-name/ss/sshwifty/package.nix
··· 1 + { 2 + lib, 3 + buildGo125Module, 4 + buildNpmPackage, 5 + fetchFromGitHub, 6 + versionCheckHook, 7 + nix-update-script, 8 + go_1_25, 9 + }: 10 + buildGo125Module (finalAttrs: { 11 + pname = "sshwifty"; 12 + version = "0.4.0-beta-release"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "nirui"; 16 + repo = "sshwifty"; 17 + tag = finalAttrs.version; 18 + hash = "sha256-7ZfS46+aflKIQ8S9T18JjCb7bY8mB6cJl/lgJi5Hukg="; 19 + }; 20 + 21 + sshwifty-ui = buildNpmPackage { 22 + pname = "sshwifty-ui"; 23 + inherit (finalAttrs) version src; 24 + 25 + npmDepsHash = "sha256-I96VixL21cF2kp9AK6q0ipjphjdWuSETKakbsprGek0="; 26 + 27 + npmBuildScript = "generate"; 28 + 29 + postInstall = '' 30 + cp -r application/controller/{static_pages,static_pages.go} \ 31 + $out/lib/node_modules/sshwifty-ui/application/controller 32 + ''; 33 + 34 + nativeBuildInputs = [ go_1_25 ]; 35 + }; 36 + 37 + postPatch = '' 38 + cp -r ${finalAttrs.sshwifty-ui}/lib/node_modules/sshwifty-ui/* . 39 + ''; 40 + 41 + vendorHash = "sha256-kLKydjvZtFEY7vjqxK1cCwZSTbdqYWPRmxYSN0LYqsg="; 42 + 43 + ldflags = [ 44 + "-s" 45 + "-X github.com/nirui/sshwifty/application.version=${finalAttrs.version}" 46 + ]; 47 + 48 + postInstall = '' 49 + find $out/bin ! -name sshwifty -type f -exec rm -rf {} \; 50 + ''; 51 + 52 + nativeInstallCheckInputs = [ versionCheckHook ]; 53 + doInstallCheck = true; 54 + 55 + passthru.updateScript = nix-update-script { }; 56 + 57 + meta = { 58 + description = "WebSSH & WebTelnet client"; 59 + homepage = "https://github.com/nirui/sshwifty"; 60 + changelog = "https://github.com/nirui/sshwifty/releases/tag/${finalAttrs.version}"; 61 + license = lib.licenses.agpl3Plus; 62 + platforms = lib.platforms.linux; 63 + maintainers = with lib.maintainers; [ ungeskriptet ]; 64 + mainProgram = "sshwifty"; 65 + }; 66 + })