btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / sp / spyre / package.nix
blobc9a4946b83d980017903aa09a29a4d541d8a21ee
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , fetchpatch
5 , pkg-config
6 , yara
7 }:
9 buildGoModule rec {
10   pname = "spyre";
11   version = "1.2.5";
13   src = fetchFromGitHub {
14     owner = "spyre-project";
15     repo = pname;
16     rev = "v${version}";
17     hash = "sha256-wlGZTMCJE6Ki5/6R6J9EJP06/S125BNNd/jNPYGwKNw=";
18   };
20   patches = [
21     # The following two patches come from https://github.com/spyre-project/spyre/pull/75
22     # and improve Darwin support.
23     (fetchpatch {
24       name = "syscall-to-x-sys-unix.patch";
25       url = "https://github.com/spyre-project/spyre/commit/8f08daf030c847de453613eb2eb1befdb7300921.patch";
26       hash = "sha256-oy8Y85IubJVQrt0kmGA1hidZapgCw2aB6F/gT7uQ6KA=";
27     })
28     (fetchpatch {
29       name = "darwin-skip-dir.patch";
30       url = "https://github.com/spyre-project/spyre/commit/12dea550bc4f3275f8f406c19216ad140733a6af.patch";
31       hash = "sha256-BXLGOshyGnllbkvsbbmdnqvRHwycrjI52oGWBoXXgL0=";
32     })
33   ];
35   vendorHash = "sha256-aoeAnyFotKWWaRZQsgQPwwmhih/1zfL9eBV/2r1VPBM=";
37   nativeBuildInputs = [
38     pkg-config
39   ];
41   buildInputs = [
42     yara
43   ];
45   meta = with lib; {
46     description = "YARA-based IOC scanner";
47     mainProgram = "spyre";
48     homepage = "https://github.com/spyre-project/spyre";
49     license = with licenses; [ lgpl3Plus ];
50     maintainers = with maintainers; [ fab ];
51   };