16 version = "unstable-2022-12-05";
20 src = fetchFromGitHub {
21 owner = "r00t0v3rr1d3";
23 rev = "991244e9a0c0fc9302e48c4e708347c315f78b13";
24 hash = "sha256-0ik20wzE0cf6cC/HY6RwMHqkvqPFpZmOUyZyb5H3SHg=";
29 name = "Remove-mentions-of-old-metasploit-versions.patch";
30 url = "https://gitlab.com/kalilinux/packages/armitage/-/raw/042beb7494a10227761ecb3ddabf4019bbb78681/debian/patches/Remove-mentions-of-old-metasploit-versions.patch";
31 hash = "sha256-VUey/e8kcBWqAxYTfIXoyTAoDR/UKZKqBJAKmdabArY=";
34 name = "Update-postgresql-version-to-support-scram-sha-256.patch";
35 url = "https://gitlab.com/kalilinux/packages/armitage/-/raw/042beb7494a10227761ecb3ddabf4019bbb78681/debian/patches/Update-postgresql-version-to-support-scram-sha-256.patch";
36 hash = "sha256-ZPvcRoUCrq32g0Mw8+EhNl8DlI+jMYUlFyPW1VScgzc=";
39 name = "fix-launch-script.patch";
40 url = "https://gitlab.com/kalilinux/packages/armitage/-/raw/042beb7494a10227761ecb3ddabf4019bbb78681/debian/patches/fix-launch-script.patch";
41 hash = "sha256-I6T7iwShQLn+ZHuKa117VOlItXjY4/51RDbjvNJEW/4=";
44 name = "fix-meterpreter.patch";
45 url = "https://gitlab.com/kalilinux/packages/armitage/-/raw/042beb7494a10227761ecb3ddabf4019bbb78681/debian/patches/fix-meterpreter.patch";
46 hash = "sha256-p4fs5xFdC2apW0U8x8u9S4p5gq3Eiv+0E4CGccQZYKY=";
51 stdenv.mkDerivation (finalAttrs: {
52 inherit pname version src patches;
57 desktopName = "Armitage";
60 comment = finalAttrs.meta.description;
61 categories = [ "Network" "Security" ];
62 startupNotify = false;
71 ] ++ lib.optionals stdenv.isDarwin [
75 mitmCache = gradle.fetchDeps {
80 __darwinAllowLocalNetworking = true;
85 JAR="$out/share/armitage/armitage.jar"
86 install -Dm444 build/armitage.jar $JAR
88 install -Dm755 dist/unix/armitage $out/bin/armitage
89 substituteInPlace $out/bin/armitage \
90 --replace "armitage.jar" "$JAR"
91 wrapProgram $out/bin/armitage \
92 --prefix PATH : "${lib.makeBinPath [ jdk11 metasploit ]}"
94 install -Dm755 dist/unix/teamserver $out/bin/teamserver
95 substituteInPlace $out/bin/teamserver \
96 --replace "armitage.jar" "$JAR"
97 wrapProgram $out/bin/teamserver \
98 --prefix PATH : "${lib.makeBinPath [ jdk11 metasploit ]}"
100 install -Dm444 dist/unix/armitage-logo.png $out/share/pixmaps/armitage.png
101 ${lib.optionalString stdenv.isDarwin ''
102 mkdir -p "$out/Applications/Armitage.app/Contents/MacOS"
103 mkdir -p "$out/Applications/Armitage.app/Contents/Resources"
104 cp dist/mac/Armitage.app/Contents/Resources/macIcon.icns $out/Applications/Armitage.app/Contents/Resources
105 write-darwin-bundle $out Armitage armitage macIcon
112 description = "Graphical cyber attack management tool for Metasploit";
113 homepage = "https://github.com/r00t0v3rr1d3/armitage";
114 license = licenses.bsd3;
115 maintainers = with maintainers; [ emilytrau ];
116 platforms = platforms.unix;
117 mainProgram = "armitage";