Add a cargo feature named system which causes dependencies to use system versions of static libraries instead of compiling their own, which is particularly important to Nix (previously the Nix derivation would patch Cargo.toml to enable the corresponding libffi feature).
Separate the package derivation from the flake itself.
Properly clean source for the derivation, so changing files that are not used for building would not make Nix think everything needs to be rebuilt.
Remove rust-overlay dependency. It is great, but unnecessary here, as Uiua does not need bleeding-edge toolchain versions or specific components and targets. It would make sense to use it if the website was built with Nix as well.
Use flake-parts instead of flake-utils as it doesn't have design flaws flake-utils has and fits Nix better.
Remove input overrides from crane as crane doesn't have any inputs anymore.
Generally clean up Nix code, as there was some suspicious things like calling an ad hoc constructed function ((path: _type: ...) path type).
Build dependencies separately from the main derivation to improve incremental compilation.
This also revealed a couple of suspicious things like the tests depending on the website favicon and one of the tests actually trying to write some file, so I decided to disable it when building with Nix (format::generate_format_cfg_docs).
system
which causes dependencies to use system versions of static libraries instead of compiling their own, which is particularly important to Nix (previously the Nix derivation would patchCargo.toml
to enable the correspondinglibffi
feature).rust-overlay
dependency. It is great, but unnecessary here, as Uiua does not need bleeding-edge toolchain versions or specific components and targets. It would make sense to use it if the website was built with Nix as well.flake-parts
instead offlake-utils
as it doesn't have design flawsflake-utils
has and fits Nix better.crane
ascrane
doesn't have any inputs anymore.(path: _type: ...) path type
).This also revealed a couple of suspicious things like the tests depending on the website favicon and one of the tests actually trying to write some file, so I decided to disable it when building with Nix (
format::generate_format_cfg_docs
).