depot/third_party/nixpkgs/pkgs/tools/networking/openresolv/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

42 lines
1,012 B
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
pname = "openresolv";
version = "3.13.2";
src = fetchFromGitHub {
owner = "NetworkConfiguration";
repo = "openresolv";
rev = "v${version}";
sha256 = "sha256-rpfzAIzuiO+QTFhN+tHND+OQOyX/GUPvLLX3CSSwqA4=";
};
nativeBuildInputs = [ 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 = lib.licenses.bsd2;
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.linux;
};
}