Compare commits
8 Commits
8a95f2c77d
...
fa54af9cba
Author | SHA1 | Date |
---|---|---|
|
fa54af9cba | |
|
09fcb3e71d | |
|
e5a80628c5 | |
|
1da617b5a3 | |
|
cdd398eac6 | |
|
e5b1362c40 | |
|
feb076653b | |
|
6f7ae92648 |
1258
flake.lock
1258
flake.lock
File diff suppressed because it is too large
Load Diff
110
flake.nix
110
flake.nix
|
@ -1,58 +1,62 @@
|
|||
{
|
||||
description = "A script to patch the MonoLisa font with Nerd Fonts glyphs.";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
inherit (nixpkgs.lib) genAttrs;
|
||||
forAllSystems = f:
|
||||
genAttrs
|
||||
["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]
|
||||
(system: f nixpkgs.legacyPackages.${system});
|
||||
in {
|
||||
packages = forAllSystems (
|
||||
pkgs:
|
||||
with pkgs; {
|
||||
default = stdenv.mkDerivation {
|
||||
name = "monolisa-nerdfont-patch";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
fontforge
|
||||
python3
|
||||
];
|
||||
unpackPhase = ":";
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
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 ${lib.makeBinPath [
|
||||
fontforge
|
||||
]}
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
devShells = forAllSystems (
|
||||
pkgs:
|
||||
with pkgs; {
|
||||
default = mkShell {
|
||||
buildInputs = [
|
||||
fontforge
|
||||
python3
|
||||
pre-commit
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
nixfmt.url = "github:serokell/nixfmt";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, systems, nixfmt, }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
pkgsFor = eachSystem (system:
|
||||
import nixpkgs {
|
||||
localSystem.system = system;
|
||||
overlays = [ self.overlays.default ];
|
||||
});
|
||||
in {
|
||||
overlays = {
|
||||
default = pkgs: pkgs0: {
|
||||
monolisa-nerdfont-patch = pkgs.stdenv.mkDerivation {
|
||||
name = "monolisa-nerdfont-patch";
|
||||
src = ./.;
|
||||
nativeBuildInputs = with pkgs; [ makeWrapper ];
|
||||
buildInputs = with pkgs; [ fontforge python3 ];
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
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 ${lib.makeBinPath (with pkgs; [ fontforge ])}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
packages = eachSystem (system:
|
||||
let pkgs = pkgsFor.${system};
|
||||
in {
|
||||
default = self.packages.${system}.monolisa-nerdfont-patch;
|
||||
monolisa-nerdfont-patch = pkgs.monolisa-nerdfont-patch;
|
||||
});
|
||||
|
||||
devShells = eachSystem (system:
|
||||
let pkgs = pkgsFor.${system};
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ fontforge python3 pre-commit ];
|
||||
};
|
||||
});
|
||||
|
||||
formatter = eachSystem (system: nixfmt.packages.${system}.default);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue