Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.11] unbound: 1.21.1 -> 1.22.0 with cross fixes #370926

Open
wants to merge 4 commits into
base: staging-24.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions pkgs/by-name/un/unbound/package.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{ stdenv
, lib
, fetchurl
, fetchFromGitHub
, openssl
, nettle
, expat
, flex
, libevent
, libsodium
, protobufc
Expand Down Expand Up @@ -40,6 +41,8 @@
# enable support for python plugins in unbound: note this is distinct from pyunbound
# see https://unbound.docs.nlnetlabs.nl/en/latest/developer/python-modules.html
, withPythonModule ? false
# enable support for .so plugins
, withDynlibModule ? false
, withLto ? !stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isMinGW
, withMakeWrapper ? !stdenv.hostPlatform.isMinGW
, libnghttp2
Expand All @@ -50,19 +53,20 @@

stdenv.mkDerivation (finalAttrs: {
pname = "unbound";
version = "1.21.1";
version = "1.22.0";

src = fetchurl {
url = "https://nlnetlabs.nl/downloads/unbound/unbound-${finalAttrs.version}.tar.gz";
hash = "sha256-MDbSPCNiKzbTyH6UMRe97BrI+Bljbrl42AZBaw+p6kY=";
src = fetchFromGitHub {
owner = "NLnetLabs";
repo = "unbound";
rev = "refs/tags/release-${finalAttrs.version}";
hash = "sha256-CFsd8tdFL+JbxmDZoWdStvWcs9azSaLtMG8Ih5oXE/A=";
};

outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB

nativeBuildInputs =
lib.optionals withMakeWrapper [ makeWrapper ]
nativeBuildInputs = [ bison flex pkg-config ]
++ lib.optionals withMakeWrapper [ makeWrapper ]
++ lib.optionals withDNSTAP [ protobufc ]
++ [ pkg-config ]
++ lib.optionals withPythonModule [ swig ];

buildInputs = [ openssl nettle expat libevent ]
Expand All @@ -88,6 +92,8 @@ stdenv.mkDerivation (finalAttrs: {
"--enable-systemd"
] ++ lib.optionals withPythonModule [
"--with-pythonmodule"
] ++ lib.optionals withDynlibModule [
"--with-dynlibmodule"
] ++ lib.optionals withDoH [
"--with-libnghttp2=${libnghttp2.dev}"
] ++ lib.optionals withECS [
Expand All @@ -114,8 +120,6 @@ stdenv.mkDerivation (finalAttrs: {
sed -E '/CONFCMDLINE/ s;${storeDir}/[a-z0-9]{32}-;${storeDir}/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-;g' -i config.h
'';

nativeCheckInputs = [ bison ];

doCheck = true;

postPatch = lib.optionalString withPythonModule ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5696,6 +5696,7 @@ with pkgs;
unbound-full = unbound.override {
python = python3;
withSystemd = true;
withDynlibModule = true;
withPythonModule = true;
withDoH = true;
withECS = true;
Expand Down