From 35aea2bff587b681754f90d6ba5b39d62ae0f96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Thu, 17 Dec 2020 08:01:03 +0100 Subject: [PATCH] libdatrie: 0.2.12 -> 2019-12-20 The last official release is currently blocking pango on cross-compiles, also the package has moved to autotools. --- .../libraries/libdatrie/default.nix | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/libdatrie/default.nix b/pkgs/development/libraries/libdatrie/default.nix index 0d3faf69e3b..168773662f6 100644 --- a/pkgs/development/libraries/libdatrie/default.nix +++ b/pkgs/development/libraries/libdatrie/default.nix @@ -1,23 +1,40 @@ -{ stdenv, fetchurl, makeWrapper, installShellFiles, pkg-config, libiconv }: +{ stdenv, fetchFromGitHub, makeWrapper +, autoreconfHook, autoconf-archive +, installShellFiles, libiconv }: stdenv.mkDerivation rec { - pname = "libdatrie"; - version = "0.2.12"; - src = fetchurl { - url = "https://github.com/tlwg/libdatrie/releases/download/v${version}/libdatrie-${version}.tar.xz"; - sha256 = "0jdi01pcxv0b24zbjy7zahawsqqqw4mv94f2yy01zh4n796wqba5"; + pname = "libdatrie"; + version = "2019-12-20"; + + src = fetchFromGitHub { + owner = "tlwg"; + repo = "libdatrie"; + rev = "d1db08ac1c76f54ba23d63665437473788c999f3"; + sha256 = "03dc363259iyiidrgadzc7i03mmfdj8h78j82vk6z53w6fxq5zxc"; }; - nativeBuildInputs = [ installShellFiles pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + autoconf-archive + installShellFiles + ]; buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv; + preAutoreconf = let + reports = "https://github.com/tlwg/libdatrie/issues"; + in + '' + sed -i -e "/AC_INIT/,+3d" configure.ac + sed -i "5iAC_INIT(${pname},${version},[${reports}])" configure.ac + ''; + postInstall = '' installManPage man/trietool.1 ''; - meta = with stdenv.lib;{ + meta = with stdenv.lib; { homepage = "https://linux.thai.net/~thep/datrie/datrie.html"; description = "This is an implementation of double-array structure for representing trie"; license = licenses.lgpl21Plus;