commit
3746a49dcc
@ -0,0 +1,31 @@ |
||||
{ lib, ... }: |
||||
let |
||||
inherit (lib) types; |
||||
in { |
||||
options = { |
||||
name = lib.mkOption { |
||||
type = types.str; |
||||
}; |
||||
email = lib.mkOption { |
||||
type = types.str; |
||||
}; |
||||
matrix = lib.mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
}; |
||||
github = lib.mkOption { |
||||
type = types.nullOr types.str; |
||||
default = null; |
||||
}; |
||||
githubId = lib.mkOption { |
||||
type = types.nullOr types.ints.unsigned; |
||||
default = null; |
||||
}; |
||||
keys = lib.mkOption { |
||||
type = types.listOf (types.submodule { |
||||
options.fingerprint = lib.mkOption { type = types.str; }; |
||||
}); |
||||
default = []; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,50 @@ |
||||
# to run these tests: |
||||
# nix-build nixpkgs/lib/tests/teams.nix |
||||
# If it builds, all tests passed |
||||
{ pkgs ? import ../.. {}, lib ? pkgs.lib }: |
||||
|
||||
let |
||||
inherit (lib) types; |
||||
|
||||
teamModule = { config, ... }: { |
||||
options = { |
||||
shortName = lib.mkOption { |
||||
type = types.str; |
||||
}; |
||||
scope = lib.mkOption { |
||||
type = types.str; |
||||
}; |
||||
enableFeatureFreezePing = lib.mkOption { |
||||
type = types.bool; |
||||
default = false; |
||||
}; |
||||
members = lib.mkOption { |
||||
type = types.listOf (types.submodule |
||||
(import ./maintainer-module.nix { inherit lib; }) |
||||
); |
||||
default = []; |
||||
}; |
||||
githubTeams = lib.mkOption { |
||||
type = types.listOf types.str; |
||||
default = []; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
checkTeam = team: uncheckedAttrs: |
||||
let |
||||
prefix = [ "lib" "maintainer-team" team ]; |
||||
checkedAttrs = (lib.modules.evalModules { |
||||
inherit prefix; |
||||
modules = [ |
||||
teamModule |
||||
{ |
||||
_file = toString ../../maintainers/team-list.nix; |
||||
config = uncheckedAttrs; |
||||
} |
||||
]; |
||||
}).config; |
||||
in checkedAttrs; |
||||
|
||||
checkedTeams = lib.mapAttrs checkTeam lib.teams; |
||||
in pkgs.writeTextDir "maintainer-teams.json" (builtins.toJSON checkedTeams) |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,34 @@ |
||||
{ lib |
||||
, buildGoModule |
||||
, fetchFromGitHub |
||||
, gosca |
||||
, testers |
||||
}: |
||||
|
||||
buildGoModule rec { |
||||
pname = "gosca"; |
||||
version = "0.4.2"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "TARI0510"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
hash = "sha256-mjQSYkcLl9X3IPv0liX26hvystsQOSVXvovKp4VekAY="; |
||||
}; |
||||
|
||||
vendorSha256 = "sha256-0EqMW4aNYPZEuk+mxmLTuenGdam56YneEad8lodVeBo="; |
||||
|
||||
passthru.tests.version = testers.testVersion { |
||||
package = gosca; |
||||
command = "gosca -v"; |
||||
version = "GoSCA_v${version}"; |
||||
}; |
||||
|
||||
meta = with lib; { |
||||
description = "Golang dependence security checker"; |
||||
homepage = "https://github.com/TARI0510/gosca"; |
||||
changelog = "https://github.com/TARI0510/gosca/releases/tag/v${version}"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,39 @@ |
||||
{ lib |
||||
, stdenv |
||||
, buildGoModule |
||||
, fetchFromGitHub |
||||
, libpcap |
||||
}: |
||||
|
||||
buildGoModule rec { |
||||
pname = "dnsmonster"; |
||||
version = "0.9.3"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "mosajjal"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
hash = "sha256-1tYC76g3GOqMaosAYYXOrOKTdW7muPTaeeLzGUsjogE="; |
||||
}; |
||||
|
||||
vendorSha256 = "sha256-2gWifzBjAx+c/if6ZZQ/s73oPPTY9eJfHYL4F/058h0="; |
||||
|
||||
buildInputs = [ |
||||
libpcap |
||||
]; |
||||
|
||||
ldflags = [ |
||||
"-s" |
||||
"-w" |
||||
"-X github.com/mosajjal/dnsmonster/util.releaseVersion=${version}" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Passive DNS Capture and Monitoring Toolkit"; |
||||
homepage = "https://github.com/mosajjal/dnsmonster"; |
||||
changelog = "https://github.com/mosajjal/dnsmonster/releases/tag/v${version}"; |
||||
license = licenses.gpl2Only; |
||||
maintainers = with maintainers; [ fab ]; |
||||
broken = stdenv.isDarwin; |
||||
}; |
||||
} |
Loading…
Reference in new issue