mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-13 14:29:52 +00:00
build(nix): Introduce flake.formatter for nix fmt
(#5687)
* build(nix): Introduce flake.formatter for `nix fmt` * chore: Switch to pkgs.nixfmt-rfc-style
This commit is contained in:
parent
da3b9ba2b7
commit
cb5e8f7fc4
@ -7,7 +7,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
optionalInt = cond: x: if cond then x else 0;
|
optionalInt = cond: x: if cond then x else 0;
|
||||||
in
|
in
|
||||||
singularity-tools.buildImage rec {
|
singularity-tools.buildImage rec {
|
||||||
inherit (llama-cpp) name;
|
inherit (llama-cpp) name;
|
||||||
|
10
flake.nix
10
flake.nix
@ -107,11 +107,12 @@
|
|||||||
# ```
|
# ```
|
||||||
#
|
#
|
||||||
# Cf. https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html?highlight=flake#flake-format
|
# Cf. https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html?highlight=flake#flake-format
|
||||||
flake.overlays.default =
|
flake.overlays.default = (
|
||||||
(final: prev: {
|
final: prev: {
|
||||||
llamaPackages = final.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
|
llamaPackages = final.callPackage .devops/nix/scope.nix { inherit llamaVersion; };
|
||||||
inherit (final.llamaPackages) llama-cpp;
|
inherit (final.llamaPackages) llama-cpp;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
systems = [
|
systems = [
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
@ -131,6 +132,9 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
# For standardised reproducible formatting with `nix fmt`
|
||||||
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
# Unlike `.#packages`, legacyPackages may contain values of
|
# Unlike `.#packages`, legacyPackages may contain values of
|
||||||
# arbitrary types (including nested attrsets) and may even throw
|
# arbitrary types (including nested attrsets) and may even throw
|
||||||
# exceptions. This attribute isn't recursed into by `nix flake
|
# exceptions. This attribute isn't recursed into by `nix flake
|
||||||
|
Loading…
Reference in New Issue
Block a user