networkmanager-fortisslvpn: clean up

* format with nixpkgs-fmt
* reorder the expression
* move pname into the main attrset
* use pkg-config instead of pkgconfig alias
This commit is contained in:
Jan Tojnar 2020-06-10 15:19:13 +02:00
parent a421af29e4
commit dc318b393f
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,10 +1,23 @@
{ stdenv, fetchurl, substituteAll, openfortivpn, intltool, pkgconfig, file, gtk3,
networkmanager, ppp, libsecret, withGnome ? true, gnome3, fetchpatch, libnma }:
{ stdenv
, fetchurl
, substituteAll
, openfortivpn
, intltool
, pkg-config
, file
, gtk3
, networkmanager
, ppp
, libsecret
, withGnome ? true
, gnome3
, fetchpatch
, libnma
}:
let
stdenv.mkDerivation rec {
pname = "NetworkManager-fortisslvpn";
version = "1.2.10";
in stdenv.mkDerivation {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
src = fetchurl {
@ -17,6 +30,7 @@ in stdenv.mkDerivation {
src = ./fix-paths.patch;
inherit openfortivpn;
})
# Don't use etc/dbus-1/system.d
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn/merge_requests/11.patch";
@ -24,10 +38,21 @@ in stdenv.mkDerivation {
})
];
buildInputs = [ openfortivpn networkmanager ppp ]
++ stdenv.lib.optionals withGnome [ gtk3 libsecret libnma ];
nativeBuildInputs = [
intltool
pkg-config
file
];
nativeBuildInputs = [ intltool pkgconfig file ];
buildInputs = [
openfortivpn
networkmanager
ppp
] ++ stdenv.lib.optionals withGnome [
gtk3
libsecret
libnma
];
configureFlags = [
"--without-libnm-glib"
@ -36,9 +61,11 @@ in stdenv.mkDerivation {
"--enable-absolute-paths"
];
# the installer only create an empty directory in localstatedir, so
# we can drop it
installFlags = [ "localstatedir=." ];
installFlags = [
# the installer only creates an empty directory in localstatedir, so
# we can drop it
"localstatedir=."
];
passthru = {
updateScript = gnome3.updateScript {
@ -48,9 +75,8 @@ in stdenv.mkDerivation {
};
meta = with stdenv.lib; {
description = "NetworkManager's FortiSSL plugin";
description = "NetworkManagers FortiSSL plugin";
inherit (networkmanager.meta) maintainers platforms;
license = licenses.gpl2;
};
}