btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / mc / mcap-cli / package.nix
blobe959bc65f1ad157da62c0f4ff89b40ff4a86be2e
1 { lib, buildGoModule, fetchFromGitHub, nix-update-script
2 }:
3 let
4   version = "0.0.46";
5 in
6 buildGoModule {
8   pname = "mcap-cli";
10   inherit version;
12   src = fetchFromGitHub {
13     repo = "mcap";
14     owner = "foxglove";
15     rev = "releases/mcap-cli/v${version}";
16     hash = "sha256-UdR5A2ZtCcnQIjPxlwcntZb78CXzJBvRy73GJUqvjuM=";
17   };
19   vendorHash = "sha256-ofJYarmnOHONu2lZ76GvSua0ViP1gr6968xAuQ/VRNk=";
21   modRoot = "go/cli/mcap";
23   env.GOWORK="off";
25   # copy the local versions of the workspace modules
26   postConfigure = ''
27     chmod -R u+w vendor
28     rm -rf vendor/github.com/foxglove/mcap/go/{mcap,ros}
29     cp -r ../../{mcap,ros} vendor/github.com/foxglove/mcap/go
30   '';
32   checkFlags = [
33     # requires git-lfs and network
34     # https://github.com/foxglove/mcap/issues/895
35     "-skip=TestCat|TestInfo"
36   ];
38   passthru = {
39     updateScript = nix-update-script { };
40   };
42   meta = with lib; {
43     description = "MCAP CLI tool to inspect and fix MCAP files";
44     homepage = "https://github.com/foxglove/mcap";
45     license = with licenses; [ mit ];
46     maintainers = with maintainers; [ squalus therishidesai ];
47     mainProgram = "mcap";
48   };