nixpkgs-suyu/pkgs/tools/networking/openresolv/default.nix

41 lines
976 B
Nix
Raw Normal View History

2021-01-15 10:19:50 +01:00
{ lib, stdenv, fetchurl, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
pname = "openresolv";
2021-01-20 19:04:28 +01:00
version = "3.12.0";
src = fetchurl {
url = "mirror://roy/openresolv/${pname}-${version}.tar.xz";
2021-01-20 19:04:28 +01:00
sha256 = "sha256-QrMFCOhXoihTXGMeqsk2hi2G7KaMFLXAvzh7oXa5G5c=";
};
nativeBuildInputs = [ makeWrapper ];
configurePhase =
''
cat > config.mk <<EOF
PREFIX=$out
SYSCONFDIR=/etc
SBINDIR=$out/sbin
LIBEXECDIR=$out/libexec/resolvconf
2016-09-07 10:59:40 +02:00
VARDIR=/run/resolvconf
MANDIR=$out/share/man
2016-09-07 10:59:40 +02:00
RESTARTCMD=false
EOF
'';
2019-11-05 02:10:31 +01:00
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";
2021-01-15 10:19:50 +01:00
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.linux;
};
}