diff options
Diffstat (limited to 'nix/static.nix')
| -rw-r--r-- | nix/static.nix | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/nix/static.nix b/nix/static.nix index 86a1cc3..8def285 100644 --- a/nix/static.nix +++ b/nix/static.nix @@ -1,45 +1,16 @@ -{ - lib, - fenix, - pkgsCross, - nixpkgs-tracker-bot, -}: +{ pkgsCross }: 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; - - toolchain = - with fenix; - combine ( - [ - stable.cargo - stable.rustc - ] - ++ lib.attrValues rustStdFor - ); - - crossPlatformFor = lib.mapAttrs (lib.const ( - pkgs: - pkgs.makeRustPlatform ( - lib.genAttrs [ - "cargo" - "rustc" - ] (lib.const toolchain) - ) - )) crossPkgsFor; in { arch }: -nixpkgs-tracker-bot.override { - rustPlatform = crossPlatformFor.${arch}; - inherit (crossPkgsFor.${arch}) openssl; - optimizeSize = true; -} +let + crossPkgs = crossPkgsFor.${arch}; +in +(crossPkgs.callPackage ./package.nix { optimizeSize = true; }).overrideAttrs (old: { + passthru = old.passthru or { } // { + inherit crossPkgs; + }; +}) |
