mirror of
https://github.com/daylinmorgan/monolisa-nerdfont-patch.git
synced 2024-09-27 20:07:17 -05:00
flake: introduce overlay
This commit is contained in:
parent
9fb310f51e
commit
8841ba2fe0
1 changed files with 30 additions and 20 deletions
22
flake.nix
22
flake.nix
|
@ -16,16 +16,20 @@
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
eachSystem = fn:
|
eachSystem = fn:
|
||||||
lib.genAttrs (import systems) (system: let
|
lib.genAttrs (import systems) (system: let
|
||||||
pkgs = import nixpkgs {localSystem.system = system;};
|
pkgs = import nixpkgs {
|
||||||
|
localSystem.system = system;
|
||||||
|
overlays = [self.overlays.default];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
fn system pkgs);
|
fn system pkgs);
|
||||||
in {
|
in {
|
||||||
packages = eachSystem (_: pkgs: {
|
overlays = {
|
||||||
default = pkgs.stdenv.mkDerivation {
|
default = final: prev: {
|
||||||
|
monolisa-nerdfont-patch = final.stdenv.mkDerivation {
|
||||||
name = "monolisa-nerdfont-patch";
|
name = "monolisa-nerdfont-patch";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs = with pkgs; [makeWrapper];
|
nativeBuildInputs = with final; [makeWrapper];
|
||||||
buildInputs = with pkgs; [fontforge python3];
|
buildInputs = with final; [fontforge python3];
|
||||||
unpackPhase = ":";
|
unpackPhase = ":";
|
||||||
buildPhase = ":";
|
buildPhase = ":";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -37,9 +41,15 @@
|
||||||
'';
|
'';
|
||||||
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 (with final; [fontforge])}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = eachSystem (system: pkgs: {
|
||||||
|
default = self.packages.${system}.monolisa-nerdfont-patch;
|
||||||
|
monolisa-nerdfont-patch = pkgs.monolisa-nerdfont-patch;
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = eachSystem (_: pkgs: {
|
devShells = eachSystem (_: pkgs: {
|
||||||
|
|
Loading…
Reference in a new issue