2021-11-09 16:09:14 +01:00
|
|
|
{ lib, stdenv, fetchgit, makeWrapper, coreutils, gawk, util-linux }:
|
2013-10-21 21:47:14 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2021-11-09 16:09:14 +01:00
|
|
|
pname = "openvpn-learnaddress";
|
|
|
|
version = "unstable-2013-10-21";
|
2013-10-21 21:47:14 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://gist.github.com/4058733.git";
|
2013-10-21 21:47:14 +02:00
|
|
|
rev = "19b03c3beb0190df46ea07bf4b68244acb8eae80";
|
|
|
|
sha256 = "16pcyvyhwsx34i0cjkkx906lmrwdd9gvznvqdwlad4ha8l8f8z42";
|
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ coreutils gawk util-linux ];
|
2013-10-21 21:47:14 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm555 ovpn-learnaddress $out/libexec/openvpn/openvpn-learnaddress
|
|
|
|
|
|
|
|
wrapProgram $out/libexec/openvpn/openvpn-learnaddress \
|
2021-01-15 10:19:50 +01:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ coreutils gawk util-linux ]}
|
2013-10-21 21:47:14 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Openvpn learn-address script to manage a hosts-like file";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://gist.github.com/offlinehacker/4058733/";
|
2021-01-15 10:19:50 +01:00
|
|
|
maintainers = [ lib.maintainers.offline ];
|
|
|
|
platforms = lib.platforms.unix;
|
2013-10-21 21:47:14 +02:00
|
|
|
};
|
|
|
|
}
|