-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
74 lines (62 loc) · 1.92 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
65
66
67
68
69
70
71
72
73
74
{
description = "Helps you to identify outdated helm charts in your argocd instance.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane = {
url = "github:ipetkov/crane";
};
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
craneLib = (crane.mkLib pkgs);
argo-helm-updater = craneLib.buildPackage {
src = craneLib.cleanCargoSource (craneLib.path ./.);
doNotSign = true;
buildInputs = [
# Add additional build inputs here
pkgs.pkg-config
pkgs.libiconv
pkgs.openssl
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here
pkgs.darwin.apple_sdk.frameworks.Cocoa
pkgs.darwin.apple_sdk.frameworks.CoreGraphics
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.apple_sdk.frameworks.IOKit
pkgs.darwin.apple_sdk.frameworks.Kernel
pkgs.darwin.apple_sdk.frameworks.OpenGL
pkgs.darwin.apple_sdk.frameworks.Security
pkgs.libpng
pkgs.zlib
];
};
in {
checks = {
inherit argo-helm-updater;
};
packages.default = argo-helm-updater;
devShells.default = craneLib.devShell {
checks = self.checks.${system};
packages = with pkgs; [
cargo-audit
cargo-edit
cargo-watch
clippy
libiconv
];
};
}
);
}