-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
45 lines (43 loc) · 1.12 KB
/
flake.nix
File metadata and controls
45 lines (43 loc) · 1.12 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
notecli = pkgs.rustPlatform.buildRustPackage {
pname = "notecli";
version = "0.1.0";
src = ./.;
cargoHash = "sha256-8nNtS9QVLxYPWx75oSvvy+7VYYq8e+B/abIbB5qF7Gc=";
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs =
with pkgs;
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
buildNoDefaultFeatures = true;
};
in
{
packages.default = notecli;
devShells.default = pkgs.mkShell {
inputsFrom = [ notecli ];
packages = with pkgs; [
rust-analyzer
clippy
];
};
}
);
}