2014-02-28 17:33:21 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, coreutils }:
|
2012-02-16 18:40:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "openresolv";
|
2020-07-25 18:59:48 +01:00
|
|
|
version = "3.11.0";
|
2012-02-16 18:40:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://roy/openresolv/${pname}-${version}.tar.xz";
|
2020-07-25 18:59:48 +01:00
|
|
|
sha256 = "0g7wb2880hbr0x99n73m7fgjm7lcdbpxfy2i620zxcq73qfrvspa";
|
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
|
2016-09-07 09:59:40 +01:00
|
|
|
VARDIR=/run/resolvconf
|
2012-02-16 18:40:05 +00:00
|
|
|
MANDIR=$out/share/man
|
2016-09-07 09:59:40 +01:00
|
|
|
RESTARTCMD=false
|
2012-02-16 18:40:05 +00:00
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2019-11-05 01:10:31 +00:00
|
|
|
installFlags = [ "SYSCONFDIR=$(out)/etc" ];
|
2012-02-16 18:40:05 +00:00
|
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://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
|
|
|
};
|
|
|
|
}
|