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