2016-06-22 01:59:52 +01:00
|
|
|
{ stdenv, fetchurl, networkmanager, pptp, ppp, intltool, pkgconfig
|
2015-04-08 16:45:41 +01:00
|
|
|
, libsecret, withGnome ? true, gnome3 }:
|
2011-09-14 16:50:14 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-06-22 02:03:11 +01:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
pname = "NetworkManager-pptp";
|
2016-10-06 15:36:29 +01:00
|
|
|
major = "1.2";
|
|
|
|
version = "${major}.4";
|
2011-09-14 16:50:14 +01:00
|
|
|
|
2012-03-11 14:07:37 +00:00
|
|
|
src = fetchurl {
|
2016-10-06 15:36:29 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "bd97ce768c34cce6d5b5d43681149a8300bec754397a3f46a0d8d0aea7030c5e";
|
2012-03-11 14:07:37 +00:00
|
|
|
};
|
2011-09-14 16:50:14 +01:00
|
|
|
|
2015-04-08 16:45:41 +01:00
|
|
|
buildInputs = [ networkmanager pptp ppp libsecret ]
|
|
|
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring
|
|
|
|
gnome3.networkmanagerapplet ];
|
2011-09-14 16:50:14 +01:00
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig ];
|
2011-09-14 16:50:14 +01:00
|
|
|
|
2016-06-22 01:59:52 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's%"\(/usr/sbin\|/usr/pkg/sbin\|/usr/local/sbin\)/[^"]*",%%g' ./src/nm-pptp-service.c
|
|
|
|
|
|
|
|
substituteInPlace ./src/nm-pptp-service.c \
|
|
|
|
--replace /sbin/pptp ${pptp}/bin/pptp \
|
|
|
|
--replace /sbin/pppd ${ppp}/bin/pppd
|
|
|
|
'';
|
|
|
|
|
2012-03-11 14:07:37 +00:00
|
|
|
configureFlags =
|
2014-05-20 19:30:44 +01:00
|
|
|
if withGnome then "--with-gnome --with-gtkver=3" else "--without-gnome";
|
2012-03-11 14:07:37 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "PPtP plugin for NetworkManager";
|
2012-03-11 15:20:12 +00:00
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2012-03-11 14:07:37 +00:00
|
|
|
};
|
2011-09-14 16:50:14 +01:00
|
|
|
}
|