From f221ee03e86c93beb5a27fd183f26abce71d7ece Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Sat, 19 Oct 2024 19:53:57 +0200 Subject: [PATCH] packetry: init at 0.3.0 --- pkgs/by-name/pa/packetry/package.nix | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/pa/packetry/package.nix diff --git a/pkgs/by-name/pa/packetry/package.nix b/pkgs/by-name/pa/packetry/package.nix new file mode 100644 index 0000000000000..73bea533899bf --- /dev/null +++ b/pkgs/by-name/pa/packetry/package.nix @@ -0,0 +1,55 @@ +{ + fetchFromGitHub, + lib, + stdenv, + rustPlatform, + gtk4, + pkg-config, + pango, + wrapGAppsHook4, + darwin, + versionCheckHook, +}: + +rustPlatform.buildRustPackage rec { + pname = "packetry"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "greatscottgadgets"; + repo = "packetry"; + rev = "refs/tags/v${version}"; + hash = "sha256-yar4HusBSaiKj2QMwtt83jmbfzwt+oFTQ6UVVbOZbYQ="; + }; + + cargoHash = "sha256-W3J3MnRPxhXXc7MBQemnYKloVnuU52p48vrNsd+FCY4="; + + nativeBuildInputs = [ + pkg-config + wrapGAppsHook4 + ]; + + buildInputs = + [ + gtk4 + pango + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + ]; + + # Tests need a display to run + doCheck = false; + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + meta = with lib; { + description = "USB 2.0 protocol analysis application for use with Cynthion"; + homepage = "https://github.com/greatscottgadgets/packetry"; + license = licenses.bsd3; + maintainers = with maintainers; [ carlossless ]; + mainProgram = "packetry"; + platforms = platforms.linux ++ platforms.darwin; + }; +}