about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libschrift/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libschrift/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libschrift/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libschrift/default.nix b/nixpkgs/pkgs/development/libraries/libschrift/default.nix
new file mode 100644
index 000000000000..3781d9346125
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libschrift/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libschrift";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "tomolt";
+    repo = pname;
+    rev = "c6d20460d6e602e8829d3a227fd7be4c4c3cda86";
+    hash = "sha256-BuTmWaWFZ0DXujlbhbmK3Woit8fR9F4DWmKszHX6gOI=";
+  };
+
+  postPatch = ''
+    substituteInPlace config.mk \
+      --replace "PREFIX = /usr/local" "PREFIX = $out"
+  '';
+
+  makeFlags = [ "libschrift.a" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/tomolt/libschrift";
+    description = "A lightweight TrueType font rendering library";
+    license = licenses.isc;
+    platforms = platforms.all;
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}