From 9f11dcc625be85996348f0e95a27800dcdc4b592 Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 11 Aug 2017 03:57:52 +0000 Subject: [PATCH] marathi-cursive: make the font derivation fixed-output - [x] homepage fixed - [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754) --- pkgs/data/fonts/marathi-cursive/default.nix | 23 ++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/data/fonts/marathi-cursive/default.nix b/pkgs/data/fonts/marathi-cursive/default.nix index e3f47cb8b0d4..48b2f4c516b6 100644 --- a/pkgs/data/fonts/marathi-cursive/default.nix +++ b/pkgs/data/fonts/marathi-cursive/default.nix @@ -1,27 +1,26 @@ -{ stdenv, fetchurl, p7zip }: +{ stdenv, fetchzip, p7zip }: -stdenv.mkDerivation rec { - name = "marathi-cursive-${version}"; +let version = "1.2"; +in fetchzip rec { + name = "marathi-cursive-${version}"; - src = fetchurl { - url = "https://github.com/MihailJP/MarathiCursive/releases/download/${version}/MarathiCursive-${version}.7z"; - sha256 = "0zhqkkfkz5mhfz8xv305s16h80p9v1iva829fznxd2c44ngyplmc"; - }; + url = "https://github.com/MihailJP/MarathiCursive/releases/download/${version}/MarathiCursive-${version}.7z"; - buildInputs = [ p7zip ]; + postFetch = '' + ${p7zip}/bin/7z x $downloadedFile + cd MarathiCursive - unpackCmd = "7z x $curSrc"; - - installPhase = '' mkdir -p $out/share/fonts/marathi-cursive cp -v *.otf *.ttf $out/share/fonts/marathi-cursive mkdir -p $out/share/doc/${name} cp -v README *.txt $out/share/doc/${name} ''; + sha256 = "0fhz2ixrkm523qlx5pnwyzxgb1cfiiwrhls98xg8a5l3sypn1g8v"; + meta = with stdenv.lib; { - homepage = https://github.com/MihailJP/marathi-cursive; + homepage = https://github.com/MihailJP/MarathiCursive; description = "Modi script font with Graphite and OpenType support"; maintainers = with maintainers; [ mathnerd314 ]; license = licenses.mit; # It's the M+ license, M+ is MIT(-ish)