nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4
5 buildGoModule,
6
7 # tests
8 testers,
9 checksec,
10}:
11
12buildGoModule rec {
13 pname = "checksec";
14 version = "3.1.0";
15
16 src = fetchFromGitHub {
17 owner = "slimm609";
18 repo = "checksec";
19 tag = version;
20 hash = "sha256-LsVK+ufSUGXWHpPk1iAFD6Lxh5hEp1WmTAy9hZMEiKk=";
21 };
22
23 vendorHash = "sha256-GzSliyKxBfATA7BaHO/4HyReEwT7dYTpRuyjADNtJuc=";
24
25 ldflags = [
26 "-s"
27 "-w"
28 "-X main.version=${version}"
29 ];
30
31 passthru.tests = {
32 version = testers.testVersion {
33 package = checksec;
34 inherit version;
35 };
36 };
37
38 meta = {
39 description = "Tool for checking security bits on executables";
40 mainProgram = "checksec";
41 homepage = "https://slimm609.github.io/checksec/";
42 license = lib.licenses.bsd3;
43 platforms = lib.platforms.linux;
44 maintainers = with lib.maintainers; [
45 thoughtpolice
46 sdht0
47 ];
48 };
49}