mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 13:07:47 +00:00
fix: idiom pkgs
This commit is contained in:
parent
408830d42d
commit
5373f40208
5 changed files with 40 additions and 37 deletions
|
@ -83,7 +83,7 @@ pub fn rule(
|
||||||
| rnix::SyntaxKind::NODE_LET_IN
|
| rnix::SyntaxKind::NODE_LET_IN
|
||||||
| rnix::SyntaxKind::NODE_LIST
|
| rnix::SyntaxKind::NODE_LIST
|
||||||
| rnix::SyntaxKind::NODE_STRING
|
| rnix::SyntaxKind::NODE_STRING
|
||||||
);
|
) && build_ctx.pos_new.column > 1;
|
||||||
|
|
||||||
if should_indent {
|
if should_indent {
|
||||||
steps.push_back(crate::builder::Step::Indent);
|
steps.push_back(crate::builder::Step::Indent);
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
[
|
[
|
||||||
{ meta = with lib; { a=1; b=2; c=3; };}
|
{ meta = with lib; { a=1; b=2; c=3; };}
|
||||||
{stdenv, lib, fetchFrom, ... }:
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "test";
|
|
||||||
version = "0.0";
|
|
||||||
src = fetchFrom {
|
|
||||||
url = "example/${version}";
|
|
||||||
};
|
|
||||||
meta = with lib; {
|
|
||||||
maintainers = with maintainers; [ someone ];
|
|
||||||
description = "something";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{ meta = with lib;
|
{ meta = with lib;
|
||||||
# comment
|
# comment
|
||||||
{ a=1; b=2; c=3; };}
|
{ a=1; b=2; c=3; };}
|
||||||
|
|
|
@ -6,30 +6,14 @@
|
||||||
c = 3;
|
c = 3;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
stdenv,
|
meta = with lib;
|
||||||
lib,
|
# comment
|
||||||
fetchFrom,
|
{
|
||||||
...
|
a = 1;
|
||||||
}:
|
b = 2;
|
||||||
stdenv.mkDerivation rec {
|
c = 3;
|
||||||
pname = "test";
|
|
||||||
version = "0.0";
|
|
||||||
src = fetchFrom {
|
|
||||||
url = "example/${version}";
|
|
||||||
};
|
};
|
||||||
meta = with lib; {
|
}
|
||||||
maintainers = with maintainers; [someone];
|
|
||||||
description = "something";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
meta = with lib;
|
|
||||||
# comment
|
|
||||||
{
|
|
||||||
a = 1;
|
|
||||||
b = 2;
|
|
||||||
c = 3;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
13
tests/cases/idioms_pkgs_1/in
Normal file
13
tests/cases/idioms_pkgs_1/in
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{stdenv, lib, fetchFrom, ... }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "test";
|
||||||
|
version = "0.0";
|
||||||
|
src = fetchFrom {
|
||||||
|
url = "example/${version}";
|
||||||
|
};
|
||||||
|
meta = with lib; {
|
||||||
|
maintainers = with maintainers; [ someone ];
|
||||||
|
description = "something";
|
||||||
|
};
|
||||||
|
}
|
17
tests/cases/idioms_pkgs_1/out
Normal file
17
tests/cases/idioms_pkgs_1/out
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchFrom,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "test";
|
||||||
|
version = "0.0";
|
||||||
|
src = fetchFrom {
|
||||||
|
url = "example/${version}";
|
||||||
|
};
|
||||||
|
meta = with lib; {
|
||||||
|
maintainers = with maintainers; [someone];
|
||||||
|
description = "something";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue