style(nix): alejandra -> nixfmt-rfc-style

This commit is contained in:
seth 2024-08-06 23:26:02 -04:00 committed by Sefa Eyeoglu
parent bdb2ef7c4c
commit 068da95e36
4 changed files with 127 additions and 106 deletions

View file

@ -3,7 +3,9 @@
refraction,
rust-overlay,
pkgsCross,
}: {arch}: let
}:
{ arch }:
let
targets = with pkgsCross; {
x86_64 = musl64.pkgsStatic;
aarch64 = aarch64-multiplatform.pkgsStatic;
@ -11,17 +13,21 @@
getRustcTarget = pkgs: pkgs.stdenv.hostPlatform.rust.rustcTarget;
toolchain = rust-overlay.rust.minimal.override {
extensions = ["rust-std"];
extensions = [ "rust-std" ];
targets = lib.mapAttrsToList (lib.const getRustcTarget) targets;
};
mkRustPlatformWith = pkgs:
mkRustPlatformWith =
pkgs:
pkgs.makeRustPlatform (
lib.genAttrs ["cargo" "rustc"] (lib.const toolchain)
lib.genAttrs [
"cargo"
"rustc"
] (lib.const toolchain)
);
rustPlatforms = lib.mapAttrs (lib.const mkRustPlatformWith) targets;
in
refraction.override {
rustPlatform = rustPlatforms.${arch};
optimizeSize = true;
}
refraction.override {
rustPlatform = rustPlatforms.${arch};
optimizeSize = true;
}