aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix b/infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix
new file mode 100644
index 000000000000..76d04e6b685c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/networking/openvpn/update-resolv-conf.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, systemd }:
+
+let
+ binPath = lib.makeBinPath [ coreutils openresolv systemd ];
+
+in stdenv.mkDerivation {
+ name = "update-resolv-conf-2017-06-21";
+
+ src = fetchFromGitHub {
+ owner = "masterkorp";
+ repo = "openvpn-update-resolv-conf";
+ rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
+ sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ installPhase = ''
+ install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
+ install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
+
+ for i in $out/libexec/openvpn/*; do
+ wrapProgram $i --prefix PATH : ${binPath}
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options";
+ homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/";
+ maintainers = with maintainers; [ abbradar ];
+ license = licenses.gpl2;
+ platforms = platforms.unix;
+ };
+}