-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Initial commit of Google's packetdrill #23679
Conversation
@@ -0,0 +1,25 @@ | |||
{ pkgs ? import <nixpkgs> {} }: |
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.
Please do not pass the entire package set; specify inputs as parameters.
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.
whoops, my bad, will fix.
sha256 = "09sqiakmn63idfjhy2ddf1456sfhi8yhsbp8lxvc1yfjikjxwwbc"; | ||
}; | ||
setSourceRoot = '' | ||
export sourceRoot=$(realpath */gtests/net/packetdrill) |
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.
Have you tried just sourceRoot = "gtests/net/packetdrill"
?
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 have not, but will.
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.stdenv.mkDerivation { | ||
version = "1.0"; | ||
name = "packetdrill-${version}"; |
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.
The attrset passed to mkDerivation
must be rec
for values to refer to other attrs in the same set.
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.
That was a last minute change. Will fix.
enableParallelBuilding = true; | ||
|
||
meta = { | ||
description = "The packetdrill scripting tool enables quick, precise tests for entire TCP/UDP/IPv4/IPv6 network stacks, from the system call layer down to the NIC hardware"; |
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.
This is too long. Please review the packaging guidelines.
meta = { | ||
description = "The packetdrill scripting tool enables quick, precise tests for entire TCP/UDP/IPv4/IPv6 network stacks, from the system call layer down to the NIC hardware"; | ||
homepage = https://github.com/google/packetdrill; | ||
license = "GPLv2"; |
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.
Use stdenv.lib.licenses
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.
k
nix-repl> stdenv.lib.licenses.gpl2
{ fullName = "GNU General Public License v2.0 only"; shortName = "gpl2"; ...}
description = "The packetdrill scripting tool enables quick, precise tests for entire TCP/UDP/IPv4/IPv6 network stacks, from the system call layer down to the NIC hardware"; | ||
homepage = https://github.com/google/packetdrill; | ||
license = "GPLv2"; | ||
platforms = stdenv.lib.platforms.gnu; |
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.
Why gnu
?
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.
Because I copied it from telnet
:) will fix.
@joachifm ready for updated review |
but that githash will change with every update, and the -src at the end can change due to how you fetch the source using a * will catch whatever it is, and only one directory will contain gtests and match it |
Merged. Thank you |
@joachifm cheers 🍻 |
Motivation for this change
Perform full network stack testing with the nix package manager.
cc @cleverca22
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)