buildCrystalPackage: add copyShardDeps flag#289266
Conversation
3b00817 to
4eb527b
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3535 |
|
Thanks a lot for doing this - I haven't been able to afford the time for a proper review that this deserves, but will take a look in the near future. Please also note that we have a Google Summer of Code project idea related to crystal. |
|
Hi, guys. I want to fix all packages related to this change before the new NixOS 24.05 release. Can someone review this PR, please? |
|
@SuperSandro2000 could you review my PR please? |
4eb527b to
f2b185f
Compare
|
Please add the description to the commit message then 👍 |
What description should be added to the commit? |
|
Looks good, thanks @sund3RRR |
The pull request description, it's good to have it in the commit because github can at any moment remove PRs and has done so many times before. It's good for writing docs too https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/crystal.section.md |
Description of changes
Added the ability to copy dependencies declared in
shards.nixinstead of creating symbolic links to dependencies. By default, thecopyShardDepsflag is set tofalse, so this change should not break other packages in any way.This change will have an extremely positive effect on the packaging of crystal packages, since the state of crystal dependencies at the time of download is not final and may change for a number of things:
shards.ymlmay contain apostInstallscript that wants to write to the shard's directory (which will lead to build error, because all shards are in/nix/storeand they are read only)nix, because it generates bindings in its folder, so by creating a link togi-crystalin/nix/store, we actually prohibitgi-crystalfrom working and it becomes useless. I patched it and changed the logic of it, so it works at the moment, however, each new version ofgi-crystalbreaks packages which depends on it, since the version ofgi-crystalmust match the version fromshard.lockWith this change, the logic of
buildCrystalPackagedoes not change in any way, but an important setting is added, by adding just one flag, you can create an environment closer to the standard environment and simplify packaging.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.