-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
43 lines (38 loc) · 1.38 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
{
description = "cign - the tool that checks if you can go now";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/release-23.05;
rust-overlay.url = github:oxalica/rust-overlay;
flake-utils.url = github:numtide/flake-utils;
cargo2nix.url = github:cargo2nix/cargo2nix;
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, cargo2nix }:
flake-utils.lib.eachDefaultSystem (
system:
let
lib = (import nixpkgs { inherit system; }).lib;
pkgs = import nixpkgs {
overlays = [cargo2nix.overlays.default rust-overlay.overlays.default];
inherit system;
};
rustChannel = "1.71.0";
rustPkgs = pkgs.rustBuilder.makePackageSet {
inherit rustChannel;
packageFun = import ./Cargo.nix;
packageOverrides = pkgs: pkgs.rustBuilder.overrides.all;
};
in
rec {
devShell = pkgs.mkShell {
buildInputs = [
cargo2nix.packages.${system}.cargo2nix
pkgs.rust-bin.stable."${rustChannel}".default
];
nativeBuildInputs = with pkgs; [openssl pkg-config];
};
packages.cign = (rustPkgs.workspace.cign {}).bin;
defaultPackage = packages.cign;
defaultApp = { type = "app"; program = "${defaultPackage}/bin/cign"; };
}
);
}