3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/usbguard/default.nix
Will Dietz 60256c197d
usbguard: 0.7.4 -> 0.7.5
https://github.com/USBGuard/usbguard/releases/tag/usbguard-0.7.5

* no longer needs/uses qt as of 0.7.5
* asciidoctor -> asciidoc, drop pandoc
  (pandoc only seems to be used as part of doc spell-check
   which we don't enable anyway)
* docbook bits
2019-09-03 20:21:11 -05:00

64 lines
1.4 KiB
Nix

{
stdenv, fetchurl, lib,
pkgconfig, libxslt, libxml2, docbook_xml_dtd_45, docbook_xsl, asciidoc,
dbus-glib, libcap_ng, libqb, libseccomp, polkit, protobuf,
audit,
libgcrypt ? null,
libsodium ? null
}:
with stdenv.lib;
assert libgcrypt != null -> libsodium == null;
stdenv.mkDerivation rec {
version = "0.7.5";
pname = "usbguard";
repo = "https://github.com/USBGuard/usbguard";
src = fetchurl {
url = "${repo}/releases/download/${pname}-${version}/${pname}-${version}.tar.gz";
sha256 = "0jj56sls13ryfgz6vajq8p4dm3grgb6rf2cmga6sckmzd4chk65b";
};
nativeBuildInputs = [
asciidoc
pkgconfig
libxslt # xsltproc
libxml2 # xmllint
docbook_xml_dtd_45
docbook_xsl
];
buildInputs = [
dbus-glib
libcap_ng
libqb
libseccomp
polkit
protobuf
audit
]
++ (lib.optional (libgcrypt != null) libgcrypt)
++ (lib.optional (libsodium != null) libsodium);
configureFlags = [
"--with-bundled-catch"
"--with-bundled-pegtl"
"--with-dbus"
"--with-polkit"
]
++ (lib.optional (libgcrypt != null) "--with-crypto-library=gcrypt")
++ (lib.optional (libsodium != null) "--with-crypto-library=sodium");
enableParallelBuilding = true;
meta = {
description = "The USBGuard software framework helps to protect your computer against BadUSB.";
homepage = "https://usbguard.github.io/";
license = licenses.gpl2;
maintainers = [ maintainers.tnias ];
};
}