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