-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packetry: init at 0.4.0 #351392
Merged
Merged
packetry: init at 0.4.0 #351392
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
fetchFromGitHub, | ||
lib, | ||
stdenv, | ||
rustPlatform, | ||
gtk4, | ||
pkg-config, | ||
pango, | ||
wrapGAppsHook4, | ||
apple-sdk_11, | ||
versionCheckHook, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "packetry"; | ||
version = "0.4.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "greatscottgadgets"; | ||
repo = "packetry"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-eDVom0kAL1QwO8BtrJS76VTvxtKs7CP6Ob5BWlE6wOM="; | ||
}; | ||
|
||
cargoHash = "sha256-xz9PdVVB1u6s/anPBRonWS1kMN+4kfkK/gaOlF9Z3yk="; | ||
|
||
nativeBuildInputs = [ | ||
pkg-config | ||
wrapGAppsHook4 | ||
]; | ||
|
||
buildInputs = | ||
[ | ||
gtk4 | ||
pango | ||
] | ||
++ lib.optionals stdenv.isDarwin [ | ||
apple-sdk_11 | ||
]; | ||
|
||
# Disable test_replay tests as they need a gui | ||
preCheck = '' | ||
sed -i 's:#\[test\]:#[test] #[ignore]:' src/test_replay.rs | ||
''; | ||
|
||
nativeInstallCheckInputs = [ versionCheckHook ]; | ||
versionCheckProgramArg = "--version"; | ||
doInstallCheck = true; | ||
|
||
carlossless marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# packetry-cli is only necessary on windows https://github.com/greatscottgadgets/packetry/pull/154 | ||
postInstall = '' | ||
rm $out/bin/packetry-cli | ||
''; | ||
|
||
meta = { | ||
description = "USB 2.0 protocol analysis application for use with Cynthion"; | ||
homepage = "https://github.com/greatscottgadgets/packetry"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
mainProgram = "packetry"; | ||
platforms = lib.platforms.linux ++ lib.platforms.darwin; | ||
}; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packetry-cli
is only needed on windows atm: greatscottgadgets/packetry#154So we could remove it. Not tested.
The check for
windows
is not needed so long asmeta.platforms
doesn't include it but better be safe than sorry?Upstream builds for windows but I can't test it so I will not suggest adding it to
meta.platforms
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this, but I am a little conflicted about adding the hostPlatform check when windows is not part of the supported platforms (in this package.nix).
I am also unaware of how to approach testing the build on windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of the check a comment about it being needed only on windows with a link to the pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I opted to do that instead.