-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
53 lines (42 loc) · 1.52 KB
/
flake.nix
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
naersk.url = "github:nix-community/naersk";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, flake-utils, ... }@inputs:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
overlay-unstable = final: prev: {
unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
};
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
overlay-unstable
];
};
naersk' = pkgs.callPackage inputs.naersk {};
fhs = pkgs.buildFHSUserEnv {
name = "wincompatlib-dev";
targetPkgs = pkgs: with pkgs; [
pkgs.unstable.rustup
pkgs.unstable.rustfmt
pkgs.unstable.clippy
gcc
cmake
pkg-config
# Needed for fonts installation
cabextract
self.defaultPackage
];
};
in {
defaultPackage = naersk'.buildPackage {
src = ./.;
};
devShells.default = fhs.env;
}
);
}