1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 11:03:54 +02:00

Format .nix files

This does not include any automation for the release branch, but
is based on the configuration of https://github.com/NixOS/nix/pull/12349

    pre-commit run -a nixfmt-rfc-style
This commit is contained in:
Robert Hensing 2025-01-24 20:26:47 +01:00
parent 42b22fe3de
commit 2f1b70a529
259 changed files with 7729 additions and 5286 deletions

View file

@ -10,10 +10,13 @@ let
lt = builtins.sub 0 1;
gt = 1;
versionTest = v1: v2: expected:
let d1 = builtins.compareVersions v1 v2;
d2 = builtins.compareVersions v2 v1;
in d1 == builtins.sub 0 d2 && d1 == expected;
versionTest =
v1: v2: expected:
let
d1 = builtins.compareVersions v1 v2;
d2 = builtins.compareVersions v2 v1;
in
d1 == builtins.sub 0 d2 && d1 == expected;
tests = [
((builtins.parseDrvName name1).name == "hello")
@ -40,4 +43,5 @@ let
(versionTest "2.3pre1" "2.3q" lt)
];
in (import ./lib.nix).and tests
in
(import ./lib.nix).and tests