2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openresolv";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.13.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NetworkConfiguration";
|
|
|
|
repo = "openresolv";
|
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-rpfzAIzuiO+QTFhN+tHND+OQOyX/GUPvLLX3CSSwqA4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "resolvconf";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://roy.marples.name/projects/openresolv";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|