brewery
notashelf /
56f15d749edc0a1db07b6438d031d82c65a20f46

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
flake.nixNix57 lines1.3 KB
1
{
2
  inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
3
4
  outputs = {nixpkgs, ...}: let
5
    systems = ["x86_64-linux" "aarch64-linux"];
6
    forAllSystems = nixpkgs.lib.genAttrs systems;
7
    pkgsFor = system: nixpkgs.legacyPackages.${system};
8
  in {
9
    devShells = forAllSystems (system: let
10
      pkgs = pkgsFor system;
11
    in {
12
      default = pkgs.mkShell {
13
        name = "nixir";
14
        buildInputs = with pkgs; [
15
          boost.dev
16
          libblake3.dev
17
18
          nixVersions.nixComponents_2_32.nix-store
19
          nixVersions.nixComponents_2_32.nix-expr
20
          nixVersions.nixComponents_2_32.nix-cmd
21
          nixVersions.nixComponents_2_32.nix-fetchers
22
          nixVersions.nixComponents_2_32.nix-main
23
          nixVersions.nixComponents_2_32.nix-util
24
          nixVersions.nix_2_32
25
        ];
26
27
        nativeBuildInputs = with pkgs; [
28
          cmake
29
          pkg-config
30
          ninja
31
          bear
32
          clang-tools
33
          just
34
          entr
35
        ];
36
37
        env.NIX_PLUGINABI = "0.2";
38
      };
39
    });
40
41
    formatter = forAllSystems (system: let
42
      pkgs = pkgsFor system;
43
    in
44
      pkgs.writeShellApplication {
45
        name = "nix3-fmt-wrapper";
46
47
        runtimeInputs = [
48
          pkgs.alejandra
49
          pkgs.fd
50
        ];
51
52
        text = ''
53
          fd "$@" -t f -e nix -x alejandra -q '{}'
54
        '';
55
      });
56
  };
57
}