nixpkgs/pkgs/tools/networking/openresolv/default.nix
2016-09-07 14:15:57 +02:00

40 lines
951 B
Nix

{ stdenv, fetchurl, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
name = "openresolv-3.8.1";
src = fetchurl {
url = "mirror://roy/openresolv/${name}.tar.xz";
sha256 = "0hqxvrhc4r310hr59bwi1vbl16my27pdlnbrnbqqihiav67xfnfj";
};
buildInputs = [ makeWrapper ];
configurePhase =
''
cat > config.mk <<EOF
PREFIX=$out
SYSCONFDIR=/etc
SBINDIR=$out/sbin
LIBEXECDIR=$out/libexec/resolvconf
VARDIR=/run/resolvconf
MANDIR=$out/share/man
RESTARTCMD=false
EOF
'';
installFlags = "SYSCONFDIR=$(out)/etc";
postInstall = ''
wrapProgram "$out/sbin/resolvconf" --set PATH "${coreutils}/bin"
'';
meta = {
description = "A program to manage /etc/resolv.conf";
homepage = http://roy.marples.name/projects/openresolv;
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux;
};
}