nixpkgs/pkgs/by-name/sp/spyre/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.3 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
, pkg-config
, yara
}:
buildGoModule rec {
pname = "spyre";
version = "1.2.5";
src = fetchFromGitHub {
owner = "spyre-project";
repo = pname;
rev = "v${version}";
hash = "sha256-wlGZTMCJE6Ki5/6R6J9EJP06/S125BNNd/jNPYGwKNw=";
};
patches = [
# The following two patches come from https://github.com/spyre-project/spyre/pull/75
# and improve Darwin support.
(fetchpatch {
name = "syscall-to-x-sys-unix.patch";
url = "https://github.com/spyre-project/spyre/commit/8f08daf030c847de453613eb2eb1befdb7300921.patch";
hash = "sha256-oy8Y85IubJVQrt0kmGA1hidZapgCw2aB6F/gT7uQ6KA=";
})
(fetchpatch {
name = "darwin-skip-dir.patch";
url = "https://github.com/spyre-project/spyre/commit/12dea550bc4f3275f8f406c19216ad140733a6af.patch";
hash = "sha256-BXLGOshyGnllbkvsbbmdnqvRHwycrjI52oGWBoXXgL0=";
})
];
vendorHash = "sha256-aoeAnyFotKWWaRZQsgQPwwmhih/1zfL9eBV/2r1VPBM=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
yara
];
meta = with lib; {
description = "YARA-based IOC scanner";
mainProgram = "spyre";
homepage = "https://github.com/spyre-project/spyre";
license = with licenses; [ lgpl3Plus ];
maintainers = with maintainers; [ fab ];
};
}