1
0
Эх сурвалжийг харах

remove a bunch of empty lines to improve legibility

sbatial 2 жил өмнө
parent
commit
35a95db7d7
2 өөрчлөгдсөн 9 нэмэгдсэн , 40 устгасан
  1. 9 39
      flake.nix
  2. 0 1
      treefmt.nix

+ 9 - 39
flake.nix

@@ -1,77 +1,58 @@
 {
   inputs = {
-
     flake-utils.url = "github:numtide/flake-utils";
-
     naersk.url = "github:nix-community/naersk";
-
     nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
-
     treefmt-nix.url = "github:numtide/treefmt-nix";
-
     rust-overlay.url = "github:oxalica/rust-overlay";
-
   };
 
   outputs = {
-      self
-    , flake-utils
-    , naersk
-    , nixpkgs
-    , treefmt-nix
-    , rust-overlay
+    self,
+    flake-utils,
+    naersk,
+    nixpkgs,
+    treefmt-nix,
+    rust-overlay,
   }:
     flake-utils.lib.eachDefaultSystem (
-
       system: let
-
         overlays = [(import rust-overlay)];
 
         pkgs = (import nixpkgs) {
-
           inherit system overlays;
-
         };
 
         toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
 
         naersk' = pkgs.callPackage naersk {
-
           cargo = toolchain;
-
           rustc = toolchain;
-
         };
 
         treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
-
       in {
-
         # For `nix fmt`
-
         formatter = treefmtEval.config.build.wrapper;
 
-
-        # packages.default = naersk'.buildPackage {
-
-        #   src = ./.;
-
-        # };
         packages = {
           # For `nix build` & `nix run`:
           default = naersk'.buildPackage {
             src = ./.;
           };
+
           # Run `nix build .#check` to check code
           check = naersk'.buildPackage {
             src = ./.;
             mode = "check";
           };
+
           # Run `nix build .#test` to run tests
           test = naersk'.buildPackage {
             src = ./.;
             mode = "test";
           };
+
           # Run `nix build .#clippy` to lint code
           clippy = naersk'.buildPackage {
             src = ./.;
@@ -80,25 +61,14 @@
         };
 
         # For `nix develop`:
-
         devShells.default = pkgs.mkShell {
-
           nativeBuildInputs = with pkgs; [toolchain];
-
         };
 
         # for `nix flake check`
-
         checks = {
-
           formatting = treefmtEval.config.build.check self;
-
         };
-
       }
-
     );
-
 }
-
-

+ 0 - 1
treefmt.nix

@@ -5,4 +5,3 @@
     rustfmt.enable = true;
   };
 }
-