-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
50 lines (43 loc) · 1.6 KB
/
Copy pathflake.nix
File metadata and controls
50 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
description = "Record terminal sessions as animated SVG";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
version = "0.0.7";
in
{
packages = forAllSystems (pkgs: rec {
ttysvg = pkgs.buildGoModule {
pname = "ttysvg";
inherit version;
src = ./.;
vendorHash = "sha256-eL0tt6+aK1D5KhJDJsBIgy/BcDWyKtE4TFZf6mmEjPo=";
subPackages = [ "cmd/ttysvg" ];
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
nativeBuildInputs = [ pkgs.installShellFiles ];
postInstall = ''
installManPage docs/ttysvg.1
installShellCompletion --bash --name ttysvg.bash completions/ttysvg.bash
installShellCompletion --fish --name ttysvg.fish completions/ttysvg.fish
installShellCompletion --zsh --name _ttysvg completions/_ttysvg
'';
meta = with pkgs.lib; {
description = "Record terminal sessions as animated SVG";
homepage = "https://github.com/rabarbra/ttysvg";
license = licenses.mit;
mainProgram = "ttysvg";
platforms = platforms.unix;
};
};
default = ttysvg;
});
apps = forAllSystems (pkgs: {
default = {
type = "app";
program = "${self.packages.${pkgs.system}.ttysvg}/bin/ttysvg";
};
});
};
}