DEVELOPMENT ENVIRONMENT

~liljamo/gandalf

ref: 17ace9336bdbb5bc86438d7c4b5ff62028c31e1f gandalf/flake.nix -rw-r--r-- 928 bytes
17ace933Jonni Liljamo just keep force pushing this lol 7 months ago
                                                                                
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
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
  };

  outputs = { self, nixpkgs, rust-overlay, ... }:
  let
    rustVersion = "1.76.0";

    systems = [ "x86_64-linux" ];

    overlays = [ (import rust-overlay) ];
    forAllSystems = function:
      nixpkgs.lib.genAttrs systems (system:
        function (import nixpkgs {
          inherit system overlays;
        }));
  in
  {
    devShells = forAllSystems (pkgs: {
      default = pkgs.mkShell {
        buildInputs = with pkgs; [
          rust-bin.stable.${rustVersion}.default
          rust-analyzer

          mold

          cmake
          pkg-config
          fontconfig
        ];

        LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
          wayland
          libxkbcommon

          vulkan-loader

          fontconfig
          freetype
        ];
      };
    });
  };
}