Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildGoModule 3, fetchFromGitHub 4, installShellFiles 5}: 6 7buildGoModule rec { 8 pname = "onmetal-image"; 9 version = "0.1.1"; 10 11 src = fetchFromGitHub { 12 owner = "onmetal"; 13 repo = "onmetal-image"; 14 rev = "v${version}"; 15 hash = "sha256-KvOBvAIE9V2bj5prdcc8G5ifHsvybHBCYWrI4fWtdvE="; 16 }; 17 18 vendorHash = "sha256-aCL8hLcBnIs5BJM7opIwcOLvOS3uL9mYXs1vOAMlX/M="; 19 20 nativeBuildInputs = [ 21 installShellFiles 22 ]; 23 24 postInstall = '' 25 mv $out/bin/cmd $out/bin/onmetal-image 26 27 installShellCompletion --cmd onmetal-image \ 28 --bash <($out/bin/onmetal-image completion bash) \ 29 --fish <($out/bin/onmetal-image completion fish) \ 30 --zsh <($out/bin/onmetal-image completion zsh) 31 ''; 32 33 meta = with lib; { 34 description = "Onmetal OCI Image Specification, Library and Tooling"; 35 homepage = "https://github.com/onmetal/onmetal-image"; 36 license = licenses.asl20; 37 maintainers = with maintainers; [ SuperSandro2000 ]; 38 }; 39}