From 30d7e628808c203a13d6d1752a6fc6596d295b7f Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 17 Nov 2023 12:22:38 -0700 Subject: [PATCH] pkgs/ttfs: init --- flake.nix | 1 + hosts/europa/default.nix | 1 + pkgs/ttfs.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 pkgs/ttfs.nix diff --git a/flake.nix b/flake.nix index 2ff9eff..7678da7 100644 --- a/flake.nix +++ b/flake.nix @@ -282,6 +282,7 @@ isUnstable = true; }; femtolisp = upkgs.callPackage ./pkgs/femtolisp.nix { }; + ttfs = upkgs.callPackage ./pkgs/ttfs.nix { }; fyne = upkgs.callPackage ./pkgs/fyne.nix { inherit upkgs; }; flake-warn = spkgs.callPackage ./pkgs/flake-warn.nix { inherit spkgs; }; diff --git a/hosts/europa/default.nix b/hosts/europa/default.nix index d0ac286..d1de974 100644 --- a/hosts/europa/default.nix +++ b/hosts/europa/default.nix @@ -369,6 +369,7 @@ in #yubioath-flutter zig + (callPackage ../../pkgs/ttfs.nix { }) (callPackage ../../pkgs/clilol.nix { }) (callPackage ../../pkgs/iamb.nix { }) (callPackage ../../pkgs/kobuddy.nix { diff --git a/pkgs/ttfs.nix b/pkgs/ttfs.nix new file mode 100644 index 0000000..a30ea4d --- /dev/null +++ b/pkgs/ttfs.nix @@ -0,0 +1,40 @@ +{ stdenv +, lib +, fetchgit +, gnumake +, pkg-config +, SDL2 +, SDL2_ttf +, +}: +stdenv.mkDerivation { + pname = "ttfs"; + version = "2023-03-27"; + + src = fetchgit { + url = "https://git.sr.ht/~ft/ttfs"; + rev = "c672c1919865fe26e2bd50ea31920117d0db6b09"; + hash = "sha256-VHUlfgF8jzGmLO2gxuHFDoKqF92c4Tae7x+8KK1xnug="; + }; + + buildInputs = [ gnumake ]; + + nativeBuildInputs = [ + pkg-config + SDL2 + SDL2_ttf + ]; + + installPhase = '' + mkdir -p $out/bin + cp ttfs $out/bin + ''; + + meta = { + description = "TTF/OTF/BDF→Plan9Font converter"; + homepage = "https://git.sr.ht/~ft/ttfs"; + license = lib.licenses.publicDomain; + maintainer = with lib.maintainers; [ qbit ]; + mainProgram = "ttfs"; + }; +}