Hello everyone,
I am trying to create my first nix package and am receiving the following error during the build process (won’t even really start the build):
Build command: nix-build -A babashka
error: cannot auto-call a function that has an argument without a default value (‘localSystem’)
Steps I performed:
forked nix packages
cloned my repo (GitHub - bhougland18/nixpkgs: Nix Packages collection )
added a folder (…/tools/misc/babashka)
Created a default.nix file
added path to file in pkgs/top-level/all-packages.nix
pushed changed back to my repo
ran nix-build -A babashka in the root of my local nixpkgs folder.
The package I am trying to create is located here: GitHub - babashka/babashka: Native, fast starting Clojure interpreter for scripting
I think I don’t totally know how provide the necessary prerequistes during the build process. Also, I didn’t use nix shell, but I really want to better understand how and when to use this tool.
Thank you for any assistance, I want to transition from a happy user to a contributor.
Ben
2 Likes
b42
March 29, 2020, 2:16pm
2
Try callPackage
instead of allPackage
here
Now that is just embarrasing
Build still didn’t work, but it was for a reason I understand and can look into.
Thank you!
Ben
Thanks for the help. I fixed the issue and am now using the package I built. Below is my first commit to nix packages, let me know if I did anything wrong.
NixOS:master
← bhougland18:master
opened 01:33PM - 30 Mar 20 UTC
###### Motivation for this change
Add new package to repository. This is a sma… ll command line utility that allows one to use a subset of the clojure programming language in their shell commands.
###### Things done
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS linux)
- Built on platform(s)
- [x] NixOS
- [ ] macOS
- [ ] other Linux distributions
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- [x] Tested compilation of all pkgs that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review wip"`
- [x] Tested execution of all binary files (usually in `./result/bin/`)
- [x] Determined the impact on package closure size (by running `nix path-info -S` before and after)
- [x] Ensured that relevant documentation is up to date
- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
Reviewers welcome!
Well, looks like I did because it is failing because I am not a trusted user.