I make a myflake.tar.xz
from the flake directory myflake
and run the flake tarball like this. (I repeat this step a lot of times successfully and it suddenly break.)
$ nix run -vvvvv file://$(readlink -f myflake.tar.xz )
evaluating file '<nix/derivation-internal.nix>'
using cache entry '{"_what":"tarballCache","url":"file://home/user/testing/tarball/myflake.tar.xz"}' -> '{"etag":"","lastModified":172328120,"treeHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}'
using cache entry '{"_what":"treeHashToNarHash","treeHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' -> '{"narHash":"sha256-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}'
source path 'Β«file://home/user/testing/tarball/myflake.tar.xzΒ»/' is uncacheable
copying 'Β«file://home/user/testing/tarball/myflake.tar.xzΒ»/' to the store...
performing daemon worker op: 7
acquiring write lock on '/nix/var/nix/temproots/288425'
performing daemon worker op: 26
got tree '/nix/store/cccccccccccccccccccccccccccccccc-source' from 'file://home/user/testing/tarball/myflake.tar.xz?narHash=sha256-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
error: path '/nix/store/cccccccccccccccccccccccccccccccc-source/flake.nix' does not exist
The directory structure of myflake.tar.xz
it like this
myflake
βββ config
β βββ file1
β βββ dir1
β βββ ...
β βββ ...
βββ flake.lock
βββ flake.nix
but the file structure of /nix/store/cccccccccccccccccccccccccccccccc-source
is like this :
config
βββ file1
βββ dir1
βββ ...
βββ...
I may make things wrong before once, in the tar -cf
process not including the flake.nix, and ran the nix run
command.
But now I checked the tarball with tar -tf
, now it definitely contains the flake.nix.
But the error message never goes away. I do not know why.
I tried delete the path with nix store delete /nix/store/cccccccccccccccccccccccccccccccc-source
but failed.
Thanks for your help!