-
Notifications
You must be signed in to change notification settings - Fork 9
/
flake.nix
64 lines (53 loc) · 1.44 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
54
55
56
57
58
59
60
61
62
63
64
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nix-github-actions = {
url = "github:nix-community/nix-github-actions";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-flake = {
url = "github:juspay/rust-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, ... }:
let
inherit (inputs.nixpkgs) lib;
inherit (inputs) self;
in
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.rust-flake.flakeModules.default
inputs.rust-flake.flakeModules.nixpkgs
];
systems = lib.systems.flakeExposed;
flake.githubActions = inputs.nix-github-actions.lib.mkGithubMatrix {
checks = lib.getAttrs [ "x86_64-linux" ] self.checks;
};
perSystem = { self', config, pkgs, ... }: {
packages.default = self'.packages.rsget;
rust-project.crates.rsget.crane.args = {
buildInputs = with pkgs; [
pkg-config
openssl
];
};
devShells.default = pkgs.mkShell {
inputsFrom = [
self'.packages.rsget
];
packages = with pkgs; [
cargo
rustc
rustfmt
clippy
rust-analyzer
];
};
};
};
}