blob: 61486ead2940563b7b70e38a7a8a40a7eabd3915 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = { nixpkgs, ... }:
let
# Taken from lib.systems.doubles.all
systems = [ "x86_64-linux" "aarch64-linux" ];
inherit (nixpkgs) lib;
forAllSystems = config:
lib.foldl
lib.recursiveUpdate
{}
(builtins.map
(system:
builtins.mapAttrs
(_: value: { ${system} = value; })
(config (import nixpkgs { inherit system; })))
systems);
in forAllSystems (pkgs: {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
rust-analyzer
];
shellHook = ''
SHELL="${pkgs.bash}/bin/bash"
'';
};
});
}
|