Closed BenediktBroich closed 1 year ago
You can easily create shell commands for this
nix-homepage(){
url=$(nix-instantiate --eval --json -A "$1.src.meta.homepage or $1.meta.homepage" | jq -r .)
xdg-open -- "$url"
}
You can easily create shell commands for this
nix-homepage(){ url=$(nix-instantiate --eval --json -A "$1.src.meta.homepage or $1.meta.homepage" | jq -r .) xdg-open -- "$url" }
I tried this on a checked out commit and did get an error saying:
pkgs/applications/science/robotics/plotjuggler/default.nix error: cannot evaluate a function that has an argument without a value ('lib')
Also i have to check out the commit and run git status to get the file name. So this is not as easy as running nixpkgs-review meta prid
.
The aim of the Feature request is to discuss if this would be a helpful feature for nixpkgs-review or not? And if i should invest time to implement it and create a pr.
pkgs/applications/science/robotics/plotjuggler/default.nix
that path does not exist in nixpkgs.
I don't think we need this.
I also feel like this goes out of scope of what I want in nixpkgs-review. Feel free to build your own tool though and share it!
Thanks for your nice project. I am relatively new to NixOS and i am trying to contribute to nixpkgs.
Right now i am using your project to test newly added package pull requests (pname: init at x.x.x). Most of these pr do not have a good description and extracting the source code url from the nix file does often need multiple copy and past commands.
I would like to have a meta command to extract the homepage and source link (and other meta data) and make it easily clickable in the terminal before executing the build or checking out the branch of the pull request manually. This may also be a security check before executing a build.
Example
Random example pr: 202355
Command:
Output: pname: d2 version: 0.0.13 meta.description: A modern diagram scripting language that turns text to diagrams. meta.homepage: https://d2lang.com source: https://github.com/terrastruct/d2
Related Discussion on nixos.org