hcloud-upload-image: init at 1.3.0 (#482716)

This commit is contained in:
Sandro 2026-03-01 04:06:47 +00:00 committed by GitHub
commit 2dd0119570
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,51 @@
{
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
}:
buildGoModule rec {
pname = "hcloud-upload-image";
version = "1.3.0";
src = fetchFromGitHub {
owner = "apricote";
repo = "hcloud-upload-image";
tag = "v${version}";
hash = "sha256-1u9tpzciYjB/EgBI81pg9w0kez7hHZON7+AHvfKW7k0=";
};
vendorHash = "sha256-IdOAUBPg0CEuHd2rdc7jOlw0XtnAhr3PVPJbnFs2+x4=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for shell in bash fish zsh; do
$out/bin/hcloud-upload-image completion $shell > hcloud.$shell
installShellCompletion hcloud.$shell
done
'';
env.GOWORK = "off";
meta = {
changelog = "https://github.com/apricote/hcloud-upload-image/releases/tag/v${version}";
description = "Quickly upload any raw disk images into your Hetzner Cloud projects";
mainProgram = "hcloud-upload-image";
homepage = "https://github.com/apricote/hcloud-upload-image";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
sshine
];
};
}