Reformat and add formatters to nix env

This commit is contained in:
Luc Perkins 2022-07-29 00:11:05 +02:00
parent 055d5ea784
commit 325493f5ab
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
10 changed files with 22 additions and 53 deletions

View file

@ -1,5 +1,6 @@
{ {
description = "Ready-made templates for easily creating flake-driven environments"; description =
"Ready-made templates for easily creating flake-driven environments";
outputs = { self }: { outputs = { self }: {
templates = { templates = {

View file

@ -16,15 +16,12 @@
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ buildInputs = [ gleamPkg ];
gleamPkg
];
shellHook = '' shellHook = ''
${gleamPkg}/bin/gleam --version ${gleamPkg}/bin/gleam --version
''; '';
}; };
}; };
} });
);
} }

View file

@ -46,6 +46,5 @@
''; '';
}; };
}; };
} });
);
} }

View file

@ -46,6 +46,5 @@
''; '';
}; };
}; };
} });
);
} }

View file

@ -19,15 +19,12 @@
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ buildInputs = [ java ] ++ buildTools;
java
] ++ buildTools;
shellHook = '' shellHook = ''
${java}/bin/java -version ${java}/bin/java -version
''; '';
}; };
}; };
} });
);
} }

View file

@ -13,7 +13,7 @@
nix = pkgs.nixUnstable; nix = pkgs.nixUnstable;
helpers = with pkgs; [ nixpkgs-fmt statix ]; helpers = with pkgs; [ nixfmt nixpkgs-fmt statix ];
inherit (pkgs) mkShell; inherit (pkgs) mkShell;
in { in {
@ -26,6 +26,5 @@
''; '';
}; };
}; };
} });
);
} }

View file

@ -19,17 +19,12 @@
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ buildInputs = [ nodejs pnpm (yarn.override { inherit nodejs; }) ];
nodejs
pnpm
(yarn.override { inherit nodejs; })
];
shellHook = '' shellHook = ''
echo "node `${nodejs}/bin/node --version`" echo "node `${nodejs}/bin/node --version`"
''; '';
}; };
}; };
} });
);
} }

View file

@ -10,13 +10,9 @@
outputs = { self, nixpkgs, flake-utils, rust-overlay }: outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
overlays = [ overlays = [ (import rust-overlay) ];
(import rust-overlay)
];
pkgs = import nixpkgs { pkgs = import nixpkgs { inherit system overlays; };
inherit system overlays;
};
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
@ -30,15 +26,12 @@
devShells = { devShells = {
default = mkShell { default = mkShell {
buildInputs = [ buildInputs = [ rust ] ++ helpers;
rust
] ++ helpers;
shellHook = '' shellHook = ''
${rust}/bin/cargo --version ${rust}/bin/cargo --version
''; '';
}; };
}; };
} });
);
} }

View file

@ -14,12 +14,8 @@
config = { config = {
packageOverrides = p: { packageOverrides = p: {
sbt = p.sbt.override { sbt = p.sbt.override { jre = p.${jdk}; };
jre = p.${jdk}; scala_3 = p.scala_3.override { jre = p.${jdk}; };
};
scala_3 = p.scala_3.override {
jre = p.${jdk};
};
}; };
}; };
@ -33,16 +29,12 @@
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ buildInputs = [ scala jdkPkg ] ++ buildTools;
scala
jdkPkg
] ++ buildTools;
shellHook = '' shellHook = ''
${scala}/bin/scala -version ${scala}/bin/scala -version
''; '';
}; };
}; };
} });
);
} }

View file

@ -16,15 +16,12 @@
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ buildInputs = [ zigPkg ];
zigPkg
];
shellHook = '' shellHook = ''
${zigPkg}/bin/zig version ${zigPkg}/bin/zig version
''; '';
}; };
}; };
} });
);
} }