|
1 | 1 | { sources ? import ./nix/sources.nix # managed by https://github.com/nmattia/niv
|
2 | 2 | , nixpkgs ? sources.nixpkgs
|
3 |
| -, pkgs ? import nixpkgs {} |
| 3 | +, pkgs ? import nixpkgs { } |
4 | 4 | , cargo ? import ./Cargo.nix {
|
5 | 5 | inherit nixpkgs pkgs; release = false;
|
6 | 6 | defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
|
16 | 16 | stackable-secret-operator = attrs: {
|
17 | 17 | buildInputs = [ pkgs.protobuf pkgs.rustfmt ];
|
18 | 18 | };
|
| 19 | + stackable-opa-user-info-fetcher = attrs: { |
| 20 | + # TODO: why is this not pulled in via libgssapi-sys? |
| 21 | + buildInputs = [ pkgs.krb5 ]; |
| 22 | + }; |
19 | 23 | krb5-sys = attrs: {
|
20 | 24 | nativeBuildInputs = [ pkgs.pkg-config ];
|
21 | 25 | buildInputs = [ pkgs.krb5 ];
|
|
42 | 46 | rec {
|
43 | 47 | inherit cargo sources pkgs meta;
|
44 | 48 | build = cargo.allWorkspaceMembers;
|
45 |
| - entrypoint = build+"/bin/stackable-${meta.operator.name}"; |
46 |
| - crds = pkgs.runCommand "${meta.operator.name}-crds.yaml" {} |
47 |
| - '' |
48 |
| - ${entrypoint} crd > $out |
49 |
| - ''; |
| 49 | + entrypoint = build + "/bin/stackable-${meta.operator.name}"; |
| 50 | + crds = pkgs.runCommand "${meta.operator.name}-crds.yaml" { } |
| 51 | + '' |
| 52 | + ${entrypoint} crd > $out |
| 53 | + ''; |
50 | 54 |
|
51 | 55 | dockerImage = pkgs.dockerTools.streamLayeredImage {
|
52 | 56 | name = dockerName;
|
53 | 57 | tag = dockerTag;
|
54 | 58 | contents = [
|
55 | 59 | # Common debugging tools
|
56 |
| - pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal |
| 60 | + pkgs.bashInteractive |
| 61 | + pkgs.coreutils |
| 62 | + pkgs.util-linuxMinimal |
57 | 63 | # Kerberos 5 must be installed globally to load plugins correctly
|
58 | 64 | pkgs.krb5
|
59 | 65 | # Make the whole cargo workspace available on $PATH
|
|
65 | 71 | fileRefVars = {
|
66 | 72 | PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
|
67 | 73 | };
|
68 |
| - in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars); |
| 74 | + in |
| 75 | + pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars); |
69 | 76 | Entrypoint = [ entrypoint ];
|
70 | 77 | Cmd = [ "run" ];
|
71 | 78 | };
|
@@ -94,22 +101,22 @@ rec {
|
94 | 101 | ];
|
95 | 102 |
|
96 | 103 | # need to use vendored crate2nix because of https://github.com/kolloch/crate2nix/issues/264
|
97 |
| - crate2nix = import sources.crate2nix {}; |
| 104 | + crate2nix = import sources.crate2nix { }; |
98 | 105 | tilt = pkgs.tilt;
|
99 | 106 |
|
100 | 107 | regenerateNixLockfiles = pkgs.writeScriptBin "regenerate-nix-lockfiles"
|
101 |
| - '' |
102 |
| - #!/usr/bin/env bash |
103 |
| - set -euo pipefail |
104 |
| - echo Running crate2nix |
105 |
| - ${crate2nix}/bin/crate2nix generate |
| 108 | + '' |
| 109 | + #!/usr/bin/env bash |
| 110 | + set -euo pipefail |
| 111 | + echo Running crate2nix |
| 112 | + ${crate2nix}/bin/crate2nix generate |
106 | 113 |
|
107 |
| - # crate2nix adds a trailing newline (see |
108 |
| - # https://github.com/nix-community/crate2nix/commit/5dd04e6de2fbdbeb067ab701de8ec29bc228c389). |
109 |
| - # The pre-commit hook trailing-whitespace wants to remove it again |
110 |
| - # (see https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace). |
111 |
| - # So, remove the trailing newline already here to avoid that an |
112 |
| - # unnecessary change is shown in Git. |
113 |
| - sed -i '$d' Cargo.nix |
114 |
| - ''; |
| 114 | + # crate2nix adds a trailing newline (see |
| 115 | + # https://github.com/nix-community/crate2nix/commit/5dd04e6de2fbdbeb067ab701de8ec29bc228c389). |
| 116 | + # The pre-commit hook trailing-whitespace wants to remove it again |
| 117 | + # (see https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace). |
| 118 | + # So, remove the trailing newline already here to avoid that an |
| 119 | + # unnecessary change is shown in Git. |
| 120 | + sed -i '$d' Cargo.nix |
| 121 | + ''; |
115 | 122 | }
|
0 commit comments