nixos:派生自github提取,保留.git

时间:2019-01-28 08:18:15

标签: github nix nixos

我正在尝试构建一个从github提取的衍生产品(用于keyboardio固件),但是将.git目录保留在原处(因为make系统正在查找它)。

我已经尝试过表达式中的fetchFromGitHub函数,但是leaveDotGit陷入fetchzip的状态,然后抱怨它不知道如何处理它。

我尝试将nix-prefetch-github可执行文件与--leave-dotGit一起使用,但是尽管在cmdline上运行良好,但是当作为builder.sh的一部分被调用时,它会崩溃,并出现以下错误。

Traceback (most recent call last):
  File "/nix/store/3jqkkq639rs8yi9rrl1cg9j5ii0kx3x7-nix-prefetch-github-1.3/bin/.nix-prefetch-github-wrapped", line 12, in <module>
    sys.exit(_main())
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/core.py", line 676, in main
    _verify_python3_env()
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Consult http://click.pocoo.org/python3/for mitigation steps.
Traceback (most recent call last):
  File "/nix/store/3jqkkq639rs8yi9rrl1cg9j5ii0kx3x7-nix-prefetch-github-1.3/bin/.nix-prefetch-github-wrapped", line 12, in <module>
    sys.exit(_main())
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/core.py", line 676, in main
    _verify_python3_env()
  File "/nix/store/7v2xsnl1svflfqm73hnbbmhmm4mvwi0s-python3.6-click-6.7/lib/python3.6/site-packages/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Consult http://click.pocoo.org/python3/for mitigation steps.

如何实现这一目标?

谢谢

0 个答案:

没有答案