Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: indent key-value in a few scenarios only #56

Merged
merged 1 commit into from
Feb 10, 2022
Merged

Conversation

kamadorueda
Copy link
Owner

@kamadorueda kamadorueda commented Feb 10, 2022

version = let
  commit = inputs.self.shortRev or "dirty";
in
  "${builtins.substring 0 8 date}_${commit}";

instead of

version =
  let
    commit = inputs.self.shortRev or "dirty";
  in
    "${builtins.substring 0 8 date}_${commit}";
  • This applies to function calls as well (or at least to those with attrset argument).
  • This applies to nested let bindings as well
diff --git a/doc/doc-support/lib-function-locations.nix b/doc/doc-support/lib-function-locations.nix
index 7eeb76b1e..3ebd00480 100644
--- a/doc/doc-support/lib-function-locations.nix
+++ b/doc/doc-support/lib-function-locations.nix
@@ -44,14 +44,13 @@ let
       functions;
 
   locatedlibsets = libs: builtins.map flattenedLibSubset (libset libs);
-  removeFilenamePrefix = prefix: filename:
-    let
-      prefixLen = (builtins.stringLength prefix) + 1;
-      # +1 to remove the leading /
-      filenameLen = builtins.stringLength filename;
-      substr = builtins.substring prefixLen filenameLen filename;
-    in
-      substr;
+  removeFilenamePrefix = prefix: filename: let
+    prefixLen = (builtins.stringLength prefix) + 1;
+    # +1 to remove the leading /
+    filenameLen = builtins.stringLength filename;
+    substr = builtins.substring prefixLen filenameLen filename;
+  in
+    substr;
diff --git a/lib/systems/architectures.nix b/lib/systems/architectures.nix
index c1f66fdf9..1b06a52d8 100644
--- a/lib/systems/architectures.nix
+++ b/lib/systems/architectures.nix
@@ -88,21 +88,20 @@ rec {
     loongson2f = [ ];
   };
 
-  predicates =
-    let
-      featureSupport = feature: x: builtins.elem feature features.${x} or [ ];
-    in
-      {
-        sse3Support = featureSupport "sse3";
-        ssse3Support = featureSupport "ssse3";
-        sse4_1Support = featureSupport "sse4_1";
-        sse4_2Support = featureSupport "sse4_2";
-        sse4_aSupport = featureSupport "sse4a";
-        avxSupport = featureSupport "avx";
-        avx2Support = featureSupport "avx2";
-        avx512Support = featureSupport "avx512";
-        aesSupport = featureSupport "aes";
-        fmaSupport = featureSupport "fma";
-        fma4Support = featureSupport "fma4";
-      };
+  predicates = let
+    featureSupport = feature: x: builtins.elem feature features.${x} or [ ];
+  in
+    {
+      sse3Support = featureSupport "sse3";
+      ssse3Support = featureSupport "ssse3";
+      sse4_1Support = featureSupport "sse4_1";
+      sse4_2Support = featureSupport "sse4_2";
+      sse4_aSupport = featureSupport "sse4a";
+      avxSupport = featureSupport "avx";
+      avx2Support = featureSupport "avx2";
+      avx512Support = featureSupport "avx512";
+      aesSupport = featureSupport "aes";
+      fmaSupport = featureSupport "fma";
+      fma4Support = featureSupport "fma4";
+    };
 }

@kamadorueda kamadorueda merged commit a220eb5 into main Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant