Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 50 lines 1.1 kB view raw
1{ 2 buildGoModule, 3 fetchFromGitHub, 4 lib, 5}: 6 7buildGoModule rec { 8 pname = "helm-s3"; 9 version = "0.17.0"; 10 11 src = fetchFromGitHub { 12 owner = "hypnoglow"; 13 repo = pname; 14 rev = "v${version}"; 15 hash = "sha256-9n/Dzgr/wYGgJq47FdNGPPpOFzTRt4VaK8HA06F5FIE="; 16 }; 17 18 vendorHash = "sha256-6YBIUUIvQ6ZDPF9Dz5tNXuHS+pa/yiNs4sKZbMudMxs="; 19 20 # NOTE: Remove the install and upgrade hooks. 21 postPatch = '' 22 sed -i '/^hooks:/,+2 d' plugin.yaml 23 ''; 24 25 # NOTE: make test-unit, but skip awsutil, which needs internet access 26 checkPhase = '' 27 go test $(go list ./... | grep -vE '(awsutil|e2e)') 28 ''; 29 30 ldflags = [ 31 "-s" 32 "-w" 33 "-X main.version=${version}" 34 ]; 35 36 subPackages = [ "cmd/helm-s3" ]; 37 38 postInstall = '' 39 install -dm755 $out/${pname} 40 mv $out/bin $out/${pname}/ 41 install -m644 -Dt $out/${pname} plugin.yaml 42 ''; 43 44 meta = with lib; { 45 description = "Helm plugin that allows to set up a chart repository using AWS S3"; 46 homepage = "https://github.com/hypnoglow/helm-s3"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ yurrriq ]; 49 }; 50}