2014-02-28 09:33:21 -08:00
|
|
|
{ stdenv, fetchurl, makeWrapper, coreutils }:
|
2012-02-16 10:40:05 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "openresolv";
|
2020-02-01 06:54:41 -08:00
|
|
|
version = "3.10.0";
|
2012-02-16 10:40:05 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "mirror://roy/openresolv/${pname}-${version}.tar.xz";
|
2020-02-01 06:54:41 -08:00
|
|
|
sha256 = "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20";
|
2012-02-16 10:40:05 -08:00
|
|
|
};
|
|
|
|
|
2014-02-28 09:33:21 -08:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2012-02-16 10:40:05 -08:00
|
|
|
configurePhase =
|
|
|
|
''
|
|
|
|
cat > config.mk <<EOF
|
|
|
|
PREFIX=$out
|
|
|
|
SYSCONFDIR=/etc
|
|
|
|
SBINDIR=$out/sbin
|
|
|
|
LIBEXECDIR=$out/libexec/resolvconf
|
2016-09-07 01:59:40 -07:00
|
|
|
VARDIR=/run/resolvconf
|
2012-02-16 10:40:05 -08:00
|
|
|
MANDIR=$out/share/man
|
2016-09-07 01:59:40 -07:00
|
|
|
RESTARTCMD=false
|
2012-02-16 10:40:05 -08:00
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2019-11-04 17:10:31 -08:00
|
|
|
installFlags = [ "SYSCONFDIR=$(out)/etc" ];
|
2012-02-16 10:40:05 -08:00
|
|
|
|
2014-02-28 09:33:21 -08:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/sbin/resolvconf" --set PATH "${coreutils}/bin"
|
|
|
|
'';
|
|
|
|
|
2014-02-02 02:27:41 -08:00
|
|
|
meta = {
|
2012-02-16 10:40:05 -08:00
|
|
|
description = "A program to manage /etc/resolv.conf";
|
2018-01-05 11:42:46 -08:00
|
|
|
homepage = https://roy.marples.name/projects/openresolv;
|
2014-06-18 21:19:00 -07:00
|
|
|
license = stdenv.lib.licenses.bsd2;
|
2014-02-02 02:27:41 -08:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-02-16 10:40:05 -08:00
|
|
|
};
|
|
|
|
}
|