nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 131 lines 2.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 makeWrapper, 6 alsa-lib, 7 at-spi2-atk, 8 at-spi2-core, 9 atk, 10 cairo, 11 cups, 12 dbus, 13 expat, 14 fontconfig, 15 freetype, 16 gdk-pixbuf, 17 glib, 18 gtk3, 19 libGL, 20 libappindicator-gtk3, 21 libdrm, 22 libnotify, 23 libpulseaudio, 24 libuuid, 25 libxcb, 26 libxkbcommon, 27 libxshmfence, 28 libgbm, 29 nspr, 30 nss, 31 pango, 32 systemd, 33 udev, 34 unzip, 35 xdg-utils, 36 xorg, 37}: 38stdenv.mkDerivation (finalAttrs: { 39 pname = "bloodhound"; 40 version = "4.3.1"; 41 42 src = fetchzip { 43 url = "https://github.com/SpecterOps/BloodHound-Legacy/releases/download/v${finalAttrs.version}/BloodHound-linux-x64.zip"; 44 hash = "sha256-gGfZ5Mj8rmz3dwKyOitRExkgOmSVDOqKpPxvGlE4izw="; 45 }; 46 47 rpath = lib.makeLibraryPath [ 48 alsa-lib 49 at-spi2-atk 50 at-spi2-core 51 atk 52 cairo 53 cups 54 dbus 55 expat 56 fontconfig 57 freetype 58 gdk-pixbuf 59 glib 60 gtk3 61 libGL 62 libappindicator-gtk3 63 libdrm 64 libnotify 65 libpulseaudio 66 libuuid 67 libxcb 68 libxkbcommon 69 libgbm 70 nspr 71 nss 72 pango 73 systemd 74 (lib.getLib stdenv.cc.cc) 75 udev 76 xorg.libX11 77 xorg.libXScrnSaver 78 xorg.libXcomposite 79 xorg.libXcursor 80 xorg.libXdamage 81 xorg.libXext 82 xorg.libXfixes 83 xorg.libXi 84 xorg.libXrandr 85 xorg.libXrender 86 xorg.libXtst 87 xorg.libxkbfile 88 xorg.libxshmfence 89 ]; 90 91 buildInputs = [ 92 gtk3 # needed for GSETTINGS_SCHEMAS_PATH 93 ]; 94 95 nativeBuildInputs = [ 96 makeWrapper 97 unzip 98 ]; 99 100 dontBuild = true; 101 102 installPhase = '' 103 runHook preInstall 104 mkdir -p $out/{bin,/lib/BloodHound} 105 mv * $out/lib/BloodHound 106 chmod +x $out/lib/BloodHound/BloodHound 107 108 patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ 109 $out/lib/BloodHound/BloodHound --set-rpath ${finalAttrs.rpath}:$out/lib/BloodHound \ 110 --add-needed libudev.so # Needed to fix trace trap (core dump) 111 112 makeWrapper $out/lib/BloodHound/BloodHound $out/bin/BloodHound \ 113 --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \ 114 --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \ 115 --append-flags "--in-process-gpu" # fix for sandbox issues 116 117 runHook postInstall 118 ''; 119 120 meta = with lib; { 121 description = "Active Directory reconnaissance and attack path management tool"; 122 homepage = "https://github.com/SpecterOps/BloodHound-Legacy"; 123 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 124 changelog = "https://github.com/SpecterOps/BloodHound-Legacy/releases/tag/v${finalAttrs.version}"; 125 downloadPage = "https://github.com/SpecterOps/BloodHound-Legacy/releases"; 126 license = licenses.gpl3Plus; 127 maintainers = with maintainers; [ akechishiro ]; 128 platforms = [ "x86_64-linux" ]; 129 mainProgram = "BloodHound"; 130 }; 131})