Problem. I am building a nix expression godot-haskell
from its GitHub repo which
- Has/requires git submodules to compile properly
- Takes an optional build argument
godot-api
that I'd like to use
If I manually clone this repo (recursively via git clone --recursive
), and then
let
# ...
godot-haskell = haskellPackages.callPackage /local/path/to/default.nix { api-json = godot-api; };
# ...
in
# ...
then everything works fine! But if instead I try to do this non-locally:
godot-haskell-nix = "${fetchFromGitHub {
fetchSubmodules = true;
owner = "SimulaVR";
repo = "godot-haskell";
rev = "df592f8e12647ed58d7ba6da4cf40a382d83725e";
sha256 = "05wp8lzj2xqwkif8hw9l4byw0dfm3y3jaccsvjif4izfwycj91r8";
}}/default.nix";
godot-haskell = haskellPackages.callPackage godot-haskell-nix { api-json = godot-api; }; # <- With the `api-json` build argument
then I get
error: anonymous function at /nix/store/xnf67r119iazf828ixny8wjyzl01hwsg-source/default.nix:1:1 called with unexpected argument 'api-json', at /nix/store/7knlwgidnagqrckm5h051i4rxjf3l68z-nixpkgs-20.03pre211220.1144ee55385/nixpkgs/pkgs/development/haskell-modules/make-package-set.nix:87:27
(use '--show-trace' to show detailed location information)
Question: Why does this work fine when done locally, but suddenly fail when using fetchFromGitHub
? How to get around this error?