mach-nix error 'string is not allowed to refer to a store path'
See original GitHub issueHi
I’m attempting to generate a nix expression from a requirements.txt file
mach-nix gen -r requirements.txt -o test.nix
but I get the error
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 '/nix/store/190cnmivy4dy51ij6506r4m8w556vmzj-python3.9-resolvelib-0.3.0')
at /nix/store/amblv1hi0dck9f7aswwypn3hgx3bnbl9-mach-nix-3.4.0/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)
I should mention, I’m on Mac OS Catalina and after installing nix i was unable to run it. I read the suggestion to
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
after which
nix --version
is nix (Nix) 2.6.0
and I was able to install and run mach-nix
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
error: the string '...' is not allowed to refer to a store path · Issue ...
Describe the bug I'm getting an eval error for an expression that used to evaluate and I don't exactly know why Steps To...
Read more >"not allowed to refer to a store path" error - NixOS Discourse
It means the string has a context, and it's being used somewhere where strings are not allowed to have contexts. The string provided...
Read more >[Nix-dev] Re: the string .. is not allowed to refer to a store path
[prev in thread] [next in thread] List: nix-dev Subject: [Nix-dev] Re: the string .. is not allowed to refer to a store path...
Read more >When does a nix path type make it into the nix store and when ...
To make this possible, every string in nix has a "context" that tracks what the string depends on (in practice a list of...
Read more >Handling text — strings in JavaScript - Learn web development
Since the Web is a largely text-based medium designed to allow humans to ... const string = "The revolution will not be televised....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I encountered the same problem, even with the latest master
It’s still around on current master and nix 2.9.