Skip to content

Commit 325b7af

Browse files
committed
chore(template): Revert nix formatting
Also, see https://github.com/NixOS/nixfmt
1 parent 1ff1c89 commit 325b7af

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

template/default.nix

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ sources ? import ./nix/sources.nix # managed by https://github.com/nmattia/niv
22
, nixpkgs ? sources.nixpkgs
3-
, pkgs ? import nixpkgs { }
3+
, pkgs ? import nixpkgs {}
44
, cargo ? import ./Cargo.nix {
55
inherit nixpkgs pkgs; release = false;
66
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
@@ -46,20 +46,18 @@
4646
rec {
4747
inherit cargo sources pkgs meta;
4848
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+
'';
5454

5555
dockerImage = pkgs.dockerTools.streamLayeredImage {
5656
name = dockerName;
5757
tag = dockerTag;
5858
contents = [
5959
# Common debugging tools
60-
pkgs.bashInteractive
61-
pkgs.coreutils
62-
pkgs.util-linuxMinimal
60+
pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal
6361
# Kerberos 5 must be installed globally to load plugins correctly
6462
pkgs.krb5
6563
# Make the whole cargo workspace available on $PATH
@@ -71,8 +69,7 @@ rec {
7169
fileRefVars = {
7270
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
7371
};
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);
7673
Entrypoint = [ entrypoint ];
7774
Cmd = [ "run" ];
7875
};
@@ -101,22 +98,22 @@ rec {
10198
];
10299

103100
# need to use vendored crate2nix because of https://github.com/kolloch/crate2nix/issues/264
104-
crate2nix = import sources.crate2nix { };
101+
crate2nix = import sources.crate2nix {};
105102
tilt = pkgs.tilt;
106103

107104
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
113110
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+
'';
122119
}

0 commit comments

Comments
 (0)