nix fmt; add aarch64 arch to flake
This commit is contained in:
parent
c6d745d25f
commit
b4a78bd726
16
flake.nix
16
flake.nix
|
@ -3,7 +3,6 @@
|
||||||
# either `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install`
|
# either `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install`
|
||||||
# or https://github.com/DeterminateSystems/nix-installer
|
# or https://github.com/DeterminateSystems/nix-installer
|
||||||
# and then `nix build` or `nix develop`
|
# and then `nix build` or `nix develop`
|
||||||
|
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
@ -16,12 +15,18 @@
|
||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
systems = [ "x86_64-linux" ];
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
imports = [
|
imports = [
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
];
|
];
|
||||||
perSystem = { config, self', pkgs, lib, system, ... }:
|
perSystem = {
|
||||||
let
|
config,
|
||||||
|
self',
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||||
nonRustDeps = [
|
nonRustDeps = [
|
||||||
pkgs.libiconv
|
pkgs.libiconv
|
||||||
|
@ -32,8 +37,7 @@
|
||||||
name = "rust-toolchain";
|
name = "rust-toolchain";
|
||||||
paths = [pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc];
|
paths = [pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc];
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# Rust package
|
# Rust package
|
||||||
packages.default = pkgs.rustPlatform.buildRustPackage {
|
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||||
inherit (cargoToml.package) name version;
|
inherit (cargoToml.package) name version;
|
||||||
|
|
Loading…
Reference in a new issue