Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
54 lines (50 loc) · 1.7 KB
/
Copy pathflake.nix
File metadata and controls
54 lines (50 loc) · 1.7 KB
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
systems.url = "github:nix-systems/default";
flake-utils.url = "github:numtide/flake-utils";
devenv.url = "github:cachix/devenv";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, devenv, systems, flake-utils, fenix, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
channel = fenix.packages.${pkgs.system}.latest;
in {
packages = {
devenv-up = self.devShells.${system}.default.config.procfileScript;
};
devShells = {
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [{
# https://devenv.sh/reference/options/
packages = with pkgs;
# [ cargo-watch pkg-config cmake channel.rust-analyzer ]
[ cargo-expand cargo-watch pkg-config cmake ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [
libiconv
frameworks.Security
frameworks.CoreFoundation
frameworks.SystemConfiguration
]);
difftastic.enable = true;
languages.nix.enable = true;
# languages.rust = {
# enable = true;
# toolchain = channel.toolchain;
# };
}];
};
};
});
nixConfig = {
extra-trusted-public-keys =
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
}