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"; + }; +}