brewery
notashelf /
4ea090cf330d87b264b6d554a8307347c46f7e56

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
flake.nixNix55 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
        ];
34
35
        env.NIX_PLUGINABI = "0.2";
36
      };
37
    });
38
39
    formatter = forAllSystems (system: let
40
      pkgs = pkgsFor system;
41
    in
42
      pkgs.writeShellApplication {
43
        name = "nix3-fmt-wrapper";
44
45
        runtimeInputs = [
46
          pkgs.alejandra
47
          pkgs.fd
48
        ];
49
50
        text = ''
51
          fd "$@" -t f -e nix -x alejandra -q '{}'
52
        '';
53
      });
54
  };
55
}