mach-nix
mach-nix copied to clipboard
`error: cannot coerce null to a string` on M1 Mac
mach-nix gen -r <(echo "simplenet==0.1.2")
works as expected on Linux x86_64 machine.
On MacOS 12.4 (M1 MBP) I'm having trouble. The flake
doesn't seem to give me a binary at all (https://github.com/DavHau/mach-nix/issues/479).
Using a pip installed mach-nix:
$ mach-nix gen -r <(echo "simplenet==0.1.2")
Generating python environment... If you run this the first time, the python package index and dependency graph (~200MB) need to be downloaded. Please stay patient!
error: cannot coerce null to a string
at /nix/store/lhjdy3fdhglnc3p4sv5hra11v1mch0gs-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:34:
191| // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
192| name = "${attrs.pname}-${attrs.version}";
| ^
193| } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
(use '--show-trace' to show detailed location information)
Using a nix-shell
installed mach-nix:
[nix-shell:/tmp/foo]$ mach-nix gen -r <(printf "simplenet==0.1.2")
path is '/nix/store/ahaz90hy6lins0a56mdivrd2fjj3rcb5-554d2d8aa25b6e583575459c297ec23750adb6cb'
error: the string '{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1643805626,
"narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "554d2d8aa25b6e583575459c297ec23750adb6cb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"pypi-deps-db": {
"flake": false,
"locked": {
"lastModified": 1643877077,
"narHash": "sha256-jv8pIvRFTP919GybOxXE5TfOkrjTbdo9QiCO1TD3ZaY=",
"owner": "DavHau",
"repo": "pypi-deps-db",
"rev": "da53397f0b782b0b18deb72ef8e0fb5aa7c98aa3",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "pypi-deps-db",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"pypi-deps-db": "pypi-deps-db"
}
}
},
"root": "root",
"version": 7
}
' is not allowed to refer to a store path (such as '')
at /nix/store/gsz7mwqjjhvhg5dq2g9xmz5rw590mms6-mach-nix-master/lib/python3.9/site-packages/mach_nix/nix/flake-inputs.nix:4:11:
3| let
4| lock = (fromJSON (readFile ../flake.lock)).nodes;
| ^
5| get = input: {
(use '--show-trace' to show detailed location information)
Any idea why this wouldn't work on MacOS?