nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ets";
5 version = "0.2.1";
6
7 src = fetchFromGitHub {
8 owner = "zmwangx";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-XWIDo5msTMTLr60x1R9cwsiZIDG6G+uHWx8idt4F2iA=";
12 };
13
14 # https://github.com/zmwangx/ets/pull/18/
15 patches = [ (fetchpatch {
16 url = "https://github.com/zmwangx/ets/commit/600ec17a9c86ca63cd022d00439cdc4978e2afa9.patch";
17 sha256 = "sha256-SGCISHkWNFubgKkQYx8Vf5/fknNDfPNYkSuw1mMhZaE=";
18 }) ];
19
20 vendorSha256 = "sha256-+8dXfqOu8XTw2uEx3GAynQSHtzifejZtddr1CdxrupA=";
21
22 ldflags = [ "-s" "-w" "-X main.version=v${version}-nixpkgs" ];
23
24 nativeBuildInputs = [ installShellFiles ];
25
26 preBuild = ''
27 rm -rf fixtures
28 '';
29
30 postInstall = ''
31 installManPage ets.1
32 '';
33
34 doCheck = false;
35
36 meta = with lib; {
37 description = "Command output timestamper";
38 homepage = "https://github.com/zmwangx/ets/";
39 license = licenses.mit;
40 maintainers = with maintainers; [ cameronfyfe ];
41 };
42}