summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 470854b916da57923e4aac8d0df070b98c5b3e7a (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  description = "A dev environment for Arti";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      nixpkgs,
      flake-utils,
      ...
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs { inherit system; };
      in
      {
        devShells.default = pkgs.mkShell {
          buildInputs = [
            pkgs.rustup

            pkgs.pkg-config
            pkgs.openssl
            pkgs.sqlite
            pkgs.git

            pkgs.docker
            pkgs.grcov

            pkgs.cargo-audit
            pkgs.cargo-fuzz
            pkgs.cargo-license
            pkgs.cargo-sort

            pkgs.python3Packages.lxml
            pkgs.python3Packages.toml
            pkgs.python3Packages.beautifulsoup4

            pkgs.shellcheck

            pkgs.perl

            pkgs.llvmPackages.clang
          ];

          LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
          RUSTUP_TOOLCHAIN="1.86";

          shellHook = ''
            echo "⚠️ The Nix Development Shell is maintained by the community ⚠️"
            echo ""
            echo "We include it here for convenience but the core team lacks the capacity to maintain it themselves."
            echo ""
            echo "Therefore things may break in the future and stability is not guaranteed."
            echo "Patches are more than welcome though! ❤️"
          '';
        };
      }
    );
}