From 6259eecb737ef4c1d408dd6cb229dd5d8739de06 Mon Sep 17 00:00:00 2001 From: puttaalu Date: Sat, 27 Jul 2024 00:38:07 +0200 Subject: [PATCH] move manjari build into another file --- flake.nix | 42 +++++++++--------------------------------- manjari.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 33 deletions(-) create mode 100644 manjari.nix diff --git a/flake.nix b/flake.nix index f08df1d..20f69a5 100644 --- a/flake.nix +++ b/flake.nix @@ -7,40 +7,16 @@ }; outputs = { self, nixpkgs }:{ - packages.x86_64-linux { - default = - let - pkgs = import nixpkgs { system = "x86_64-linux"; }; - in - # Define the package - pkgs.stdenv.mkDerivation { - version = "2.200"; - pname = "manjari"; - - src = pkgs.fetchzip { - url = "https://smc.org.in/downloads/fonts/manjari/manjari.zip"; - hash = "sha256-u3hUW6EFhr9FIUl28u7TUKEclxWcpK95OUmL+SCwkD0="; - stripRoot = false; - }; + packages.x86_64-linux = let + pkgs = import nixpkgs { system = "x86_64-linux";}; + in { + manjari = import ./manjari.nix { + inherit pkgs; + }; + + default = self.packages.x86_64-linux.manjari; - - installPhase = '' - runHook preInstall - - install -Dm444 -t $out/share/fonts/opentype $src/*.otf - install -Dm444 -t $out/share/fonts/truetype $src/*.ttf - - runHook postInstall - ''; - - meta = with pkgs.lib; { - homepage = "https://smc.org.in/fonts/manjari"; - description = "Manjari Malayalam Typeface"; - license = licenses.ofl; - platforms = platforms.all; - maintainers = with maintainers; [ aashiks ]; - }; - }; }; + }; } diff --git a/manjari.nix b/manjari.nix new file mode 100644 index 0000000..a1d6fb4 --- /dev/null +++ b/manjari.nix @@ -0,0 +1,28 @@ +{ pkgs, ...}: + +pkgs.stdenv.mkDerivation { + version = "2.200"; + pname = "manjari"; + + src = pkgs.fetchzip { + url = "https://smc.org.in/downloads/fonts/manjari/manjari.zip"; + hash = "sha256-u3hUW6EFhr9FIUl28u7TUKEclxWcpK95OUmL+SCwkD0="; + stripRoot = false; + }; + + + installPhase = '' + runHook preInstall + install -Dm444 -t $out/share/fonts/opentype $src/*.otf + install -Dm444 -t $out/share/fonts/truetype $src/*.ttf + runHook postInstall + ''; + + meta = with pkgs.lib; { + homepage = "https://smc.org.in/fonts/manjari"; + description = "Manjari Malayalam Typeface"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = with maintainers; [ aashiks ]; + }; +}