Skip to content

Commit c027e46

Browse files
committed
formatting
1 parent 33746d6 commit c027e46

File tree

4 files changed

+53
-53
lines changed

4 files changed

+53
-53
lines changed

crate2nix/Cargo.nix

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ rec {
127127
{
128128
name = "winapi";
129129
packageId = "winapi";
130-
target = {target, features}: ("windows" == target."os" or null);
130+
target = { target, features }: ("windows" == target."os" or null);
131131
features = [ "consoleapi" "errhandlingapi" "fileapi" "handleapi" "processenv" ];
132132
}
133133
];
@@ -162,18 +162,18 @@ rec {
162162
{
163163
name = "hermit-abi";
164164
packageId = "hermit-abi";
165-
target = {target, features}: ("hermit" == target."os" or null);
165+
target = { target, features }: ("hermit" == target."os" or null);
166166
}
167167
{
168168
name = "libc";
169169
packageId = "libc";
170170
usesDefaultFeatures = false;
171-
target = {target, features}: (target."unix" or false);
171+
target = { target, features }: (target."unix" or false);
172172
}
173173
{
174174
name = "winapi";
175175
packageId = "winapi";
176-
target = {target, features}: (target."windows" or false);
176+
target = { target, features }: (target."windows" or false);
177177
features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ];
178178
}
179179
];
@@ -368,7 +368,7 @@ rec {
368368
name = "ansi_term";
369369
packageId = "ansi_term";
370370
optional = true;
371-
target = {target, features}: (!(target."windows" or false));
371+
target = { target, features }: (!(target."windows" or false));
372372
}
373373
{
374374
name = "atty";
@@ -449,22 +449,22 @@ rec {
449449
{
450450
name = "libc";
451451
packageId = "libc";
452-
target = {target, features}: (target.name == "aarch64-linux-android");
452+
target = { target, features }: (target.name == "aarch64-linux-android");
453453
}
454454
{
455455
name = "libc";
456456
packageId = "libc";
457-
target = {target, features}: (("aarch64" == target."arch" or null) && ("linux" == target."os" or null));
457+
target = { target, features }: (("aarch64" == target."arch" or null) && ("linux" == target."os" or null));
458458
}
459459
{
460460
name = "libc";
461461
packageId = "libc";
462-
target = {target, features}: (("aarch64" == target."arch" or null) && ("apple" == target."vendor" or null));
462+
target = { target, features }: (("aarch64" == target."arch" or null) && ("apple" == target."vendor" or null));
463463
}
464464
{
465465
name = "libc";
466466
packageId = "libc";
467-
target = {target, features}: (("loongarch64" == target."arch" or null) && ("linux" == target."os" or null));
467+
target = { target, features }: (("loongarch64" == target."arch" or null) && ("linux" == target."os" or null));
468468
}
469469
];
470470

@@ -996,7 +996,7 @@ rec {
996996
{
997997
name = "winapi-util";
998998
packageId = "winapi-util";
999-
target = {target, features}: (target."windows" or false);
999+
target = { target, features }: (target."windows" or false);
10001000
}
10011001
];
10021002
features = {
@@ -1463,29 +1463,29 @@ rec {
14631463
{
14641464
name = "fuchsia-cprng";
14651465
packageId = "fuchsia-cprng";
1466-
target = {target, features}: ("fuchsia" == target."os" or null);
1466+
target = { target, features }: ("fuchsia" == target."os" or null);
14671467
}
14681468
{
14691469
name = "libc";
14701470
packageId = "libc";
14711471
optional = true;
1472-
target = {target, features}: (target."unix" or false);
1472+
target = { target, features }: (target."unix" or false);
14731473
}
14741474
{
14751475
name = "rand_core";
14761476
packageId = "rand_core 0.3.1";
14771477
usesDefaultFeatures = false;
1478-
target = {target, features}: ("sgx" == target."env" or null);
1478+
target = { target, features }: ("sgx" == target."env" or null);
14791479
}
14801480
{
14811481
name = "rdrand";
14821482
packageId = "rdrand";
1483-
target = {target, features}: ("sgx" == target."env" or null);
1483+
target = { target, features }: ("sgx" == target."env" or null);
14841484
}
14851485
{
14861486
name = "winapi";
14871487
packageId = "winapi";
1488-
target = {target, features}: (target."windows" or false);
1488+
target = { target, features }: (target."windows" or false);
14891489
features = [ "minwindef" "ntsecapi" "profileapi" "winnt" ];
14901490
}
14911491
];
@@ -1703,7 +1703,7 @@ rec {
17031703
{
17041704
name = "winapi";
17051705
packageId = "winapi";
1706-
target = {target, features}: (target."windows" or false);
1706+
target = { target, features }: (target."windows" or false);
17071707
features = [ "std" "errhandlingapi" "winerror" "fileapi" "winbase" ];
17081708
}
17091709
];
@@ -1733,7 +1733,7 @@ rec {
17331733
{
17341734
name = "winapi-util";
17351735
packageId = "winapi-util";
1736-
target = {target, features}: (target."windows" or false);
1736+
target = { target, features }: (target."windows" or false);
17371737
}
17381738
];
17391739

@@ -1778,7 +1778,7 @@ rec {
17781778
{
17791779
name = "serde_derive";
17801780
packageId = "serde_derive";
1781-
target = {target, features}: false;
1781+
target = { target, features }: false;
17821782
}
17831783
];
17841784
devDependencies = [
@@ -1907,7 +1907,7 @@ rec {
19071907
{
19081908
name = "cpufeatures";
19091909
packageId = "cpufeatures";
1910-
target = {target, features}: (("aarch64" == target."arch" or null) || ("x86_64" == target."arch" or null) || ("x86" == target."arch" or null));
1910+
target = { target, features }: (("aarch64" == target."arch" or null) || ("x86_64" == target."arch" or null) || ("x86" == target."arch" or null));
19111911
}
19121912
{
19131913
name = "digest";
@@ -2674,7 +2674,7 @@ rec {
26742674
{
26752675
name = "winapi-util";
26762676
packageId = "winapi-util";
2677-
target = {target, features}: (target."windows" or false);
2677+
target = { target, features }: (target."windows" or false);
26782678
}
26792679
];
26802680

@@ -2691,12 +2691,12 @@ rec {
26912691
{
26922692
name = "winapi-i686-pc-windows-gnu";
26932693
packageId = "winapi-i686-pc-windows-gnu";
2694-
target = {target, features}: (target.name == "i686-pc-windows-gnu");
2694+
target = { target, features }: (target.name == "i686-pc-windows-gnu");
26952695
}
26962696
{
26972697
name = "winapi-x86_64-pc-windows-gnu";
26982698
packageId = "winapi-x86_64-pc-windows-gnu";
2699-
target = {target, features}: (target.name == "x86_64-pc-windows-gnu");
2699+
target = { target, features }: (target.name == "x86_64-pc-windows-gnu");
27002700
}
27012701
];
27022702
features = {
@@ -2726,7 +2726,7 @@ rec {
27262726
{
27272727
name = "windows-sys";
27282728
packageId = "windows-sys";
2729-
target = {target, features}: (target."windows" or false);
2729+
target = { target, features }: (target."windows" or false);
27302730
features = [ "Win32_Foundation" "Win32_Storage_FileSystem" "Win32_System_Console" "Win32_System_SystemInformation" ];
27312731
}
27322732
];
@@ -3001,42 +3001,42 @@ rec {
30013001
{
30023002
name = "windows_aarch64_gnullvm";
30033003
packageId = "windows_aarch64_gnullvm";
3004-
target = {target, features}: (target.name == "aarch64-pc-windows-gnullvm");
3004+
target = { target, features }: (target.name == "aarch64-pc-windows-gnullvm");
30053005
}
30063006
{
30073007
name = "windows_aarch64_msvc";
30083008
packageId = "windows_aarch64_msvc";
3009-
target = {target, features}: (("aarch64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
3009+
target = { target, features }: (("aarch64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
30103010
}
30113011
{
30123012
name = "windows_i686_gnu";
30133013
packageId = "windows_i686_gnu";
3014-
target = {target, features}: (("x86" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
3014+
target = { target, features }: (("x86" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
30153015
}
30163016
{
30173017
name = "windows_i686_gnullvm";
30183018
packageId = "windows_i686_gnullvm";
3019-
target = {target, features}: (target.name == "i686-pc-windows-gnullvm");
3019+
target = { target, features }: (target.name == "i686-pc-windows-gnullvm");
30203020
}
30213021
{
30223022
name = "windows_i686_msvc";
30233023
packageId = "windows_i686_msvc";
3024-
target = {target, features}: (("x86" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
3024+
target = { target, features }: (("x86" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
30253025
}
30263026
{
30273027
name = "windows_x86_64_gnu";
30283028
packageId = "windows_x86_64_gnu";
3029-
target = {target, features}: (("x86_64" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
3029+
target = { target, features }: (("x86_64" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
30303030
}
30313031
{
30323032
name = "windows_x86_64_gnullvm";
30333033
packageId = "windows_x86_64_gnullvm";
3034-
target = {target, features}: (target.name == "x86_64-pc-windows-gnullvm");
3034+
target = { target, features }: (target.name == "x86_64-pc-windows-gnullvm");
30353035
}
30363036
{
30373037
name = "windows_x86_64_msvc";
30383038
packageId = "windows_x86_64_msvc";
3039-
target = {target, features}: ((("x86_64" == target."arch" or null) || ("arm64ec" == target."arch" or null)) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
3039+
target = { target, features }: ((("x86_64" == target."arch" or null) || ("arm64ec" == target."arch" or null)) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
30403040
}
30413041
];
30423042

crate2nix/templates/Cargo.nix.tera

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ rec {
220220
usesDefaultFeatures = false;
221221
{%- endif -%}
222222
{%- if dependency.target %}
223-
target = {target, features}: {{dependency.target | cfg_to_nix_expr | safe}};
223+
target = { target, features }: {{dependency.target | cfg_to_nix_expr | safe}};
224224
{%- endif %}
225225
{%- if dependency.features %}
226226
features = [ {% for feature in dependency.features %}{{feature}} {% endfor %}];
@@ -246,7 +246,7 @@ rec {
246246
usesDefaultFeatures = false;
247247
{%- endif -%}
248248
{%- if dependency.target %}
249-
target = {target, features}: {{dependency.target | cfg_to_nix_expr | safe}};
249+
target = { target, features }: {{dependency.target | cfg_to_nix_expr | safe}};
250250
{%- endif %}
251251
{%- if dependency.features %}
252252
features = [ {% for feature in dependency.features %}{{feature}} {% endfor %}];
@@ -271,7 +271,7 @@ rec {
271271
usesDefaultFeatures = false;
272272
{%- endif -%}
273273
{%- if dependency.target %}
274-
target = {target, features}: {{dependency.target | cfg_to_nix_expr | safe}};
274+
target = { target, features }: {{dependency.target | cfg_to_nix_expr | safe}};
275275
{%- endif %}
276276
{%- if dependency.features %}
277277
features = [ {% for feature in dependency.features %}{{feature}} {% endfor %}];

sample_projects/bin_with_git_submodule_dep/Cargo.nix

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ rec {
283283
name = "libc";
284284
packageId = "libc";
285285
usesDefaultFeatures = false;
286-
target = {target, features}: (target."unix" or false);
286+
target = { target, features }: (target."unix" or false);
287287
}
288288
];
289289
features = {
@@ -407,7 +407,7 @@ rec {
407407
{
408408
name = "libc";
409409
packageId = "libc";
410-
target = {target, features}: (target."unix" or false);
410+
target = { target, features }: (target."unix" or false);
411411
}
412412
];
413413

@@ -468,12 +468,12 @@ rec {
468468
{
469469
name = "cfg-if";
470470
packageId = "cfg-if";
471-
target = {target, features}: (target."unix" or false);
471+
target = { target, features }: (target."unix" or false);
472472
}
473473
{
474474
name = "windows-sys";
475475
packageId = "windows-sys";
476-
target = {target, features}: (target."windows" or false);
476+
target = { target, features }: (target."windows" or false);
477477
features = [ "Win32_Foundation" "Win32_System_Diagnostics_Debug" "Win32_System_LibraryLoader" ];
478478
}
479479
];
@@ -1256,37 +1256,37 @@ rec {
12561256
{
12571257
name = "windows_aarch64_gnullvm";
12581258
packageId = "windows_aarch64_gnullvm";
1259-
target = {target, features}: (target.name == "aarch64-pc-windows-gnullvm");
1259+
target = { target, features }: (target.name == "aarch64-pc-windows-gnullvm");
12601260
}
12611261
{
12621262
name = "windows_aarch64_msvc";
12631263
packageId = "windows_aarch64_msvc";
1264-
target = {target, features}: (("aarch64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
1264+
target = { target, features }: (("aarch64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
12651265
}
12661266
{
12671267
name = "windows_i686_gnu";
12681268
packageId = "windows_i686_gnu";
1269-
target = {target, features}: (("x86" == target."arch" or null) && ("gnu" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
1269+
target = { target, features }: (("x86" == target."arch" or null) && ("gnu" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
12701270
}
12711271
{
12721272
name = "windows_i686_msvc";
12731273
packageId = "windows_i686_msvc";
1274-
target = {target, features}: (("x86" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
1274+
target = { target, features }: (("x86" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
12751275
}
12761276
{
12771277
name = "windows_x86_64_gnu";
12781278
packageId = "windows_x86_64_gnu";
1279-
target = {target, features}: (("x86_64" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
1279+
target = { target, features }: (("x86_64" == target."arch" or null) && ("gnu" == target."env" or null) && (!("llvm" == target."abi" or null)) && (!(target."windows_raw_dylib" or false)));
12801280
}
12811281
{
12821282
name = "windows_x86_64_gnullvm";
12831283
packageId = "windows_x86_64_gnullvm";
1284-
target = {target, features}: (target.name == "x86_64-pc-windows-gnullvm");
1284+
target = { target, features }: (target.name == "x86_64-pc-windows-gnullvm");
12851285
}
12861286
{
12871287
name = "windows_x86_64_msvc";
12881288
packageId = "windows_x86_64_msvc";
1289-
target = {target, features}: (("x86_64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
1289+
target = { target, features }: (("x86_64" == target."arch" or null) && ("msvc" == target."env" or null) && (!(target."windows_raw_dylib" or false)));
12901290
}
12911291
];
12921292

sample_projects/codegen/Cargo.nix

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ rec {
102102
{
103103
name = "winapi";
104104
packageId = "winapi";
105-
target = {target, features}: ("windows" == target."os" or null);
105+
target = { target, features }: ("windows" == target."os" or null);
106106
features = [ "consoleapi" "errhandlingapi" "fileapi" "handleapi" "processenv" ];
107107
}
108108
];
@@ -123,18 +123,18 @@ rec {
123123
{
124124
name = "hermit-abi";
125125
packageId = "hermit-abi";
126-
target = {target, features}: ("hermit" == target."os" or null);
126+
target = { target, features }: ("hermit" == target."os" or null);
127127
}
128128
{
129129
name = "libc";
130130
packageId = "libc";
131131
usesDefaultFeatures = false;
132-
target = {target, features}: (target."unix" or false);
132+
target = { target, features }: (target."unix" or false);
133133
}
134134
{
135135
name = "winapi";
136136
packageId = "winapi";
137-
target = {target, features}: (target."windows" or false);
137+
target = { target, features }: (target."windows" or false);
138138
features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ];
139139
}
140140
];
@@ -168,7 +168,7 @@ rec {
168168
name = "ansi_term";
169169
packageId = "ansi_term";
170170
optional = true;
171-
target = {target, features}: (!(target."windows" or false));
171+
target = { target, features }: (!(target."windows" or false));
172172
}
173173
{
174174
name = "atty";
@@ -269,7 +269,7 @@ rec {
269269
{
270270
name = "winapi";
271271
packageId = "winapi";
272-
target = {target, features}: (target."windows" or false);
272+
target = { target, features }: (target."windows" or false);
273273
features = [ "winsock2" ];
274274
}
275275
];
@@ -491,12 +491,12 @@ rec {
491491
{
492492
name = "winapi-i686-pc-windows-gnu";
493493
packageId = "winapi-i686-pc-windows-gnu";
494-
target = {target, features}: (target.name == "i686-pc-windows-gnu");
494+
target = { target, features }: (target.name == "i686-pc-windows-gnu");
495495
}
496496
{
497497
name = "winapi-x86_64-pc-windows-gnu";
498498
packageId = "winapi-x86_64-pc-windows-gnu";
499-
target = {target, features}: (target.name == "x86_64-pc-windows-gnu");
499+
target = { target, features }: (target.name == "x86_64-pc-windows-gnu");
500500
}
501501
];
502502
features = {

0 commit comments

Comments
 (0)