diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42b8112..f036239 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - preset: [static, ipv6_static] + preset: [static, ipv6_static, verify_msrv_static] arch: [x86_64, aarch64] runs-on: ubuntu-latest diff --git a/flake.nix b/flake.nix index f09c37b..003ef4e 100644 --- a/flake.nix +++ b/flake.nix @@ -54,7 +54,11 @@ overlays = [ rust-overlay.overlays.default ]; }; - defaultPackage = defaultPackage' pkgs; + defaultPackage = defaultPackage' ( + (import nixpkgs) { + inherit system; + } + ); crossPackage = { ... }@args: crossPackage' ({ inherit pkgs; } // args); in { @@ -67,6 +71,17 @@ default = defaultPackage; ipv6 = defaultPackage; + verify_msrv_static-x86_64-unknown-linux-musl = crossPackage { + crossPkgs = pkgs.pkgsCross.musl64; + enableStatic = true; + rustVersion = "1.80.0"; + }; + verify_msrv_static-aarch64-unknown-linux-musl = crossPackage { + crossPkgs = pkgs.pkgsCross.aarch64-multiplatform-musl; + enableStatic = true; + rustVersion = "1.80.0"; + }; + static-x86_64-unknown-linux-musl = crossPackage { crossPkgs = pkgs.pkgsCross.musl64; enableStatic = true; diff --git a/nix/cross-package.nix b/nix/cross-package.nix index 9e9004e..fcfe10a 100644 --- a/nix/cross-package.nix +++ b/nix/cross-package.nix @@ -5,13 +5,14 @@ targetTriple ? crossPkgs.hostPlatform.config, enableStatic ? false, enableIpv6 ? false, + rustVersion ? "latest" }: let inherit (pkgs) lib system; targetUnderscore = lib.replaceStrings [ "-" ] [ "_" ] targetTriple; targetUnderscoreUpper = lib.toUpper targetUnderscore; - toolchain = pkgs.rust-bin.stable.latest.minimal.override { + toolchain = pkgs.rust-bin.stable.${rustVersion}.minimal.override { targets = [ targetTriple ]; };