From 821e3c294ff20c6a82e93f7c2d30c52386b625f8 Mon Sep 17 00:00:00 2001 From: taku0 Date: Fri, 6 Oct 2017 23:28:28 +0900 Subject: icu: make 58.2 coexists with 59.1 --- pkgs/development/libraries/icu/58.nix | 14 ++++++++ pkgs/development/libraries/icu/59.nix | 4 +++ pkgs/development/libraries/icu/base.nix | 55 ++++++++++++++++++++++++++++++ pkgs/development/libraries/icu/default.nix | 53 ---------------------------- 4 files changed, 73 insertions(+), 53 deletions(-) create mode 100644 pkgs/development/libraries/icu/58.nix create mode 100644 pkgs/development/libraries/icu/59.nix create mode 100644 pkgs/development/libraries/icu/base.nix delete mode 100644 pkgs/development/libraries/icu/default.nix (limited to 'pkgs/development/libraries/icu') diff --git a/pkgs/development/libraries/icu/58.nix b/pkgs/development/libraries/icu/58.nix new file mode 100644 index 000000000000..e5b80f4b2700 --- /dev/null +++ b/pkgs/development/libraries/icu/58.nix @@ -0,0 +1,14 @@ +args @ { stdenv, fetchurl, fetchpatch, fixDarwinDylibNames }: +let + keywordFix = fetchurl { + url = "http://bugs.icu-project.org/trac/changeset/39484?format=diff"; + name = "icu-changeset-39484.diff"; + sha256 = "0hxhpgydalyxacaaxlmaddc1sjwh65rsnpmg0j414mnblq74vmm8"; + }; +in +import ./base.nix { + version = "58.2"; + sha256 = "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib"; + patches = [ keywordFix ]; + patchFlags = "-p4"; +} args diff --git a/pkgs/development/libraries/icu/59.nix b/pkgs/development/libraries/icu/59.nix new file mode 100644 index 000000000000..9ca66ca525fd --- /dev/null +++ b/pkgs/development/libraries/icu/59.nix @@ -0,0 +1,4 @@ +import ./base.nix { + version = "59.1"; + sha256 = "1zkmbg2932ggvpgjp8pys0cj6z8bw087y8858009shkrjfpzscki"; +} diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix new file mode 100644 index 000000000000..78e0c5740446 --- /dev/null +++ b/pkgs/development/libraries/icu/base.nix @@ -0,0 +1,55 @@ +{ version, sha256, patches ? [], patchFlags ? "" }: +{ stdenv, fetchurl, fetchpatch, fixDarwinDylibNames }: + +let + pname = "icu4c"; +in +stdenv.mkDerivation { + name = pname + "-" + version; + + src = fetchurl { + url = "http://download.icu-project.org/files/${pname}/${version}/${pname}-" + + (stdenv.lib.replaceChars ["."] ["_"] version) + "-src.tgz"; + inherit sha256; + }; + + outputs = [ "out" "dev" ]; + outputBin = "dev"; + + # FIXME: This fixes dylib references in the dylibs themselves, but + # not in the programs in $out/bin. + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + + postUnpack = '' + sourceRoot=''${sourceRoot}/source + echo Source root reset to ''${sourceRoot} + ''; + + inherit patchFlags patches; + + preConfigure = '' + sed -i -e "s|/bin/sh|${stdenv.shell}|" configure + '' + stdenv.lib.optionalString stdenv.isArm '' + # From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch + sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux + ''; + + configureFlags = "--disable-debug" + + stdenv.lib.optionalString (stdenv.isFreeBSD || stdenv.isDarwin) " --enable-rpath"; + + # remove dependency on bootstrap-tools in early stdenv build + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc + ''; + + postFixup = ''moveToOutput lib/icu "$dev" ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Unicode and globalization support library"; + homepage = http://site.icu-project.org/; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix deleted file mode 100644 index 5f81ae694cba..000000000000 --- a/pkgs/development/libraries/icu/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ stdenv, fetchurl, fetchpatch, fixDarwinDylibNames }: - -let - pname = "icu4c"; - version = "59.1"; -in -stdenv.mkDerivation { - name = pname + "-" + version; - - src = fetchurl { - url = "http://download.icu-project.org/files/${pname}/${version}/${pname}-" - + (stdenv.lib.replaceChars ["."] ["_"] version) + "-src.tgz"; - sha256 = "1zkmbg2932ggvpgjp8pys0cj6z8bw087y8858009shkrjfpzscki"; - }; - - outputs = [ "out" "dev" ]; - outputBin = "dev"; - - # FIXME: This fixes dylib references in the dylibs themselves, but - # not in the programs in $out/bin. - buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - - postUnpack = '' - sourceRoot=''${sourceRoot}/source - echo Source root reset to ''${sourceRoot} - ''; - - preConfigure = '' - sed -i -e "s|/bin/sh|${stdenv.shell}|" configure - '' + stdenv.lib.optionalString stdenv.isArm '' - # From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch - sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux - ''; - - configureFlags = "--disable-debug" + - stdenv.lib.optionalString (stdenv.isFreeBSD || stdenv.isDarwin) " --enable-rpath"; - - # remove dependency on bootstrap-tools in early stdenv build - postInstall = stdenv.lib.optionalString stdenv.isDarwin '' - sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc - ''; - - postFixup = ''moveToOutput lib/icu "$dev" ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Unicode and globalization support library"; - homepage = http://site.icu-project.org/; - maintainers = with maintainers; [ raskin ]; - platforms = platforms.all; - }; -} -- cgit 1.4.1