-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
twa: init at 1.3.1 #47112
twa: init at 1.3.1 #47112
Conversation
This is the first ever package I've defined with Nix. There are a few questions left unanswered for me:
|
src = fetchFromGitHub { | ||
owner = "trailofbits"; | ||
repo = "twa"; | ||
rev = "${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.
I think this could just be version
, rather than with the interpolation. I copied this from another package definition, though, so I left it in case it's convention.
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.
yes, rev = version;
is preferred here.
buildInputs = [ bash gawk curl netcat ]; | ||
|
||
installPhase = '' | ||
install -Dm 0755 twa "$out/bin/twa" |
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 needs to be wrapped with makeWrapper to have curl, netcat and ncurses in its PATH:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/phantomjs2/default.nix#L91
Done. This time I tested with However, I also realized that the |
Tscore has awk in its shebang, no? |
Yes. It does. Does that mean Nix is aware of the dependency to awk? |
Yes. It automatically scans runtime dependencies by looking for nix store paths in the package. |
This is the right thing and we want that for all new packages. https://nixos.wiki/wiki/Nixpkgs#Becoming_a_Nixpkgs_maintainer |
I'm resolving the conflict. I also might use a different email address. |
Motivation for this change
More and more of my colleagues are making the switch to NixOS, and it would be convenient for them, and myself, if we could install
twa
(a tool we use) directly from nixpkgs.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)