btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / fw / fwanalyzer / package.nix
blob26fd45fa90eaaea8d8045f5f9fff50a2334744aa
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , e2tools
5 , makeWrapper
6 , mtools
7 }:
9 buildGoModule rec {
10   pname = "fwanalyzer";
11   version = "1.4.4";
13   src = fetchFromGitHub {
14     owner = "cruise-automation";
15     repo = pname;
16     rev = version;
17     sha256 = "sha256-fcqtyfpxdjD+1GsYl05RSJaFDoLSYQDdWcQV6a+vNGA=";
18   };
20   vendorHash = "sha256-nLr12VQogr4nV9E/DJu2XTcgEi7GsOdOn/ZqVk7HS7I=";
22   subPackages = [ "cmd/${pname}" ];
24   nativeBuildInputs = [ makeWrapper ];
26   postInstall = ''
27     wrapProgram "$out/bin/fwanalyzer" --prefix PATH : "${lib.makeBinPath [ e2tools mtools ]}"
28   '';
30   # The tests requires an additional setup (unpacking images, etc.)
31   doCheck = false;
33   meta = with lib; {
34     description = "Tool to analyze filesystem images";
35     homepage = "https://github.com/cruise-automation/fwanalyzer";
36     license = with licenses; [ asl20 ];
37     maintainers = with maintainers; [ fab ];
38     mainProgram = "fwanalyzer";
39   };