-
-
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
[RFC] ns-3: init at 28.0 #31346
[RFC] ns-3: init at 28.0 #31346
Conversation
# All modules can be enabled by choosing 'all_modules'. | ||
# included here the DCE mandatory ones | ||
, modules ? [ "core" "network" "internet" "point-to-point"] | ||
, pkgs |
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 add pkgs
and pass gcc6
, python
and castxml
directly here.
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.
you already warned me on that for other PRs. Sorry. I used to start writing the packages from the overlay, hence the pkgs remaining from "super.pkgs" which I forgot to remove. It's more convenient then writing callPackage ../ns3 { inherit (super.pkgs) gcc6 python castxml }
. In fact I am curious how people create their package while waiting for a merge. If I add it to nixpkgs, then I lose the package once switching to another branch so it's hard to develop several packages at the same time.
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 personally use a nixpkgs checkout instead of channels: http://anderspapitto.com/posts/2015-11-01-nixos-with-local-nixpkgs-checkout.html
, dia, tetex ? null, ghostscript ? null, texlive ? null | ||
|
||
, withDoc ? false | ||
, withManual ? false |
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 would remove these flags and add an extra output for documentation/manual: outputs = [ "out" "man" "doc"];
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.
not sure how that will work but I'll look into it. Like if you don't call $outputDoc, it won't be built (or ns-3.doc) ?
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.
you can opt-out from installing documentation.
, withExamples ? false | ||
|
||
# --enable-tests | ||
, withTests ? true |
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 would not make testing optional here. This is done by hydra, so most people will not care.
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.
Agreed
texlive.combined.scheme-medium ]; | ||
|
||
propagatedBuildInputs = with python.pythonPackages; with pkgs; [ gcc6 python ] | ||
++ stdenv.lib.optional withGsl [ gsl-bin libgsl2 libgsl ] |
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.
What is the downside on enable this library by default?
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.
ns3 supports many optional libraries and configurations, i prefer to keep the build small rather than list all of them. I made an exception for this one because it's supposed to improve simulation speed but I wouldn't mind removing it altogether.
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.
If it increases speed significantly, then I would enable it.
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 asked on the channel and in fact it seems to just increase the wifi precision according to https://www.nsnam.org/wiki/Installation#Installation and not necessarily increase speed. I fixed the package names (locally), just gsl was enough
If the manual does not build yet, please do not advertise this as an option. |
While building the manual I meet
which apparently belongs to
I wonder where the problem lies: should sphinx or ns3 export some value for latex to find teh files ? maybe the problem has already been met |
I removed the gsl part as it' not about speed but about precision and this is not used in core so I had not tested it. As for the options that don't work, I moved them to a
|
If it doesn't work, then it should not go in. You can keep the relevant changes in your own branch. |
pkgs/top-level/all-packages.nix
Outdated
@@ -19014,6 +19014,10 @@ with pkgs; | |||
|
|||
megam = callPackage ../applications/science/misc/megam { }; | |||
|
|||
ns-3 = callPackage ../development/libraries/science/networking/ns3 { | |||
python=python3; |
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.
Is Python 3 required? If so, make the parameter python3
instead of python
. is it compatible with 2 and 3? Then just use python
.
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 tend to force python3 wherever I can't but ok I fixed it.
I updated the package for ns3.28. Bindings and manual now work (though I disabled them by default as it can be pretty expansive to compile stuff). |
ns-3 is a discrete event C++ network simulator developed at www.nsnam.org . Python bindings & manual building are disabled by default but you can override it.
Thanks! |
ns-3 is a discrete event C++ network simulator developed at www.nsnam.org popular in the networking research community.
Python bindings might not be functional yet, I could not test them as the required libraries are still in PR #30473 but I have yet to meet someone using the bindings.
The manual building doesn't complete yet but it's mostly useful for core developers upon release.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)