-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
73 lines (68 loc) · 2.01 KB
/
Copy pathflake.nix
File metadata and controls
73 lines (68 loc) · 2.01 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
description = "rocas - file watcher and organizer";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
fenix.url = "github:nix-community/fenix";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
fenix,
...
}@inputs:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
crane = inputs.crane.mkLib pkgs;
toolchain =
with fenix.packages.${system};
combine [
stable.rustc
stable.rust-src
stable.cargo
complete.rustfmt
stable.clippy
stable.rust-analyzer
];
craneLib = crane.overrideToolchain toolchain;
rocas = import ./nix/package.nix { inherit pkgs craneLib; };
in
{
packages.default = rocas;
apps.default = flake-utils.lib.mkApp { drv = rocas; };
checks.default = rocas;
devShells.default = craneLib.devShell {
packages = with pkgs; [
toolchain
openssl
pkg-config
cargo-release
git-cliff
imagemagick
];
env = {
LAZYVIM_RUST_DIAGNOSTICS = "bacon-ls";
# NEOVIM_RUST_TARGET = "x86_64-pc-windows-gnu";
OPENSSL_DIR = "${pkgs.openssl.dev}";
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
LD_LIBRARY_PATH = "${pkgs.openssl.out}/lib";
};
};
}
)
// {
nixosModules.default = import ./nix/modules/nixos.nix { inherit self; };
homeManagerModules.default = import ./nix/modules/home-manager.nix { inherit self; };
};
}