depot/third_party/nixpkgs/pkgs/tools/networking/openresolv/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

40 lines
987 B
Nix

{ stdenv, fetchurl, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
pname = "openresolv";
version = "3.10.0";
src = fetchurl {
url = "mirror://roy/openresolv/${pname}-${version}.tar.xz";
sha256 = "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20";
};
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 = "https://roy.marples.name/projects/openresolv";
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux;
};
}