mirror of
https://github.com/kaesaecracker/echse.git
synced 2025-02-22 08:57:09 +01:00
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{
|
|
description = "Flake for servicepoint-rustlings";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
naersk = {
|
|
url = "github:nix-community/naersk";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{
|
|
self,
|
|
nixpkgs,
|
|
naersk,
|
|
}:
|
|
let
|
|
lib = nixpkgs.lib;
|
|
supported-systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
];
|
|
forAllSystems = lib.genAttrs supported-systems;
|
|
in
|
|
rec {
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages."${system}";
|
|
in
|
|
{
|
|
default = pkgs.mkShell rec {
|
|
packages = [
|
|
(pkgs.symlinkJoin {
|
|
name = "rust-toolchain";
|
|
paths = with pkgs; [
|
|
rustc
|
|
cargo
|
|
rustPlatform.rustcSrc
|
|
rustfmt
|
|
clippy
|
|
cargo-expand
|
|
cargo-tarpaulin
|
|
rustlings
|
|
];
|
|
})
|
|
];
|
|
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath packages}";
|
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
RUST_BACKTRACE = "1";
|
|
};
|
|
}
|
|
);
|
|
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixfmt-rfc-style);
|
|
};
|
|
}
|