mirror of
https://github.com/daylinmorgan/monolisa-nerdfont-patch.git
synced 2024-09-27 12:07:17 -05:00
Compare commits
13 commits
fa54af9cba
...
8a95f2c77d
Author | SHA1 | Date | |
---|---|---|---|
8a95f2c77d | |||
4ae59887b1 | |||
589b98cb27 | |||
9c8d7f6915 | |||
|
5b9e5fa889 | ||
|
29aef1df84 | ||
|
8841ba2fe0 | ||
|
9fb310f51e | ||
|
fabe645c8b | ||
|
35b4ac836b | ||
|
f5aef0b4d2 | ||
|
3dbfeee0df | ||
|
4e9e3abbb3 |
3 changed files with 70 additions and 47 deletions
|
@ -12,3 +12,8 @@ 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
|
||||
|
|
18
flake.lock
18
flake.lock
|
@ -18,7 +18,23 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
70
flake.nix
70
flake.nix
|
@ -1,29 +1,35 @@
|
|||
{
|
||||
description = "A script to patch the MonoLisa font with Nerd Fonts glyphs.";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = inputs @ {
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
}: let
|
||||
inherit (nixpkgs.lib) genAttrs;
|
||||
forAllSystems = f:
|
||||
genAttrs
|
||||
["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]
|
||||
(system: f nixpkgs.legacyPackages.${system});
|
||||
inherit (nixpkgs.lib) genAttrs makeBinPath;
|
||||
eachSystem = fn:
|
||||
genAttrs (import systems)
|
||||
(system:
|
||||
fn system
|
||||
(import nixpkgs {
|
||||
localSystem.system = system;
|
||||
overlays = [self.overlays.default];
|
||||
}));
|
||||
in {
|
||||
packages = forAllSystems (
|
||||
pkgs:
|
||||
with pkgs; {
|
||||
default = stdenv.mkDerivation {
|
||||
overlays = {
|
||||
default = final: _prev: let
|
||||
pkgs = final;
|
||||
in {
|
||||
monolisa-nerdfont-patch = pkgs.stdenv.mkDerivation {
|
||||
name = "monolisa-nerdfont-patch";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
fontforge
|
||||
python3
|
||||
];
|
||||
unpackPhase = ":";
|
||||
nativeBuildInputs = with pkgs; [makeWrapper];
|
||||
buildInputs = with pkgs; [fontforge python3];
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
@ -34,25 +40,21 @@
|
|||
'';
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/monolisa-nerdfont-patch \
|
||||
--set PATH ${lib.makeBinPath [
|
||||
fontforge
|
||||
]}
|
||||
--set PATH ${makeBinPath (with final; [fontforge])}
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
devShells = forAllSystems (
|
||||
pkgs:
|
||||
with pkgs; {
|
||||
default = mkShell {
|
||||
buildInputs = [
|
||||
fontforge
|
||||
python3
|
||||
pre-commit
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = eachSystem (system: pkgs: {
|
||||
default = self.packages.${system}.monolisa-nerdfont-patch;
|
||||
monolisa-nerdfont-patch = pkgs.monolisa-nerdfont-patch;
|
||||
});
|
||||
|
||||
devShells = eachSystem (_: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [fontforge python3 pre-commit];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue