about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix')
-rw-r--r--nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix b/nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix
new file mode 100644
index 000000000000..86a45b80efd7
--- /dev/null
+++ b/nixpkgs/pkgs/data/fonts/source-serif-pro/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchzip }:
+
+let
+  version = "3.000";
+in fetchzip {
+  name = "source-serif-pro-${version}";
+
+  url = "https://github.com/adobe-fonts/source-serif-pro/releases/download/${version}R/source-serif-pro-${version}R.zip";
+
+  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
+  '';
+
+  sha256 = "06yp8y79mqk02qzp81h8zkmzqqlhicgrkwmzkd0bm338xh8grsiz";
+
+  meta = with lib; {
+    homepage = "https://adobe-fonts.github.io/source-serif-pro/";
+    description = "A set of OpenType fonts to complement Source Sans Pro";
+    license = licenses.ofl;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ttuegel ];
+  };
+}
+