|
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 // {
|
|
46 | 46 | rec {
|
47 | 47 | inherit cargo sources pkgs meta;
|
48 | 48 | build = cargo.allWorkspaceMembers;
|
49 |
| - entrypoint = build + "/bin/stackable-${meta.operator.name}"; |
50 |
| - crds = pkgs.runCommand "${meta.operator.name}-crds.yaml" { } |
51 |
| - '' |
52 |
| - ${entrypoint} crd > $out |
53 |
| - ''; |
| 49 | + entrypoint = build+"/bin/stackable-${meta.operator.name}"; |
| 50 | + crds = pkgs.runCommand "${meta.operator.name}-crds.yaml" {} |
| 51 | + '' |
| 52 | + ${entrypoint} crd > $out |
| 53 | + ''; |
54 | 54 |
|
55 | 55 | dockerImage = pkgs.dockerTools.streamLayeredImage {
|
56 | 56 | name = dockerName;
|
57 | 57 | tag = dockerTag;
|
58 | 58 | contents = [
|
59 | 59 | # Common debugging tools
|
60 |
| - pkgs.bashInteractive |
61 |
| - pkgs.coreutils |
62 |
| - pkgs.util-linuxMinimal |
| 60 | + pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal |
63 | 61 | # Kerberos 5 must be installed globally to load plugins correctly
|
64 | 62 | pkgs.krb5
|
65 | 63 | # Make the whole cargo workspace available on $PATH
|
|
71 | 69 | fileRefVars = {
|
72 | 70 | PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
|
73 | 71 | };
|
74 |
| - in |
75 |
| - pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars); |
| 72 | + in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars); |
76 | 73 | Entrypoint = [ entrypoint ];
|
77 | 74 | Cmd = [ "run" ];
|
78 | 75 | };
|
@@ -101,22 +98,22 @@ rec {
|
101 | 98 | ];
|
102 | 99 |
|
103 | 100 | # need to use vendored crate2nix because of https://github.com/kolloch/crate2nix/issues/264
|
104 |
| - crate2nix = import sources.crate2nix { }; |
| 101 | + crate2nix = import sources.crate2nix {}; |
105 | 102 | tilt = pkgs.tilt;
|
106 | 103 |
|
107 | 104 | regenerateNixLockfiles = pkgs.writeScriptBin "regenerate-nix-lockfiles"
|
108 |
| - '' |
109 |
| - #!/usr/bin/env bash |
110 |
| - set -euo pipefail |
111 |
| - echo Running crate2nix |
112 |
| - ${crate2nix}/bin/crate2nix generate |
| 105 | + '' |
| 106 | + #!/usr/bin/env bash |
| 107 | + set -euo pipefail |
| 108 | + echo Running crate2nix |
| 109 | + ${crate2nix}/bin/crate2nix generate |
113 | 110 |
|
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 |
| - ''; |
| 111 | + # crate2nix adds a trailing newline (see |
| 112 | + # https://github.com/nix-community/crate2nix/commit/5dd04e6de2fbdbeb067ab701de8ec29bc228c389). |
| 113 | + # The pre-commit hook trailing-whitespace wants to remove it again |
| 114 | + # (see https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace). |
| 115 | + # So, remove the trailing newline already here to avoid that an |
| 116 | + # unnecessary change is shown in Git. |
| 117 | + sed -i '$d' Cargo.nix |
| 118 | + ''; |
122 | 119 | }
|
0 commit comments