mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
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 = "Program to manage /etc/resolv.conf";
|
|
mainProgram = "resolvconf";
|
|
homepage = "https://roy.marples.name/projects/openresolv";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
platforms = lib.platforms.linux ++ lib.platforms.freebsd;
|
|
};
|
|
}
|