Skip to content

Commit 532871e

Browse files
authored
Merge pull request #172 from emacs-twist/nixfmt-rfc-style
Switch to nixfmt-rfc-style for formatting the generated Nix code
2 parents 41b30c0 + e56a779 commit 532871e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkgs/emacs/lock/default.nix

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
lib,
33
nix,
4-
nixfmt,
4+
nixfmt-rfc-style,
55
jq,
66
runCommandLocal,
77
writeTextFile,
@@ -65,9 +65,8 @@ assert (flakeNix || archiveLock); let
6565
# It would be better to use either nix-eval or nix-instantiate to generate a
6666
# proper Nix, but it is troublesome to run a nested Nix during a build phase.
6767
generateFlakeNix = ''
68-
${nixfmt}/bin/nixfmt < $flakeNixPath \
69-
| sed -e 's/<LAMBDA>/{ ... }: { }/' \
70-
> "$out/flake.nix"
68+
sed -e 's/<LAMBDA>/{ ... }: { }/' $flakeNixPath > "$out/flake.nix"
69+
${nixfmt-rfc-style}/bin/nixfmt "$out/flake.nix"
7170
'';
7271

7372
generateArchiveLock = ''

0 commit comments

Comments
 (0)