Hello!
As in the title; in attempting to bring the current hy
version to the latest, I am encountering the error in the title. This is my overlay:
final: prev: { python310 = prev.python310.override (super: {
packageOverrides = lib.composeExtensions (super.packageOverrides or (_: _: {})) (new: old: {
hy = prev.python310.pkgs.hy.overridePythonAttrs (old: with final.Python3.pkgs; rec {
version = "0.24.0";
HY_VERSION = version;
src = final.fetchFromGitHub {
owner = "hylang";
repo = old.pname;
rev = version;
sha256 = "1s458ymd9g3s8k2ccc300jr4w66c7q3vhmhs9z3d3a4qg0xdhs9y";
};
postPatch = ''substituteInPlace setup.py --replace "\"funcparserlib ~= 1.0\"," ""'' + (old.postPatch or "");
disabledTestPaths = [ "tests/test_bin.py" ] ++ (old.disabledTestPaths or []);
passthru = (old.passthru or {}) // {
tests.version = testers.testVersion {
package = hy;
command = "hy -v";
};
withPackages = python-packages: (toPythonApplication hy).override {
hyDefinedPythonPackages = python-packages;
};
};
});
});
}); }
And this is the trace:
error: cannot coerce a function to a string
at /nix/store/gadw1hblrqm0rs7gs69vkpa8lsyhrcym-source/flake.nix:926:37:
925| withPackages = python-packages: (toPythonApplication hy).override {
926| hyDefinedPythonPackages = python-packages;
| ^
927| };
… while evaluating the attribute 'hyDefinedPythonPackages' of the derivation 'python3.10-hy-0.24.0'
at /nix/store/i6928nc3i36yaqkbrrv8bz8hgvpx7lqp-defaultPatches/pkgs/stdenv/generic/make-derivation.nix:278:7:
277| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
278| name =
| ^
279| let
What confuses me is that hyDefinedPythonPackages
is meant to be a function, and without withPackages
, I cannot create a Hy package / app for a flake, used by nix run
.
Thank you kindly for the help!