styx-static / styx

Static site generator in Nix expression language.
https://styx-static.github.io/styx-site/
MIT License
206 stars 25 forks source link

Building the site - cp: cannot stat '/nix/store/...-styx-site/*': No such file or directory #73

Open emmanuelrosa opened 2 years ago

emmanuelrosa commented 2 years ago

I was able to initialize a new site, but it doesn't build:

❯ styx new site styx-test
Styx site initialized in '/home/emmanuel/projects/styx-test'.

~/projects
❯ cd styx-test/

~/projects/styx-test
❯ find .
.
./themes
./data
./conf.nix
./readme.md
./site.nix

~/projects/styx-test
❯ styx build
Building the site...
cp: cannot stat '/nix/store/57k8c38r4nys0caanssrfzc3z8dqfchf-styx-site/*': No such file or directory
chmod: cannot access '/home/emmanuel/projects/styx-test/public/*': No such file or directory
Generated site in '/home/emmanuel/projects/styx-test/public'

Package info:

❯ nixos-version
22.11.20220913.9608ace (Raccoon)

❯ styx -v
styx 0.7.5

❯ which styx
/nix/store/0avka5xgwzflzz970v39m13ij5yv8mfi-styx-0.7.5/bin/styx

❯ nix-store -q -R /nix/store/0avka5xgwzflzz970v39m13ij5yv8mfi-styx-0.7.5/bin/styx

/nix/store/i1dc1ac2hxjfl59rvsj49vvgvl1nl16s-libunistring-0.9.10
/nix/store/dzyimsdk9yq7x6g24r79ipg3vbalyyy1-libidn2-2.3.1
/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46
/nix/store/a4yw1svqqk4d8lhwinn9xp847zz9gfma-bash-4.4-p23
/nix/store/7xp1yxk8d67ik4rfcbxxjrfv6fnch0p5-iana-etc-20210225
/nix/store/bjxkrk1pd65z5gz5y62jyqdsjkicvvck-tzdata-2020f
/nix/store/rya2s79k5ncqbas09rwhq43lrbr4s3m0-mailcap-2.1.52
/nix/store/i2akhmw1lsir9ifwp9s1l75i01rq6jd4-caddy-2.4.1
/nix/store/0d71ygfwbmy1xjlbj1v027dfmy9cqavy-libffi-3.3
/nix/store/0dbbrvlw2rahvzi69bmpqy1z9mvzg62s-gdbm-1.19
/nix/store/65ys3k6gn2s27apky0a0la7wryg3az9q-zlib-1.2.11
/nix/store/5k0s057y3swq5cqp58m8p4drq06nfd6w-sqlite-3.35.2
/nix/store/5ymjz97754jc6alp50cq1i3iv0jbg8b2-bzip2-1.0.6.0.2
/nix/store/6kgfmzx90c1a6afqnbkz6qprkzss476k-mime-types-9
/nix/store/9m4hy7cy70w6v2rqjmhvd7ympqkj6yxk-ncurses-6.2
/nix/store/hbm0951q7xrl4qd0ccradp6bhjayfi4b-openssl-1.1.1k
/nix/store/hjwjf3bj86gswmxva9k40nqx6jrb5qvl-readline-6.3p08
/nix/store/nlqz3916vfh4fqwbnky1l5bf02n876y5-expat-2.2.10
/nix/store/rdslqn6gj1a27laa1xcn0hm147v5an7z-xz-5.2.5
/nix/store/66fbv9mmx1j4hrn9y06kcp73c3yb196r-python3-3.8.9
/nix/store/0rkhxj514glfsw0pq4f6gs2hf0sv78fc-python3.8-pycparser-2.20
/nix/store/14sil57w425v7ncx8jk9rwb1zz7ix204-python3.8-six-1.15.0
/nix/store/h76jgmxwn8g71vgjazhjc8qp4m5ajfnn-python3.8-pysocks-1.7.1
/nix/store/54klr10i53jdfgn7322mzgza6wsai0q8-gcc-10.3.0-lib
/nix/store/si85cpsjazbrznhc21y56da93m7sjyqh-python3.8-brotli-1.0.9
/nix/store/29q9gwhgpivn92mjzfh8dl4fsmh7dqs7-python3.8-urllib3-1.26.4
/nix/store/d4rk81y5mshdsb5hlg8xpglpkq6b8hmf-python3.8-chardet-4.0.0
/nix/store/h0n269h9jqv96h1ppahgvh0a0zjkqk6n-python3.8-idna-3.1
/nix/store/iig5c4axg6jr8ir5r05d2ckwh7p1q639-python3.8-certifi-2020.12.5
/nix/store/2yz4jdmfy0zbf38yll9z6j62a0ciyim9-python3.8-requests-2.25.1
/nix/store/l5b78hd76zv9v05wx59kvwi3bsx5xjxh-python3.8-toml-0.10.2
/nix/store/jah1581p7d7rbxpanm2c5c168k0422qp-python3.8-more-itertools-8.7.0
/nix/store/qmni68hx7x85qp17fpjzm9jswz0npsjb-python3.8-zipp-3.4.1
/nix/store/3jl0jdmqfdsq3yqf16dyn5sa9wyrz494-python3.8-importlib-metadata-3.7.3
/nix/store/47pyn8j37kfq0ish225fgyqpqdd42qb4-python3.8-pyxdg-0.27
/nix/store/7kzd227dkvnar1shl184z3jqlww57ms1-python3.8-pyasn1-0.4.8
/nix/store/7mrx1yns6ph1d7bhcpcn15s8krdk85yh-python3.8-dnspython-2.1.0
/nix/store/ad2jqwgpsh8wjrjcqqy5ql36swk5g54r-python3.8-setuptools-54.2.0
/nix/store/in56aacdgd934jkgx5wznlf6hhnniavv-python3.8-wcwidth-0.2.5
/nix/store/85ng7v5q7xvfmcmknjgz2z85s73q2q2k-python3.8-prettytable-2.1.0
/nix/store/b3scw5hv2rl4ann88bv5nc7nix3sy84s-python3.8-ptyprocess-0.7.0
/nix/store/9zjb8qr75igh70cc8qx8pwl30biflqzg-python3.8-pexpect-4.8.0
/nix/store/f1zf83knxdi13cg0ip0w3ja00v90945i-python3.8-pyopenssl-20.0.1
/nix/store/gx16ri2ri7j32z6h1d1kzgl0nfra4k7i-python3.8-cffi-1.14.5
/nix/store/rnlqx41iwcp8b64mrmn9sxzdvsnv6wi2-python3.8-pyparsing-2.4.7
/nix/store/hwx28x18d5fm12p4fidz4sm1pmi2f940-python3.8-packaging-20.9
/nix/store/krj5b85hqiqxi4fj20mwflw4s9b58w2l-python3.8-dicttoxml-1.7.4
/nix/store/4631pbxnm6qlyvvwsqwsdxbz9i2v3ywr-python3.8-cffi-1.14.5-dev
/nix/store/p5gay29j4gpq9j20fsipaa3csgbvbkd2-python3.8-cryptography-3.4.7
/nix/store/vb4jd0ia1blprg5045lhxfl3h0g2j4b5-python3.8-cryptography-3.4.7-dev
/nix/store/m72nvn8fbwbvf7g2m070yzffb29bmklm-python3.8-pyopenssl-20.0.1-dev
/nix/store/pylsxlwlcq07ky0g703cas5zi8sihw6w-python3.8-soupsieve-2.2.1
/nix/store/qsvnpc7k0a66pxysz04midgfyaixbhq7-python3.8-beautifulsoup4-4.9.3
/nix/store/r1ysqa0q0npdphc331clh039yj8j7f0r-python3.8-configargparse-1.4
/nix/store/vnmqj63hfxja0dv6qf0pvbyzqk4nhlk4-python3.8-requests-toolbelt-0.9.1
/nix/store/y0zwizab8l0jmhfqlq0ks4ix23n17j8m-python3.8-argcomplete-1.12.2
/nix/store/kihjkfag3sxd70qck23fi43ykvwsr2kk-linkchecker-10.0.0
/nix/store/s2pfcn3i3brplqk00hk3k6ppda122iyp-source
/nix/store/x31rw8cmx6vzzmwaa94wnjz6p4nbxy6j-b3l8vckgdraw89k1a44fahk834pmmyvv-source
/nix/store/0avka5xgwzflzz970v39m13ij5yv8mfi-styx-0.7.5
blaggacao commented 1 year ago

Can you check again from master? There have been merged a couple of fix-PRs lately.

emmanuelrosa commented 1 year ago

I checked again, but it produces a different error:

❯ nix run github:styx-static/styx -- new site styx-test
wrote: /home/emmanuel/projects/styx-test/conf.nix
wrote: /home/emmanuel/projects/styx-test/data/.gitkeep
wrote: /home/emmanuel/projects/styx-test/data
wrote: /home/emmanuel/projects/styx-test/readme.md
wrote: /home/emmanuel/projects/styx-test/site.nix
wrote: /home/emmanuel/projects/styx-test/themes/.gitkeep
wrote: /home/emmanuel/projects/styx-test/themes
Styx site initialized in '/home/emmanuel/projects/styx-test'.

~/projects took 19s
❯ cd styx-test/

~/projects/styx-test
❯ nix run github:styx-static/styx -- build
Building the site...
error: opening file '/home/emmanuel/projects/styx-test/flake.lock': No such file or directory
(use '--show-trace' to show detailed location information)
---
Error: Site could not been built, fix the errors and run the command again.
The '--show-trace' flag can be used to show debug information.

It looks like it's expecting the site to be a flake.

blaggacao commented 1 year ago

There seems to be a side-condition which makes tests succeed: https://github.com/styx-static/styx/blob/master/src/_automation/tests.nix#L44-L55