summaryrefslogtreecommitdiff
path: root/nix/static.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/static.nix')
-rw-r--r--nix/static.nix46
1 files changed, 28 insertions, 18 deletions
diff --git a/nix/static.nix b/nix/static.nix
index c5e3c57..86a1cc3 100644
--- a/nix/static.nix
+++ b/nix/static.nix
@@ -3,33 +3,43 @@
fenix,
pkgsCross,
nixpkgs-tracker-bot,
-}: let
+}:
+let
crossPkgsFor = with pkgsCross; {
x86_64 = musl64.pkgsStatic;
aarch64 = aarch64-multiplatform;
};
- rustcTargetFor = lib.mapAttrs (lib.const (pkgs: pkgs.stdenv.hostPlatform.rust.rustcTarget)) crossPkgsFor;
- rustStdFor = lib.mapAttrs (lib.const (rustcTarget: fenix.targets.${rustcTarget}.stable.rust-std)) rustcTargetFor;
+ rustcTargetFor = lib.mapAttrs (lib.const (
+ pkgs: pkgs.stdenv.hostPlatform.rust.rustcTarget
+ )) crossPkgsFor;
+ rustStdFor = lib.mapAttrs (lib.const (
+ rustcTarget: fenix.targets.${rustcTarget}.stable.rust-std
+ )) rustcTargetFor;
- toolchain = with fenix;
+ toolchain =
+ with fenix;
combine (
- [stable.cargo stable.rustc]
+ [
+ stable.cargo
+ stable.rustc
+ ]
++ lib.attrValues rustStdFor
);
- crossPlatformFor =
- lib.mapAttrs (
- lib.const (pkgs:
- pkgs.makeRustPlatform (
- lib.genAttrs ["cargo" "rustc"] (lib.const toolchain)
- ))
+ crossPlatformFor = lib.mapAttrs (lib.const (
+ pkgs:
+ pkgs.makeRustPlatform (
+ lib.genAttrs [
+ "cargo"
+ "rustc"
+ ] (lib.const toolchain)
)
- crossPkgsFor;
+ )) crossPkgsFor;
in
- {arch}:
- nixpkgs-tracker-bot.override {
- rustPlatform = crossPlatformFor.${arch};
- inherit (crossPkgsFor.${arch}) openssl;
- optimizeSize = true;
- }
+{ arch }:
+nixpkgs-tracker-bot.override {
+ rustPlatform = crossPlatformFor.${arch};
+ inherit (crossPkgsFor.${arch}) openssl;
+ optimizeSize = true;
+}