3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/openresolv/default.nix

41 lines
987 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
pname = "openresolv";
2020-02-01 14:54:41 +00:00
version = "3.10.0";
src = fetchurl {
url = "mirror://roy/openresolv/${pname}-${version}.tar.xz";
2020-02-01 14:54:41 +00:00
sha256 = "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20";
};
buildInputs = [ makeWrapper ];
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
MANDIR=$out/share/man
2016-09-07 09:59:40 +01:00
RESTARTCMD=false
EOF
'';
2019-11-05 01:10:31 +00:00
installFlags = [ "SYSCONFDIR=$(out)/etc" ];
postInstall = ''
wrapProgram "$out/sbin/resolvconf" --set PATH "${coreutils}/bin"
'';
meta = {
description = "A program to manage /etc/resolv.conf";
homepage = "https://roy.marples.name/projects/openresolv";
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux;
};
}