added alias-to-sieve to this repository

This commit is contained in:
Dennis Frieberg 2025-03-26 22:21:09 +01:00
parent 8f5e96de04
commit cf44fc494d
Signed by: nerf
SSH key fingerprint: SHA256:zvrU0EwwaNK65M+AqL9IOTRawFq0JZ8QXBASxxGpxmg
11 changed files with 2078 additions and 63 deletions

29
packages/flake-module.nix Normal file
View file

@ -0,0 +1,29 @@
{inputs, ...}: {
perSystem = {
pkgs,
system,
self',
...
}: {
# We build the alias to sieve tool here, this is a two step process, we first generate
# a nix expression with the crate2nix tool from nixpkgs that directly calls rustc
# and thus bypasses cargo. We could also generate this file by hand and version it,
# but that would need regeneration every time some dependency is updated, so we
# opt for build time generation. Afterwards we import and evaluate the generated
# nix expression to build the package. For the explicit solution see:
# https://nix-community.github.io/crate2nix/00_guides/30_generating/
# and for the documentation to this one
# https://nix-community.github.io/crate2nix/00_guides/31_auto_generating/
# as this module uses idf and forces builds during the evaluation it might
# have drastic performance implications, see
# https://nix.dev/manual/nix/2.24/language/import-from-derivation
packages.alias-to-sieve = let
alias-to-sieve-nix = inputs.crate2nix.tools.${system}.generatedCargoNix {
name = "alias-to-sieve";
src = ./alias_to_sieve;
};
in
(pkgs.callPackage alias-to-sieve-nix {}).rootCrate.build;
checks.alias-to-sieve = self'.packages.alias-to-sieve.override {runTests = true;};
};
}