nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 versionCheckHook,
6 nix-update-script,
7}:
8
9buildGoModule (finalAttrs: {
10 pname = "termshot";
11 version = "0.6.0";
12
13 src = fetchFromGitHub {
14 owner = "homeport";
15 repo = "termshot";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-utaQhUBpFUpxqE+cEJqlQHyJXSo/4UzrA2uqUd88uaM=";
18 };
19
20 vendorHash = "sha256-3fUvl772pscrQv2wJkRX5wBhAt9fmfIPI7FGq7h7Fqw=";
21
22 ldflags = [
23 "-s"
24 "-w"
25 "-X github.com/homeport/termshot/internal/cmd.version=${finalAttrs.version}"
26 ];
27
28 checkFlags = [ "-skip=^TestPtexec$" ];
29
30 nativeInstallCheckInputs = [ versionCheckHook ];
31 doInstallCheck = true;
32
33 passthru.updateScript = nix-update-script { };
34
35 meta = {
36 description = "Creates screenshots based on terminal command output";
37 homepage = "https://github.com/homeport/termshot";
38 changelog = "https://github.com/homeport/termshot/releases/tag/v${finalAttrs.version}";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ defelo ];
41 mainProgram = "termshot";
42 };
43})