16 heimdalConfigHeader = fetchurl {
17 url = "https://raw.githubusercontent.com/heimdal/heimdal/d8c10e68a61f10c8fca62b227a0766d294bda4a0/include/heim_threads.h";
18 sha256 = "08345hkb5jbdcgh2cx3d624w4c8wxmnnsjxlw46wsnm39k4l0ihw";
21 stdenv.mkDerivation rec {
22 pname = "openvas-smb";
25 src = fetchFromGitHub {
28 rev = "refs/tags/v${version}";
29 hash = "sha256-wnlBOHYOTWNbwzoHCpsXbuhp0uH3wBH6+Oo4Y+zSsfg=";
47 # The pkg expects the heimdal headers to be in a "heimdal" folder, which is the case on
48 # debian, but not on nix. Additionally some heimdal header names have the same names
49 # as kerberos header names, so the old include path is removed.
53 # symlink to change include path for heimdal headers from "heim_etc.h" to "heimdal/heim_etc.h"
54 ln -s ${heimdal.dev}/include include/heimdal
55 remove="-isystem ${heimdal.dev}/include "
56 NIX_CFLAGS_COMPILE=''${NIX_CFLAGS_COMPILE//"''$remove"/}
57 NIX_CFLAGS_COMPILE+=" -isystem $(pwd)/include";
59 # add default config header for heimdal
60 cp ${heimdalConfigHeader} include/heim_threads.h
64 description = "SMB module for Greenbone Community Edition";
65 homepage = "https://github.com/greenbone/openvas-smb";
66 license = licenses.gpl2Only;
67 maintainers = with maintainers; [ mi-ael ];
69 platforms = platforms.unix;