12 src = fetchFromGitHub {
13 owner = "crowdsecurity";
16 hash = "sha256-U3YnLjsD+Kl/6HD+RPP0gWa4N96X5wkbdCmIrxas1I8=";
19 vendorHash = "sha256-PtBVXPbLNdJyS8v8H9eRB6sTPaiseg18+eXToHvH7tw=";
21 nativeBuildInputs = [ installShellFiles ];
31 "-X github.com/crowdsecurity/go-cs-lib/version.Version=v${version}"
32 "-X github.com/crowdsecurity/go-cs-lib/version.BuildDate=1970-01-01_00:00:00"
33 "-X github.com/crowdsecurity/go-cs-lib/version.Tag=${src.rev}"
34 "-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=alphaga"
35 "-X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultConfigDir=/etc/crowdsec"
36 "-X github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultDataDir=/var/lib/crowdsec/data"
39 postBuild = "mv $GOPATH/bin/{crowdsec-cli,cscli}";
42 mkdir -p $out/share/crowdsec
43 cp -r ./config $out/share/crowdsec/
45 installShellCompletion --cmd cscli \
46 --bash <($out/bin/cscli completion bash) \
47 --fish <($out/bin/cscli completion fish) \
48 --zsh <($out/bin/cscli completion zsh)
51 # It's important that the version is correctly set as it also determines feature capabilities
53 $GOPATH/bin/cscli version 2>&1 | grep -q "version: v${version}"
57 homepage = "https://crowdsec.net/";
58 changelog = "https://github.com/crowdsecurity/crowdsec/releases/tag/v${version}";
59 description = "CrowdSec is a free, open-source and collaborative IPS";
61 CrowdSec is a free, modern & collaborative behavior detection engine,
62 coupled with a global IP reputation network. It stacks on fail2ban's
63 philosophy but is IPV6 compatible and 60x faster (Go vs Python), uses Grok
64 patterns to parse logs and YAML scenario to identify behaviors. CrowdSec
65 is engineered for modern Cloud/Containers/VM based infrastructures (by
66 decoupling detection and remediation). Once detected you can remedy
67 threats with various bouncers (firewall block, nginx http 403, Captchas,
68 etc.) while the aggressive IP can be sent to CrowdSec for curation before
69 being shared among all users to further improve everyone's security.
71 license = licenses.mit;
72 maintainers = with maintainers; [