biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / inputmethods / m17n-lib / otf.nix
blobd700dfb3ebd95bcabab6c2a7d4be7c01d2ae31c8
1 { lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, xorg, freetype }:
3 stdenv.mkDerivation rec {
4   pname = "libotf";
5   version = "0.9.16";
7   src = fetchurl {
8     url = "https://download.savannah.gnu.org/releases/m17n/${pname}-${version}.tar.gz";
9     sha256 = "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8";
10   };
12   patches = [
13     # https://salsa.debian.org/debian/libotf/-/tree/master/debian/patches
14     # Fix cross-compilation
15     (fetchpatch {
16       url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0002-use-pkg-config-not-freetype-config.patch";
17       sha256 = "sha256-VV9iGoNWIEie6UiLLTJBD+zxpvj0acgqkcBeAN1V6Kc=";
18     })
19     # these 2 are required by the above patch
20     (fetchpatch {
21       url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-do-not-add-flags-for-required-packages-to-pc-file.patch";
22       sha256 = "sha256-3kzqNPAHNVJQ1F4fyifq3AqLdChWli/k7wOq+ha+iDs=";
23     })
24     (fetchpatch {
25       url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-libotf-config-modify-to-support-multi-arch.patch";
26       sha256 = "sha256-SUlI87h+MtYWWtrAegzAnSds8JhxZwTJltDcj/se/Qc=";
27     })
28   ];
30   strictDeps = true;
32   nativeBuildInputs = [ pkg-config autoreconfHook ];
34   buildInputs = [ xorg.libXaw freetype ];
36   outputs = [ "out" "dev" ];
38   postInstall = ''
39     mkdir -p $dev/bin
40     mv $out/bin/libotf-config $dev/bin/
41     substituteInPlace $dev/bin/libotf-config \
42       --replace "pkg-config" "${pkg-config}/bin/pkg-config"
43   '';
45   meta = {
46     homepage = "https://www.nongnu.org/m17n/";
47     description = "Multilingual text processing library (libotf)";
48     license = lib.licenses.lgpl21Plus;
49     platforms = lib.platforms.linux;
50     maintainers = with lib.maintainers; [ bendlas ];
51   };