Hi, I have met Nix yesterday so I am very new of Nix.
I would like to fork a Github repository which uses Nix: GitHub - hmemcpy/milewski-ctfp-pdf: Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
The steps that I did:
- Clone the repository.
$ git clone https://github.com/hmemcpy/milewski-ctfp-pdf.git $ cd milewski-ctfp-pdf/
- Run nixos/nix:latest docker with volume mapping of cloned repository:
$ docker run -it --rm -v ./:/workspace nixos/nix:latest
- Build following README.md of the repository
Then it works fine.$ nix --experimental-features 'nix-command flakes' flake show $ nix --experimental-features 'nix-command flakes' build .#ctfp-scala warning: Git tree '/workspace' is dirty warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
- For forking the repository, I remove
.git
directory and re-initiate for my private git repository.# Out of the docker container, because the docker does not have git command $ rm -rf .git $ git init $ git add . $ git commit -m "Ready to improve the document."
- Then I’ve tried to build it fails.
The error logs are as following:$ nix --experimental-features 'nix-command flakes' build .#ctfp-scala
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled error: builder for '/nix/store/5fvh085zdfkgq5b9zkx9b5pf1r43i4yc-ctfp-print-scala.drv' failed with exit code 12; last 10 log lines: > Latexmk: Missing input file 'fig/icons/cc.pdf' (or dependence on it) from following: > LaTeX Warning: File `fig/icons/cc.pdf' not found on input line 48. > Latexmk: Log file says output to 'ctfp.xdv' > Latexmk: Errors, so I did not complete making targets > Collected error summary (may duplicate other messages): > xelatex: Command for 'xelatex' gave return code 1 > Refer to 'ctfp.log' and/or above output for details > > Latexmk: If appropriate, the -f option can be used to get latexmk > to try to force complete processing. For full logs, run 'nix log /nix/store/5fvh085zdfkgq5b9zkx9b5pf1r43i4yc-ctfp-print-scala.drv'.
- If I remove the
.git
folder, then it works fine.$ rm -rf .git $ nix --experimental-features 'nix-command flakes' build .#ctfp-scala warning: Git tree '/workspace' is dirty warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
I did the above steps on Mac Pro M2.
Would anybody show me the workaround?
Thank you.