|
|
@ -1,51 +1,59 @@ |
|
|
|
{ lib, stdenv |
|
|
|
{ stdenv |
|
|
|
, autoreconfHook |
|
|
|
, lib |
|
|
|
, fetchFromGitHub |
|
|
|
, fetchurl |
|
|
|
, fetchpatch |
|
|
|
|
|
|
|
, file |
|
|
|
, file |
|
|
|
, glib |
|
|
|
, glib |
|
|
|
, gnome |
|
|
|
, gnome |
|
|
|
, gtk3 |
|
|
|
, gtk3 |
|
|
|
|
|
|
|
, gtk4 |
|
|
|
, intltool |
|
|
|
, intltool |
|
|
|
, libnma |
|
|
|
, libnma |
|
|
|
|
|
|
|
, libnma-gtk4 |
|
|
|
, libsecret |
|
|
|
, libsecret |
|
|
|
, networkmanager |
|
|
|
, networkmanager |
|
|
|
, pkg-config |
|
|
|
, pkg-config |
|
|
|
, ppp |
|
|
|
, ppp |
|
|
|
, sstp |
|
|
|
, sstp |
|
|
|
, substituteAll |
|
|
|
, withGnome ? true |
|
|
|
, withGnome ? true }: |
|
|
|
}: |
|
|
|
|
|
|
|
|
|
|
|
let |
|
|
|
stdenv.mkDerivation rec { |
|
|
|
pname = "NetworkManager-sstp"; |
|
|
|
pname = "NetworkManager-sstp"; |
|
|
|
version = "unstable-2020-04-20"; |
|
|
|
version = "1.3.0"; |
|
|
|
in stdenv.mkDerivation { |
|
|
|
|
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; |
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; |
|
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub { |
|
|
|
src = fetchurl { |
|
|
|
owner = "enaess"; |
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; |
|
|
|
repo = "network-manager-sstp"; |
|
|
|
sha256 = "+IJw3jvOYs/+NDS9HvCrSQ6wxh1x1yqwiFij7UZb+rU="; |
|
|
|
rev = "735d8ca078f933e085029f60a737e3cf1d8c29a8"; |
|
|
|
|
|
|
|
sha256 = "0aahfhy2ch951kzj6gnd8p8hv2s5yd5y10wrmj68djhnx2ml8cd3"; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
buildInputs = [ sstp networkmanager glib ppp ] |
|
|
|
nativeBuildInputs = [ |
|
|
|
++ lib.optionals withGnome [ gtk3 libsecret libnma ]; |
|
|
|
file |
|
|
|
|
|
|
|
intltool |
|
|
|
|
|
|
|
pkg-config |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ file intltool autoreconfHook pkg-config ]; |
|
|
|
buildInputs = [ |
|
|
|
|
|
|
|
sstp |
|
|
|
|
|
|
|
networkmanager |
|
|
|
|
|
|
|
glib |
|
|
|
|
|
|
|
ppp |
|
|
|
|
|
|
|
] ++ lib.optionals withGnome [ |
|
|
|
|
|
|
|
gtk3 |
|
|
|
|
|
|
|
gtk4 |
|
|
|
|
|
|
|
libsecret |
|
|
|
|
|
|
|
libnma |
|
|
|
|
|
|
|
libnma-gtk4 |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
postPatch = '' |
|
|
|
postPatch = '' |
|
|
|
sed -i 's#/sbin/pppd#${ppp}/bin/pppd#' src/nm-sstp-service.c |
|
|
|
sed -i 's#/sbin/pppd#${ppp}/bin/pppd#' src/nm-sstp-service.c |
|
|
|
sed -i 's#/sbin/sstpc#${sstp}/bin/sstpc#' src/nm-sstp-service.c |
|
|
|
sed -i 's#/sbin/sstpc#${sstp}/bin/sstpc#' src/nm-sstp-service.c |
|
|
|
''; |
|
|
|
''; |
|
|
|
|
|
|
|
|
|
|
|
# glib-2.62 deprecations |
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
preConfigure = "intltoolize"; |
|
|
|
|
|
|
|
configureFlags = [ |
|
|
|
configureFlags = [ |
|
|
|
"--without-libnm-glib" |
|
|
|
|
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}" |
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}" |
|
|
|
|
|
|
|
"--with-gtk4=${if withGnome then "yes" else "no"}" |
|
|
|
"--enable-absolute-paths" |
|
|
|
"--enable-absolute-paths" |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|