11 buildDotnetModule rec {
12 pname = "networkminer";
16 # Upstream does not provide versioned releases, a mirror has been uploaded
18 url = "https://archive.org/download/networkminer-${
19 lib.replaceStrings [ "." ] [ "-" ] version
20 }/NetworkMiner_${lib.replaceStrings [ "." ] [ "-" ] version}_source.zip";
21 sha256 = "1n2312acq5rq0jizlcfk0crslx3wgcsd836p47nk3pnapzw0cqvv";
24 dotnet-sdk = dotnetCorePackages.sdk_6_0-bin;
33 # Store application data in XDG_DATA_DIRS instead of trying to write to nix store
38 # Not all files have UTF-8 BOM applied consistently
39 find . -type f -exec dos2unix -m {} \+
41 # Embedded base64-encoded app icon in resx fails to parse. Delete it
42 sed -zi 's|<data name="$this.Icon".*</data>||g' NetworkMiner/NamedPipeForm.resx
43 sed -zi 's|<data name="$this.Icon".*</data>||g' NetworkMiner/UpdateCheck.resx
46 nugetDeps = ./deps.json;
51 msbuild /p:Configuration=Release NetworkMiner.sln
59 mkdir -p $out/bin $out/share
60 cp -r NetworkMiner/bin/Release $out/share/NetworkMiner
61 makeWrapper ${mono}/bin/mono $out/bin/NetworkMiner \
62 --add-flags "$out/share/NetworkMiner/NetworkMiner.exe" \
63 --add-flags "--noupdatecheck"
65 install -D NetworkMiner/NetworkMiner.desktop $out/share/applications/NetworkMiner.desktop
66 substituteInPlace $out/share/applications/NetworkMiner.desktop \
67 --replace "Exec=mono NetworkMiner.exe %f" "Exec=NetworkMiner" \
68 --replace "Icon=./networkminericon-96x96.png" "Icon=NetworkMiner"
69 install -D NetworkMiner/networkminericon-96x96.png $out/share/pixmaps/NetworkMiner.png
75 description = "Open Source Network Forensic Analysis Tool (NFAT)";
76 homepage = "https://www.netresec.com/?page=NetworkMiner";
77 license = licenses.gpl2Only;
78 maintainers = with maintainers; [ emilytrau ];
79 platforms = platforms.linux;
80 mainProgram = "NetworkMiner";