Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia9c1e9b0a8cd9c6d834f153609baa5426a6a6964
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
|
|
|
outputs = {nixpkgs, ...}: let
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
|
in {
|
|
devShells = forAllSystems (system: let
|
|
pkgs = pkgsFor system;
|
|
in {
|
|
default = pkgs.mkShell {
|
|
name = "nixir";
|
|
buildInputs = with pkgs; [
|
|
boost.dev
|
|
libblake3.dev
|
|
|
|
nixVersions.nixComponents_2_32.nix-store
|
|
nixVersions.nixComponents_2_32.nix-expr
|
|
nixVersions.nixComponents_2_32.nix-cmd
|
|
nixVersions.nixComponents_2_32.nix-fetchers
|
|
nixVersions.nixComponents_2_32.nix-main
|
|
nixVersions.nixComponents_2_32.nix-util
|
|
nixVersions.nix_2_32
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
cmake
|
|
pkg-config
|
|
ninja
|
|
bear
|
|
clang-tools
|
|
];
|
|
|
|
env.NIX_PLUGINABI = "0.2";
|
|
};
|
|
});
|
|
|
|
formatter = forAllSystems (system: let
|
|
pkgs = pkgsFor system;
|
|
in
|
|
pkgs.writeShellApplication {
|
|
name = "nix3-fmt-wrapper";
|
|
|
|
runtimeInputs = [
|
|
pkgs.alejandra
|
|
pkgs.fd
|
|
];
|
|
|
|
text = ''
|
|
fd "$@" -t f -e nix -x alejandra -q '{}'
|
|
'';
|
|
});
|
|
};
|
|
}
|