{
description = "íqán";
inputs = {
nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
fenix,
}:
let
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
eachSystem = nixpkgs.lib.genAttrs systems;
in
{
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt);
packages = eachSystem (
system:
let
toolchain = fenix.packages.${system}.stable.minimalToolchain;
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
default = iqan;
iqan =
(pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
}).buildRustPackage
{
pname = "iqan";
version = "0.3.4";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
}
);
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
name = "iqan";
packages = [
(fenix.packages.${system}.stable.withComponents [
"cargo"
"rustc"
"rust-analyzer"
"clippy"
"rustfmt"
"rust-src"
])
pkgs.cargo-nextest
];
};
}
);
};
}