summary refs log tree commit diff
path: root/nix/pilfont.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/pilfont.nix')
-rw-r--r--nix/pilfont.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nix/pilfont.nix b/nix/pilfont.nix
new file mode 100644
index 0000000..af4ebc2
--- /dev/null
+++ b/nix/pilfont.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, python }:
+
+let
+  pythonEnv = python.withPackages (p: [ p.pillow ]);
+in
+
+stdenv.mkDerivation rec {
+  pname = "pilfont";
+  version = "unstable-2019-03-07";
+
+  src = fetchurl {
+    url = "https://raw.githubusercontent.com/python-pillow/pillow-scripts/b24479cf88d2d9b2cb5518971f3949f318f5c40e/Scripts/pilfont.py";
+    sha256 = "15my6380scmni5r2bnrkjgqqf3r38r275h91ygmi7a0935987n13";
+  };
+
+  dontUnpack = true;
+
+  buildInputs = [ pythonEnv ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -Dm755 $src $out/bin/pilfont
+  '';
+
+  meta = {
+    description = "PIL raster font compiler";
+    inherit (python.pkgs.pillow.meta) license;
+    homepage = "https://github.com/python-pillow/pillow-scripts";
+  };
+}