From 22519a5a2dbc61c07013aed15b2fc67031b39d92 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 31 Mar 2024 11:15:34 -0500 Subject: [PATCH] chore: specify formatter in flake --- .pre-commit-config.yaml | 5 ----- flake.nix | 15 ++++++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f3e77d..9dd7cea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,8 +12,3 @@ repos: - id: ruff-format - id: ruff args: [ --fix ] - - repo: https://github.com/kamadorueda/alejandra - rev: 3.0.0 - hooks: - # Requires Alejandra to be previously installed in the system - - id: alejandra-system diff --git a/flake.nix b/flake.nix index c26496a..3ba6b4e 100644 --- a/flake.nix +++ b/flake.nix @@ -13,10 +13,8 @@ }: let inherit (nixpkgs.lib) genAttrs makeBinPath; eachSystem = fn: - genAttrs (import systems) - (system: - fn system - (import nixpkgs { + genAttrs (import systems) (system: + fn system (import nixpkgs { inherit system; overlays = [self.overlays.default]; })); @@ -33,14 +31,15 @@ buildPhase = ":"; installPhase = '' mkdir -p $out/bin - install -m755 -D ${./patch-monolisa} $out/bin/monolisa-nerdfont-patch + install -m755 -D ${./patch-monolisa} \ + $out/bin/monolisa-nerdfont-patch install -m755 -D ${./font-patcher} $out/bin/font-patcher cp -r ${./bin} $out/bin/bin cp -r ${./src} $out/bin/src ''; postFixup = '' wrapProgram $out/bin/monolisa-nerdfont-patch \ - --set PATH ${makeBinPath (with final; [fontforge])} + --set PATH ${makeBinPath (with pkgs; [fontforge])} ''; }; }; @@ -53,8 +52,10 @@ devShells = eachSystem (_: pkgs: { default = pkgs.mkShell { - buildInputs = with pkgs; [fontforge python3 pre-commit]; + packages = with pkgs; [fontforge python3 pre-commit]; }; }); + + formatter = eachSystem (_: pkgs: pkgs.nixfmt); }; }