-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
63 lines (61 loc) · 1.57 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
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
nixConfig = {
extra-substituters = ["https://attic.internal.moonvision.io/moonvision-foss"];
extra-trusted-public-keys = ["moonvision-foss:9nKTaMgGQ1M1+CYCftDNWQD39fESVxcp9o8GwRf1B3M="];
};
outputs = {
self,
nixpkgs,
utils,
naersk,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
naersk-lib = pkgs.callPackage naersk {};
apple-sdk = pkgs.lib.optionals pkgs.stdenv.isDarwin (
with pkgs.darwin.apple_sdk.frameworks; [
AppKit
CoreFoundation
CoreServices
Foundation
Security
SystemConfiguration
]
);
in {
defaultPackage = self.packages.${system}.jira-tools;
packages = {
default = self.packages.${system}.jira-tools;
jira-tools = naersk-lib.buildPackage {
src = ./.;
buildInputs = with pkgs;
[
openssl
pkg-config
]
++ apple-sdk;
};
};
devShell = with pkgs;
mkShell {
buildInputs =
[
cargo
libiconv
openssl
rustc
rustfmt
pre-commit
rustPackages.clippy
]
++ apple-sdk;
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
formatter = pkgs.alejandra;
});
}