From 3fe50c407d2e2793a736a0ff65476211bd1942e9 Mon Sep 17 00:00:00 2001 From: SCOTT-HAMILTON Date: Sun, 14 Feb 2021 20:48:51 +0100 Subject: [PATCH] fontfor: init at 0.3.1 --- pkgs/tools/misc/fontfor/default.nix | 41 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/tools/misc/fontfor/default.nix diff --git a/pkgs/tools/misc/fontfor/default.nix b/pkgs/tools/misc/fontfor/default.nix new file mode 100644 index 000000000000..c77809ece1ed --- /dev/null +++ b/pkgs/tools/misc/fontfor/default.nix @@ -0,0 +1,41 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, cmake +, pkg-config +, expat +, fontconfig +, freetype +}: + +rustPlatform.buildRustPackage rec { + pname = "fontfor"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "7sDream"; + repo = "fontfor"; + rev = "v${version}"; + sha256 = "1b07hd41blwsnb91vh2ax9zigm4lh8n0i5man0cjmxhavvbfy12b"; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + buildInputs = [ + expat + fontconfig + freetype + ]; + + cargoSha256 = "194c4knjfb3pnpvw3zl1srwx3q1jp6z78vzln0q2mk5nf0a35yy0"; + + meta = with lib; { + description = "Find fonts which can show a specified character and preview them in browser"; + homepage = "https://github.com/7sDream/fontfor"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ shamilton ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5fb8b0cd463b..a4bb9f77890f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4228,6 +4228,8 @@ in python = python2; }; + fontfor = callPackage ../tools/misc/fontfor { }; + fontforge = lowPrio (callPackage ../tools/misc/fontforge { inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; python = python3;