Created
August 12, 2017 22:38
-
-
Save anonymous/fdcbb4ace4a0ad95eadd6778ac513047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{stdenv, fetchurl, | |
dbus_glib, libcap_ng, libqb, libseccomp, libsodium, libgcrypt, polkit, protobuf, qtbase, | |
libxslt}: | |
with stdenv.lib; | |
stdenv.mkDerivation rec { | |
version = "0.7.0"; | |
name = "usbguard-${version}"; | |
repo = "https://github.com/dkopecek/usbguard"; | |
src = fetchurl { | |
url = "${repo}/releases/download/${name}/${name}.tar.gz"; | |
sha256 = "1e1485a2b47ba3bde9de2851b371d2552a807047a21e0b81553cf80d7f722709"; | |
}; | |
nativeBuildInputs = [ | |
libxslt | |
]; | |
buildInputs = [ | |
dbus_glib | |
libcap_ng | |
libgcrypt | |
libqb | |
libseccomp | |
libsodium | |
polkit | |
protobuf | |
qtbase | |
]; | |
# patch phase: | |
# apply patches from arch aur? | |
pkg_config_path_extension = concatStringsSep ":" [ | |
"${libqb}/lib/pkgconfig" | |
"${libseccomp}/lib/pkgconfig" | |
]; | |
preConfigure = '' | |
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${pkg_config_path_extension}" | |
''; | |
configureFlags = [ | |
"--with-gui-qt=qt5" # can the "qt5"/"qt4" string fall out of qtbase? | |
"--enable-systemd" | |
# this may be done later | |
# "--with-libgcrypt-prefix=${libgcrypt}" | |
#"--with-crypto-library=gcrypt" # TODO: make this an option (sodium/gcrypt)!? | |
"--with-crypto-library=sodium" # TODO: make this an option (sodium/gcrypt)!? | |
"--with-bundled-catch" # there is a system catch (use it?) | |
"--with-bundled-pegtl" # TODO: add system-wide pegtl | |
"--with-polkit" # TODO: make optional | |
"--with-dbus" | |
"--" | |
#"--oldincludedir=${libqb}/include" # fix "error: libqb development files not found!"?! | |
]; | |
# TODO: add meta | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment