Unverified Commit 101ba273 authored by Gutyina Gergő's avatar Gutyina Gergő
Browse files

networkminer: refactor

parent e1443bd5
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
{
  lib,
  buildDotnetModule,
  fetchurl,
  unzip,
  fetchzip,
  dos2unix,
  msbuild,
  mono,
  dotnetCorePackages,
}:

buildDotnetModule rec {
  pname = "networkminer";
  version = "3.0";
@@ -16,18 +16,17 @@ buildDotnetModule rec {
    let
      version' = lib.replaceString "." "-" version;
    in
    fetchurl {
    fetchzip {
      # Upstream does not provide versioned releases, a mirror has been uploaded
      # to archive.org
      # Non-versioned download link can be found on https://www.netresec.com/?page=NetworkMinerSourceCode
      url = "https://archive.org/download/network-miner-${version'}-source/NetworkMiner_${version'}_source.zip";
      hash = "sha256-I5VtpfmlYO0+K1WtwouP0lzJptpE0sHn5JeCBTnXdio=";
      hash = "sha256-BdjSsFSpt3U7IUurY1dmprzq8wNdPNZyXGKeIGETr7Q=";
    };

  dotnet-sdk = dotnetCorePackages.sdk_8_0;

  nativeBuildInputs = [
    unzip
    dos2unix
    msbuild
  ];
@@ -56,7 +55,7 @@ buildDotnetModule rec {

    mkdir -p $out/bin $out/share
    cp -r NetworkMiner/bin/Release $out/share/NetworkMiner
    makeWrapper ${mono}/bin/mono $out/bin/NetworkMiner \
    makeWrapper ${lib.getExe mono} $out/bin/NetworkMiner \
      --add-flags "$out/share/NetworkMiner/NetworkMiner.exe" \
      --add-flags "--noupdatecheck"

@@ -68,12 +67,12 @@ buildDotnetModule rec {
    runHook postInstall
  '';

  meta = with lib; {
  meta = {
    description = "Open Source Network Forensic Analysis Tool (NFAT)";
    homepage = "https://www.netresec.com/?page=NetworkMiner";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ emilytrau ];
    platforms = platforms.linux;
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [ emilytrau ];
    platforms = lib.platforms.linux;
    mainProgram = "NetworkMiner";
  };
}