networkmanager_strongswan: Format the expression

And use placeholders instead of Makefile variable interpolation.
Also move environment variable near each other.
This commit is contained in:
Jan Tojnar 2022-04-26 14:16:37 +02:00
parent a0e8b9daf6
commit 85bed48e82

View file

@ -1,5 +1,15 @@
{ lib, stdenv, fetchurl, intltool, pkg-config, networkmanager, strongswanNM
, gtk3, gnome, libsecret, libnma }:
{ stdenv
, lib
, fetchurl
, intltool
, pkg-config
, networkmanager
, strongswanNM
, gtk3
, gnome
, libsecret
, libnma
}:
stdenv.mkDerivation rec {
pname = "NetworkManager-strongswan";
@ -10,26 +20,35 @@ stdenv.mkDerivation rec {
sha256 = "0sc1yzlxjfvl58hjjw99bchqc4061i3apw254z61v22k4sajnif8";
};
buildInputs = [ networkmanager strongswanNM libsecret gtk3 libnma ];
nativeBuildInputs = [
intltool
pkg-config
];
nativeBuildInputs = [ intltool pkg-config ];
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
buildInputs = [
networkmanager
strongswanNM
libsecret
gtk3
libnma
];
configureFlags = [
"--without-libnm-glib"
"--with-charon=${strongswanNM}/libexec/ipsec/charon-nm"
"--with-nm-libexecdir=$(out)/libexec"
"--with-nm-plugindir=$(out)/lib/NetworkManager"
"--with-nm-libexecdir=${placeholder "out"}/libexec"
"--with-nm-plugindir=${placeholder "out"}/lib/NetworkManager"
];
PKG_CONFIG_LIBNM_VPNSERVICEDIR = "${placeholder "out"}/lib/NetworkManager/VPN";
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
passthru = {
networkManagerPlugin = "VPN/nm-strongswan-service.name";
};
PKG_CONFIG_LIBNM_VPNSERVICEDIR = "$(out)/lib/NetworkManager/VPN";
meta = with lib; {
description = "NetworkManager's strongswan plugin";
inherit (networkmanager.meta) platforms;