upd
This commit is contained in:
@@ -1,31 +1,27 @@
|
||||
{
|
||||
description = "A flake that gives access to custom fonts.";
|
||||
{ stdenvNoCC, lib }:
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "monolisa-font";
|
||||
version = "1.0.0";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
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
|
||||
src = ./Monolisa;
|
||||
|
||||
installPhase = ''
|
||||
echo "Source directory: $src" # Debugging line
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
cp -R $src/* $out/share/fonts/truetype/ # Added trailing slash to destination
|
||||
'';
|
||||
dontUnpack = true;
|
||||
buildPhase = "true";
|
||||
|
||||
meta = {
|
||||
description = "Monolisa font.";
|
||||
};
|
||||
};
|
||||
installPhase = ''
|
||||
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