From 7e2b15f08bcd882a5dc52935f80333f7ab5b1e7b Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 11 Aug 2017 03:49:27 +0000 Subject: [PATCH] liberastika: make the font derivation fixed-output - [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754) --- pkgs/data/fonts/liberastika/default.nix | 28 ++++++++++--------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/pkgs/data/fonts/liberastika/default.nix b/pkgs/data/fonts/liberastika/default.nix index 964210c8dfe5..2e1f89ed1e72 100644 --- a/pkgs/data/fonts/liberastika/default.nix +++ b/pkgs/data/fonts/liberastika/default.nix @@ -1,26 +1,20 @@ -{stdenv, fetchurl, unzip}: +{stdenv, fetchzip}: -stdenv.mkDerivation rec { - name = "liberastika-${version}"; +let version = "1.1.5"; +in fetchzip rec { + name = "liberastika-${version}"; - src = fetchurl { - url = "mirror://sourceforge/project/lib-ka/liberastika-ttf-${version}.zip"; - sha256 = "0vg5ki120lb577ihvq8w0nxs8yacqzcvsmnsygksmn6281hyj0xj"; - }; + url = "mirror://sourceforge/project/lib-ka/liberastika-ttf-${version}.zip"; - buildInputs = [ unzip ]; - - sourceRoot = "."; - - installPhase = '' - mkdir -p $out/share/fonts/truetype - cp -v $(find . -name '*.ttf') $out/share/fonts/truetype - - mkdir -p "$out/doc/${name}" - cp -v AUTHORS ChangeLog COPYING README "$out/doc/${name}" || true + postFetch = '' + mkdir -p $out/share/{doc,fonts} + unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype + unzip -j $downloadedFile AUTHORS ChangeLog COPYING README -d "$out/share/doc/${name}" ''; + sha256 = "1a9dvl1pzch2vh8sqyyn1d1wz4n624ffazl6hzlc3s5k5lzrb6jp"; + meta = with stdenv.lib; { description = "Liberation Sans fork with improved cyrillic support"; homepage = https://sourceforge.net/projects/lib-ka/;