upd
This commit is contained in:
@@ -1,31 +1,27 @@
|
|||||||
{
|
{ stdenvNoCC, lib }:
|
||||||
description = "A flake that gives access to custom fonts.";
|
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
stdenvNoCC.mkDerivation {
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
pname = "monolisa-font";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
src = ./Monolisa;
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
packages.monolisa-font = pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
pname = "monolisa-font";
|
|
||||||
version = "0.1";
|
|
||||||
src = builtins.toPath ./fonts/Monolisa; # Correct path to Monolisa
|
|
||||||
dontUnpack = true;
|
|
||||||
buildPhase = "true"; # No build required, since it's just fonts
|
|
||||||
|
|
||||||
installPhase = ''
|
dontUnpack = true;
|
||||||
echo "Source directory: $src" # Debugging line
|
buildPhase = "true";
|
||||||
mkdir -p $out/share/fonts/truetype
|
|
||||||
cp -R $src/* $out/share/fonts/truetype/ # Added trailing slash to destination
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
installPhase = ''
|
||||||
description = "Monolisa font.";
|
runHook preInstall
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultPackage = self.packages.${system}.monolisa-font;
|
install -dm755 $out/share/fonts/truetype
|
||||||
});
|
cp -v $src/*.ttf $out/share/fonts/truetype/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Monolisa font";
|
||||||
|
homepage = "https://www.monolisa.dev/";
|
||||||
|
license = licenses.unfreeRedistributable; # because Monolisa is not FOSS
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user