2014-02-28 17:33:21 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, coreutils }:
|
2012-02-16 18:40:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-07-03 10:56:30 +01:00
|
|
|
name = "openresolv-3.5.7";
|
2012-02-16 18:40:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-10-16 18:18:34 +01:00
|
|
|
url = "mirror://roy/openresolv/${name}.tar.bz2";
|
2014-07-03 10:56:30 +01:00
|
|
|
sha256 = "14n51wqnh49zdvx11l79s3fh1jhg7kg9cfny5vk7zsix78spmyx7";
|
2012-02-16 18:40:05 +00:00
|
|
|
};
|
|
|
|
|
2014-02-28 17:33:21 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2012-02-16 18:40:05 +00:00
|
|
|
configurePhase =
|
|
|
|
''
|
|
|
|
cat > config.mk <<EOF
|
|
|
|
PREFIX=$out
|
|
|
|
SYSCONFDIR=/etc
|
|
|
|
SBINDIR=$out/sbin
|
|
|
|
LIBEXECDIR=$out/libexec/resolvconf
|
|
|
|
VARDIR=/var/run/resolvconf
|
|
|
|
MANDIR=$out/share/man
|
2012-03-01 14:45:27 +00:00
|
|
|
RESTARTCMD="false \1"
|
2012-02-16 18:40:05 +00:00
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = "SYSCONFDIR=$(out)/etc";
|
|
|
|
|
2014-02-28 17:33:21 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/sbin/resolvconf" --set PATH "${coreutils}/bin"
|
|
|
|
'';
|
|
|
|
|
2014-02-02 10:27:41 +00:00
|
|
|
meta = {
|
2012-02-16 18:40:05 +00:00
|
|
|
description = "A program to manage /etc/resolv.conf";
|
|
|
|
homepage = http://roy.marples.name/projects/openresolv;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.bsd2;
|
2014-02-02 10:27:41 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-02-16 18:40:05 +00:00
|
|
|
};
|
|
|
|
}
|