1 { callPackage, lib, fetchurl, fetchpatch, fetchFromGitHub, autoreconfHook }:
3 common = opts: callPackage (import ./common.nix opts) { };
12 url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz";
13 hash = "sha256-6bq6dwGnalHz2Fpiw4OjydzZf6kAuFm8fbEUwYaK+Kg=";
16 extraPatches = [ ./ssh-keysign-8.5.patch ];
17 extraMeta.maintainers = with lib.maintainers; [ das_j ];
20 openssh_hpn = common rec {
21 pname = "openssh-with-hpn";
23 extraDesc = " with high performance networking patches";
26 url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz";
27 hash = "sha256-P2bb8WVftF9Q4cVtpiqwEhjCKIB7ITONY068351xz0Y=";
31 ./ssh-keysign-8.5.patch
33 # HPN Patch from FreeBSD ports
35 name = "ssh-hpn-wo-channels.patch";
36 url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/10491773d88012fe81d9c039cbbba647bde9ebc9/security/openssh-portable/files/extra-patch-hpn";
38 excludes = [ "channels.c" ];
39 sha256 = "sha256-kSj0oE7gNHfIciy0/ErhdfrbmfjQmd8hduyiRXFnVZA=";
43 name = "ssh-hpn-channels.patch";
44 url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/10491773d88012fe81d9c039cbbba647bde9ebc9/security/openssh-portable/files/extra-patch-hpn";
46 includes = [ "channels.c" ];
47 sha256 = "sha256-pDLUbjv5XIyByEbiRAXC3WMUPKmn15af1stVmcvr7fE=";
51 extraNativeBuildInputs = [ autoreconfHook ];
53 extraConfigureFlags = [ "--with-hpn" ];
55 maintainers = with lib.maintainers; [ abbe ];
56 knownVulnerabilities = [ "CVE-2023-28531" ];
60 openssh_gssapi = common rec {
61 pname = "openssh-with-gssapi";
63 extraDesc = " with GSSAPI support";
66 url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz";
67 sha256 = "12m2f9czvgmi7akp7xah6y7mrrpi280a3ksk47iwr7hy2q1475q3";
71 ./ssh-keysign-8.5.patch
74 name = "openssh-gssapi.patch";
75 url = "https://salsa.debian.org/ssh-team/openssh/raw/debian/1%25${version}-1/debian/patches/gssapi.patch";
76 sha256 = "sha256-VG7+2dfu09nvHWuSAB6sLGMmjRCDCysl/9FR1WSF21k=";
80 extraNativeBuildInputs = [ autoreconfHook ];
81 extraMeta.knownVulnerabilities = [ "CVE-2023-28531" ];