ci(nix): add archive packages and overhaul CI workflows

This commit is contained in:
2026-05-04 09:50:50 +02:00
parent 6a702ec205
commit 8142aee605
8 changed files with 202 additions and 195 deletions
+27
View File
@@ -0,0 +1,27 @@
{
target,
pkgs,
}: let
cargoToml = fromTOML (builtins.readFile ../Cargo.toml);
name = cargoToml.package.name;
version = cargoToml.package.version;
buildArgs = {
pname = name;
inherit version;
src = pkgs.lib.cleanSource ../.;
cargoLock.lockFile = ../Cargo.lock;
useNextest = true;
meta = {
inherit (cargoToml.package) description homepage;
};
postBuild = "${pkgs.upx}/bin/upx target/*/release/${name}${target.exeSuffix}";
};
rustVersion = pkgs.rust-bin.stable.latest.default.override {
targets = [target.triple];
};
rustPlatform = target.crossPkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
};
in
rustPlatform.buildRustPackage buildArgs