vpnc-scripts: 2020-02-21 -> 2021-03-21

adds resolvectl support; as suggested by @liff
This commit is contained in:
Matt McHenry 2021-05-10 20:50:59 -04:00
parent e2b7cfedd6
commit 12368c04d1

View File

@ -1,15 +1,15 @@
{ lib, stdenv, fetchgit { lib, stdenv, fetchgit
, makeWrapper , makeWrapper
, nettools, gawk, openresolv, coreutils, gnugrep , nettools, gawk, systemd, openresolv, coreutils, gnugrep
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "vpnc-scripts"; pname = "vpnc-scripts";
version = "unstable-2020-02-21"; version = "unstable-2021-03-21";
src = fetchgit { src = fetchgit {
url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git"; url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git";
rev = "c0122e891f7e033f35f047dad963702199d5cb9e"; rev = "8fff06090ed193c4a7285e9a10b42e6679e8ecf3";
sha256 = "11b1ls012mb704jphqxjmqrfbbhkdjb64j2q4k8wb5jmja8jnd14"; sha256 = "14bzzpwz7kdmlbx825h6s4jjdml9q6ziyrq8311lp8caql68qdq1";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -24,7 +24,8 @@ stdenv.mkDerivation {
--replace "which" "type -P" --replace "which" "type -P"
'' + lib.optionalString stdenv.isLinux '' '' + lib.optionalString stdenv.isLinux ''
substituteInPlace $out/bin/vpnc-script \ substituteInPlace $out/bin/vpnc-script \
--replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" --replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" \
--replace "/usr/bin/resolvectl" "${systemd}/bin/resolvectl"
'' + '' '' + ''
wrapProgram $out/bin/vpnc-script \ wrapProgram $out/bin/vpnc-script \
--prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.isLinux [ openresolv ])}" --prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.isLinux [ openresolv ])}"