diff options
| author | Β·ππ΄πππ©π€ | 2025-12-23 06:22:23 +0000 |
|---|---|---|
| committer | Β·ππ΄πππ©π€ | 2025-12-23 06:22:23 +0000 |
| commit | 2ffd302bd0f7268c5d45691170b4f87339d1b2e4 (patch) | |
| tree | 14c2160ed9b3fd0d58e0e16c114b23b881b0e74b /nix/package | |
| parent | 4e94682a17ce30271b302f1285f56fa11dfefd53 (diff) | |
| download | nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar.gz nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar.bz2 nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar.lz nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar.xz nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.tar.zst nixtaml-2ffd302bd0f7268c5d45691170b4f87339d1b2e4.zip | |
package/nixfmt: move to dash-nix
Diffstat (limited to 'nix/package')
| -rw-r--r-- | nix/package/nixfmt-3-space.nix | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/nix/package/nixfmt-3-space.nix b/nix/package/nixfmt-3-space.nix index fe2b003..505d71e 100644 --- a/nix/package/nixfmt-3-space.nix +++ b/nix/package/nixfmt-3-space.nix @@ -2,29 +2,23 @@ # SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/> β # SPDX-License-Identifier: LGPL-2.1-or-later β #βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ -# I donβt like *this* formatter, but it is *a* formatter. Tweaking it to expand -# to 3 spaces, helps the maker actually read the code since 2 spaces is not -# enough contrast (& Nix magic strings donβt support tabs). { lib, - writeTextFile, - dash, + writeDashBinScript, nixfmt-rfc-style, - stdenvNoCC, }: -writeTextFile { - name = "nixfmt-3-space"; - executable = true; - destination = "/bin/nixfmt"; +writeDashBinScript { + name = "nixfmt"; text = /* sh */ '' - #!${lib.getExe dash} - exec ${lib.getExe nixfmt-rfc-style} --indent=3 "$@" + exec ${lib.getExe nixfmt-rfc-style} --indent="3" "$@" ''; - checkPhase = '' - runHook preCheck - ${stdenvNoCC.shellDryRun} "$target" - runHook postCheck - ''; - meta.mainProgram = "nixfmt"; + meta = { + description = "nixfmt, but with 3-space indentation"; + longDescription = '' + I donβt like *this* formatter, but it is *a* formatter. Tweaking it to + expand to 3 spaces, helps the maker actually read the code since 2 + spaces is not enough contrast (& Nix magic strings donβt support tabs). + ''; + }; } |
