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

41 lines
978 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
2017-03-05 20:49:48 +00:00
name = "openresolv-${version}";
version = "3.9.1";
src = fetchurl {
2016-09-07 09:59:40 +01:00
url = "mirror://roy/openresolv/${name}.tar.xz";
sha256 = "1wlzi88837rf4ygswmzpbcmgkbbjhn5n322n9q6ir6x367hygf1q";
};
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
'';
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;
};
}