Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fa0ed8d276dd
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d09738dd9070
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 9, 2020

  1. libbpf: fix incomplete linkage

    Also use a better reallocarray fix.
    vcunat committed Sep 9, 2020
    Copy the full SHA
    1612445 View commit details
  2. knot-dns: 2.9.6 -> 3.0.0

    Upgrade should be pretty easy:
    https://www.knot-dns.cz/docs/3.0/html/migration.html#upgrade-2-9-x-to-3-0-x
    
    https://en.blog.nic.cz/2020/09/09/knot-dns-3-0-news/
    https://gitlab.nic.cz/knot/knot-dns/-/tags/v3.0.0
    
    For now, it's built with XDP support but the NixOS service
    isn't ready for that yet.  I'll try to look at that sometime later.
    vcunat committed Sep 9, 2020

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    d09738d View commit details
Showing with 22 additions and 11 deletions.
  1. +16 −8 pkgs/os-specific/linux/libbpf/default.nix
  2. +6 −3 pkgs/servers/dns/knot-dns/default.nix
24 changes: 16 additions & 8 deletions pkgs/os-specific/linux/libbpf/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig
, libelf, zlib
, fetchpatch
}:

with builtins;
@@ -15,21 +16,28 @@ stdenv.mkDerivation rec {
sha256 = "1wi3a795jq0smqg1c5ml2ghai47n1m5ijmch017wscybx4jdlynv";
};

patches = [
(fetchpatch { # included upstream for > 0.1.0
name = "link-zlib.patch";
url = "https://github.com/libbpf/libbpf/commit/8b14cb43ff837.diff";
sha256 = "17mvjrs7s727drz013a8qlyj0345ldi2kph6pazcmxv6kl1qrz2z";
})
];
patchFlags = "-p2";
# https://github.com/libbpf/libbpf/pull/201#issuecomment-689174740
postPatch = ''
substituteInPlace ../scripts/check-reallocarray.sh \
--replace 'mktemp /tmp/' 'mktemp ' \
--replace '/bin/rm' 'rm'
'';

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libelf zlib ];

sourceRoot = "source/src";
enableParallelBuilding = true;
makeFlags = [ "PREFIX=$(out)" ];

patchPhase = ''
substituteInPlace ../scripts/check-reallocarray.sh \
--replace '/bin/rm' 'rm'
# Without patching this the config-test program will be refused by our CC wrapper.
chmod +w ../scripts
sed -e '2a NIX_ENFORCE_PURITY=0' -i ../scripts/check-reallocarray.sh
'';

# FIXME: Multi-output requires some fixes to the way the pkgconfig file is
# constructed (it gets put in $out instead of $dev for some reason, with
# improper paths embedded). Don't enable it for now.
9 changes: 6 additions & 3 deletions pkgs/servers/dns/knot-dns/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{ stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring
, systemd, nettle, libedit, zlib, libiconv, libintl, libmaxminddb
, systemd, nettle, libedit, zlib, libiconv, libintl, libmaxminddb, libbpf, nghttp2
, autoreconfHook
}:

let inherit (stdenv.lib) optional optionals; in

stdenv.mkDerivation rec {
pname = "knot-dns";
version = "2.9.6";
version = "3.0.0";

src = fetchurl {
url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
sha256 = "bf742883c6825b54f19f2dadca2c94fec1ff8bdcf0a52388e2e167937594b2e7";
sha256 = "f1c96aff6e873a2f9b1b8c2441d5a7801dd48d3abdb738a4d24b26c2a8fbe6c4";
};

outputs = [ "bin" "out" "dev" ];
@@ -34,8 +34,11 @@ stdenv.mkDerivation rec {
gnutls liburcu libidn2 libunistring
nettle libedit
libiconv lmdb libintl
libbpf # XDP support
nghttp2 # DoH support in kdig
libmaxminddb # optional for geoip module (it's tiny)
# without sphinx &al. for developer documentation
# TODO: add dnstap support?
]
++ optionals stdenv.isLinux [ libcap_ng systemd ]
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls