flake: move usages of with to smallest scopes

This commit is contained in:
Jacob Birkett 2024-02-01 23:46:25 -07:00
parent fabe645c8b
commit 9fb310f51e

View file

@ -20,33 +20,33 @@
in in
fn system pkgs); fn system pkgs);
in { in {
packages = eachSystem (_: pkgs: packages = eachSystem (_: pkgs: {
with pkgs; { default = pkgs.stdenv.mkDerivation {
default = stdenv.mkDerivation { name = "monolisa-nerdfont-patch";
name = "monolisa-nerdfont-patch"; src = ./.;
src = ./.; nativeBuildInputs = with pkgs; [makeWrapper];
nativeBuildInputs = [makeWrapper]; buildInputs = with pkgs; [fontforge python3];
buildInputs = [fontforge python3]; unpackPhase = ":";
unpackPhase = ":"; buildPhase = ":";
buildPhase = ":"; installPhase = ''
installPhase = '' mkdir -p $out/bin
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
install -m755 -D ${./font-patcher} $out/bin/font-patcher cp -r ${./bin} $out/bin/bin
cp -r ${./bin} $out/bin/bin cp -r ${./src} $out/bin/src
cp -r ${./src} $out/bin/src '';
''; postFixup = ''
postFixup = '' wrapProgram $out/bin/monolisa-nerdfont-patch \
wrapProgram $out/bin/monolisa-nerdfont-patch \ --set PATH ${lib.makeBinPath (with pkgs; [fontforge])}
--set PATH ${lib.makeBinPath [fontforge]} '';
''; };
}; });
});
devShells = eachSystem (_: pkgs: devShells = eachSystem (_: pkgs: {
with pkgs; { default = pkgs.mkShell {
default = mkShell {buildInputs = [fontforge python3 pre-commit];}; buildInputs = with pkgs; [fontforge python3 pre-commit];
}); };
});
formatter = eachSystem (system: _: alejandra.packages.${system}.default); formatter = eachSystem (system: _: alejandra.packages.${system}.default);
}; };