Skip to content

Commit

Permalink
unbound: fetch source from GitHub
Browse files Browse the repository at this point in the history
To avoid a xz-style supply chain attack.

Signed-off-by: Sefa Eyeoglu <[email protected]>
(cherry picked from commit c011c36)
  • Loading branch information
Scrumplex authored and github-actions[bot] committed Dec 9, 2024
1 parent afeba73 commit 5c4e0f8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 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 @@ -52,17 +53,19 @@ stdenv.mkDerivation (finalAttrs: {
pname = "unbound";
version = "1.22.0";

src = fetchurl {
url = "https://nlnetlabs.nl/downloads/unbound/unbound-${finalAttrs.version}.tar.gz";
hash = "sha256-xd0b3vXVaFss7bdJFY3RUsUtRPZVKaNKwVzYjUsbPUM=";
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 ]
++ lib.optionals withDNSTAP [ protobufc ]
++ [ pkg-config ]
++ [ pkg-config flex ]
++ lib.optionals withPythonModule [ swig ];

buildInputs = [ openssl nettle expat libevent ]
Expand Down

0 comments on commit 5c4e0f8

Please sign in to comment.