mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
hcloud-upload-image: init at 1.3.0 (#482716)
This commit is contained in:
commit
2dd0119570
1 changed files with 51 additions and 0 deletions
51
pkgs/by-name/hc/hcloud-upload-image/package.nix
Normal file
51
pkgs/by-name/hc/hcloud-upload-image/package.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue