tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
update-resolv-conf: 20141003 -> 2016-04-24
Nikolay Amiantov
9 years ago
49fe339b
bdc700c2
+16
-11
1 changed file
expand all
collapse all
unified
split
pkgs
tools
networking
openvpn
update-resolv-conf.nix
+16
-11
pkgs/tools/networking/openvpn/update-resolv-conf.nix
···
1
1
-
{ stdenv, fetchgit, makeWrapper, openresolv, coreutils }:
1
1
+
{ stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, which, systemd }:
2
2
3
3
-
stdenv.mkDerivation rec {
4
4
-
name = "update-resolv-conf-20141003";
3
3
+
let
4
4
+
binPath = lib.makeBinPath [ coreutils openresolv which systemd ];
5
5
6
6
-
src = fetchgit {
7
7
-
url = https://github.com/masterkorp/openvpn-update-resolv-conf/;
8
8
-
rev = "dd968419373bce71b22bbd26de962e89eb470670";
9
9
-
sha256 = "0j7mg66lqhgvhybgbn98y7i5skj1ify41hmb0yhkx2xrli8027b9";
6
6
+
in stdenv.mkDerivation rec {
7
7
+
name = "update-resolv-conf-2016-04-24";
8
8
+
9
9
+
src = fetchFromGitHub {
10
10
+
owner = "masterkorp";
11
11
+
repo = "openvpn-update-resolv-conf";
12
12
+
rev = "994574f36b9147cc78674a5f13874d503a625c98";
13
13
+
sha256 = "1rvzlaj53k8s09phg4clsyzlmf44dmwwyvg0nbg966sxp3xsqlxc";
10
14
};
11
15
12
16
nativeBuildInputs = [ makeWrapper ];
13
17
14
18
installPhase = ''
15
19
install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
16
16
-
sed -i 's,^\(RESOLVCONF=\).*,\1resolvconf,' $out/libexec/openvpn/update-resolv-conf
20
20
+
install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
17
21
18
18
-
wrapProgram $out/libexec/openvpn/update-resolv-conf \
19
19
-
--prefix PATH : ${coreutils}/bin:${openresolv}/sbin
22
22
+
for i in $out/libexec/openvpn/*; do
23
23
+
wrapProgram $i --prefix PATH : ${binPath}
24
24
+
done
20
25
'';
21
26
22
27
meta = with stdenv.lib; {
23
28
description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options";
24
24
-
homepage = https://github.com/masterkorp/openvpn-update-resolv-conf/;
29
29
+
homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/";
25
30
maintainers = with maintainers; [ abbradar ];
26
31
license = licenses.gpl2;
27
32
platforms = platforms.unix;