nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildGoModule, fetchFromGitHub }:
2
3buildGoModule rec {
4 pname = "sem";
5 version = "0.30.0";
6
7 src = fetchFromGitHub {
8 owner = "semaphoreci";
9 repo = "cli";
10 rev = "v${version}";
11 sha256 = "sha256-bShQ+paDM9AdrdPrtwyQ5Mytf/SNZ4fVMDT2ZNswt3o=";
12 };
13
14 vendorHash = "sha256-p8+M+pRp12P7tYlFpXjU94JcJOugQpD8rFdowhonh74=";
15 subPackages = [ "." ];
16
17 ldflags = [ "-X main.version=${version}" "-X main.buildSource=nix" ];
18
19 postInstall = ''
20 install -m755 $out/bin/cli $out/bin/sem
21 '';
22
23 meta = with lib; {
24 description = "Cli to operate on semaphore ci (2.0)";
25 homepage = "https://github.com/semaphoreci/cli";
26 changelog = "https://github.com/semaphoreci/cli/releases/tag/v${version}";
27 license = licenses.asl20;
28 maintainers = with maintainers; [ liberatys ];
29 platforms = platforms.linux;
30 };
31}