Files
jj-cz/nix/make-binary.nix
T
phundrak d2c48605aa
Run checks and build archives / coverage-and-sonar (push) Successful in 9m7s
Run checks and build archives / build (linux-aarch64) (push) Successful in 7m3s
Run checks and build archives / build (windows-x86_64) (push) Successful in 8m16s
Run checks and build archives / build (linux-x86_64) (push) Successful in 10m8s
chore(nix): update cargo hash value for Nix flake
2026-06-19 13:13:34 +02:00

29 lines
801 B
Nix

{
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;
cargoHash = "sha256-pAAp3bq4zZwRYC5v7wX56KbBgA1q2C/Td5jX2ge+VpY=";
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