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