diff options
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/source-sans/default.nix')
-rw-r--r-- | nixpkgs/pkgs/data/fonts/source-sans/default.nix | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/data/fonts/source-sans/default.nix b/nixpkgs/pkgs/data/fonts/source-sans/default.nix index c16d0d2b8b4f..1433804ce71d 100644 --- a/nixpkgs/pkgs/data/fonts/source-sans/default.nix +++ b/nixpkgs/pkgs/data/fonts/source-sans/default.nix @@ -1,20 +1,23 @@ -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: -let +stdenvNoCC.mkDerivation rec { + pname = "source-sans"; version = "3.046"; -in fetchzip { - name = "source-sans-${version}"; - url = "https://github.com/adobe-fonts/source-sans/archive/${version}R.zip"; + src = fetchzip { + url = "https://github.com/adobe-fonts/source-sans/archive/${version}R.zip"; + hash = "sha256-nBLEK+T5n1CdZK2zvCWIhF2MxPmiAwL9l55a55yHtgU="; + }; - postFetch = '' - mkdir -p $out/share/fonts/{opentype,truetype,variable} - unzip -j $downloadedFile "*/OTF/*.otf" -d $out/share/fonts/opentype - unzip -j $downloadedFile "*/TTF/*.ttf" -d $out/share/fonts/truetype - unzip -j $downloadedFile "*/VAR/*.otf" -d $out/share/fonts/variable - ''; + installPhase = '' + runHook preInstall - sha256 = "1wxdinnliq0xqbjrs0sqykwaggkmyqawfq862d9xn05g1pnxda94"; + install -Dm444 OTF/*.otf -t $out/share/fonts/opentype + install -Dm444 TTF/*.ttf -t $out/share/fonts/truetype + install -Dm444 VAR/*.otf -t $out/share/fonts/variable + + runHook postInstall + ''; meta = with lib; { homepage = "https://adobe-fonts.github.io/source-sans/"; |