kex works

This commit is contained in:
nora 2024-08-09 14:25:49 +02:00
parent e4363a61d2
commit 660fa8e10e
4 changed files with 80 additions and 20 deletions

19
test-openssh/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> { }, ... }:
let
optimizeWithFlags = pkg: flags:
pkgs.lib.overrideDerivation pkg (old:
let
newflags = pkgs.lib.foldl' (acc: x: "${acc} ${x}") "" flags;
oldflags =
if (pkgs.lib.hasAttr "NIX_CFLAGS_COMPILE" old)
then "${old.NIX_CFLAGS_COMPILE}"
else "";
in
{
CFLAGS = "-DDEBUG_KEXDH -DDEBUG_KEX -DDEBUG_KEXECDH";
NIX_CFLAGS_COMPILE = "${oldflags} ${newflags}";
checkPhase = "";
doCheck = false;
});
in
optimizeWithFlags pkgs.openssh [ "-DDEBUG_KEXDH" ]