2017-08-25 22:35:18 +00:00
|
|
|
{
|
|
|
|
stdenv, fetchurl, lib,
|
2019-08-23 19:54:54 +00:00
|
|
|
pkgconfig, libxslt, libxml2, docbook_xml_dtd_45, docbook_xsl, asciidoc,
|
|
|
|
dbus-glib, libcap_ng, libqb, libseccomp, polkit, protobuf,
|
|
|
|
audit,
|
2017-08-25 22:35:18 +00:00
|
|
|
libgcrypt ? null,
|
|
|
|
libsodium ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
assert libgcrypt != null -> libsodium == null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-20 15:01:59 +00:00
|
|
|
version = "0.7.8";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "usbguard";
|
2017-08-25 22:35:18 +00:00
|
|
|
|
2018-02-27 18:07:43 +00:00
|
|
|
repo = "https://github.com/USBGuard/usbguard";
|
2017-08-25 22:35:18 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "${repo}/releases/download/${pname}-${version}/${pname}-${version}.tar.gz";
|
2020-05-20 15:01:59 +00:00
|
|
|
sha256 = "1il5immqfxh2cj8wn1bfk7l42inflzgjf07yqprpz7r3lalbxc25";
|
2017-08-25 22:35:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2019-08-23 19:54:54 +00:00
|
|
|
asciidoc
|
2017-08-25 22:35:18 +00:00
|
|
|
pkgconfig
|
2019-06-19 20:29:46 +00:00
|
|
|
libxslt # xsltproc
|
|
|
|
libxml2 # xmllint
|
2019-08-23 19:54:54 +00:00
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xsl
|
2017-08-25 22:35:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-02-25 02:23:58 +00:00
|
|
|
dbus-glib
|
2017-08-25 22:35:18 +00:00
|
|
|
libcap_ng
|
|
|
|
libqb
|
|
|
|
libseccomp
|
|
|
|
polkit
|
|
|
|
protobuf
|
2018-02-27 18:07:43 +00:00
|
|
|
audit
|
2017-08-25 22:35:18 +00:00
|
|
|
]
|
|
|
|
++ (lib.optional (libgcrypt != null) libgcrypt)
|
2019-08-23 19:54:54 +00:00
|
|
|
++ (lib.optional (libsodium != null) libsodium);
|
2017-08-25 22:35:18 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-bundled-catch"
|
|
|
|
"--with-bundled-pegtl"
|
|
|
|
"--with-dbus"
|
|
|
|
"--with-polkit"
|
|
|
|
]
|
|
|
|
++ (lib.optional (libgcrypt != null) "--with-crypto-library=gcrypt")
|
2019-08-23 19:54:54 +00:00
|
|
|
++ (lib.optional (libsodium != null) "--with-crypto-library=sodium");
|
2017-08-25 22:35:18 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "The USBGuard software framework helps to protect your computer against BadUSB";
|
2018-02-27 18:07:43 +00:00
|
|
|
homepage = "https://usbguard.github.io/";
|
2017-08-25 22:35:18 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.tnias ];
|
|
|
|
};
|
|
|
|
}
|