From cbe33249936895d999eafa9d8ad6a16d42ca91f5 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 30 Dec 2023 11:30:29 -0500 Subject: [PATCH] quicktun: fix cross compilation, add missing runHook --- pkgs/tools/networking/quicktun/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/quicktun/default.nix b/pkgs/tools/networking/quicktun/default.nix index 2c1799387df8..2c28e3665698 100644 --- a/pkgs/tools/networking/quicktun/default.nix +++ b/pkgs/tools/networking/quicktun/default.nix @@ -15,11 +15,22 @@ stdenv.mkDerivation { buildInputs = [ libsodium ]; - buildPhase = "bash build.sh"; + postPatch = '' + substituteInPlace build.sh \ + --replace "cc=\"cc\"" "cc=\"$CC\"" + ''; + + buildPhase = '' + runHook preBuild + bash build.sh + runHook postBuild + ''; installPhase = '' + runHook preInstall rm out/quicktun*tgz install -vD out/quicktun* -t $out/bin + runHook postInstall ''; passthru.tests.quicktun = nixosTests.quicktun;