Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在Github Actions中使用Nix包管理器 #7

Open
yoctocell opened this issue Nov 9, 2024 · 0 comments
Open

在Github Actions中使用Nix包管理器 #7

yoctocell opened this issue Nov 9, 2024 · 0 comments
Labels
enhancement New feature or request low-priority

Comments

@yoctocell
Copy link
Contributor

yoctocell commented Nov 9, 2024

Nix包管理器是一个函数式包管理器,其重要的优点之一是可以更好地保证软件环境的重现性。Github Actions也有一个安装Nix的包。不过现在还有几个问题

  • 要想用Nix来管理所有软件包的话,必须先给lark-oapi Python模板写一个Nix定义,最好是能够贡献到官方的Nixpkgs仓库。也有另外一种方案,Nix仅用于安装系统包,Python包仍然归Pip所管。我两种都尝试过,但是都遇到了一些问题。第二种方案的问题是导入python模块时遇到python找不到某些系统包。第一种方案的问题是lark-oapi所需要的protobuf模块版本较旧,必须是低于3.20才行,但是Nixpkgs在前几周刚把Protobuf 3.20的包给删除了。请见 because lark-oapi (1.3.0) depends on protobuf (>3,<4) larksuite/oapi-sdk-python#77protobuf3_20: remove NixOS/nixpkgs#334067

  • 第二个问题是Nixpkgs没有pdfsizeopt的包。不过这个问题不大,我们可以使用ghostscript来进行pdf文档的压缩,效果应该也没什么问题。

@rabbull rabbull added enhancement New feature or request low-priority labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority
Projects
None yet
Development

No branches or pull requests

2 participants