File: flake.nix

package info (click to toggle)
rust-xkb 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 516 kB
  • sloc: makefile: 4
file content (29 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (2)
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
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    utils.url = "github:numtide/flake-utils";
    fenix = {
      url = "github:nix-community/fenix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, utils, nixpkgs, fenix, }: utils.lib.eachDefaultSystem (system: let 
    pkgs = nixpkgs.legacyPackages.${system};
    rust = fenix.packages.${system};
    lib = pkgs.lib;
  in {
    devShell = pkgs.mkShell {
      buildInputs = with pkgs; with llvmPackages; with python37Packages; [
        # For building.
        clang rust.latest.toolchain pkg-config openssl libsodium libclang.lib
        libxkbcommon xorg.libxcb
      ];

      LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
      RUST_BACKTRACE = 1;
      # RUST_LOG = "info,sqlx::query=warn";
      RUSTFLAGS = "-C target-cpu=native";
    };
  });
}