Trouble with creating first nix package

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:

  1. forked nix packages
  2. cloned my repo (GitHub - bhougland18/nixpkgs: Nix Packages collection)
  3. added a folder (…/tools/misc/babashka)
  4. Created a default.nix file
  5. added path to file in pkgs/top-level/all-packages.nix
  6. pushed changed back to my repo
  7. 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.



Try callPackage instead of allPackage here :slight_smile:

Now that is just embarrasing :crazy_face:

Build still didn’t work, but it was for a reason I understand and can look into.

Thank you!

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.

Reviewers welcome!

Well, looks like I did because it is failing because I am not a trusted user.