2024-07-31 10:19:44 +00:00
|
|
|
{
|
|
|
|
fetchurl,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
libiconv,
|
|
|
|
updateAutotoolsGnuConfigScriptsHook,
|
|
|
|
darwin
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
|
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
|
|
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
|
|
|
# files.
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libunistring";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-07-31 10:19:44 +00:00
|
|
|
url = "mirror://gnu/libunistring/libunistring-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-/W1WYvpwZIfEg0mnWLV7wUnOlOxsMGJOyf3Ec86rvI4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"info"
|
|
|
|
"doc"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
strictDeps = true;
|
2024-09-26 11:04:55 +00:00
|
|
|
propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv;
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-07-31 10:19:44 +00:00
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
configureFlags = [ "--with-libiconv-prefix=${libiconv}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
/*
|
|
|
|
This seems to cause several random failures like these, which I assume
|
|
|
|
is because of bad or missing target dependencies in their build system:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
./unistdio/test-u16-vasnprintf2.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
|
|
|
|
FAIL unistdio/test-u16-vasnprintf2.sh (exit status: 1)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
FAIL: unistdio/test-u16-vasnprintf3.sh
|
|
|
|
======================================
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
./unistdio/test-u16-vasnprintf3.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
|
|
|
|
FAIL unistdio/test-u16-vasnprintf3.sh (exit status: 1)
|
2020-04-24 23:36:52 +00:00
|
|
|
*/
|
2023-02-16 17:41:37 +00:00
|
|
|
enableParallelChecking = false;
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.gnu.org/software/libunistring/";
|
|
|
|
|
|
|
|
description = "Unicode string library";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
This library provides functions for manipulating Unicode strings
|
|
|
|
and for manipulating C strings according to the Unicode
|
|
|
|
standard.
|
|
|
|
|
|
|
|
GNU libunistring is for you if your application involves
|
|
|
|
non-trivial text processing, such as upper/lower case
|
|
|
|
conversions, line breaking, operations on words, or more
|
|
|
|
advanced analysis of text. Text provided by the user can, in
|
|
|
|
general, contain characters of all kinds of scripts. The text
|
|
|
|
processing functions provided by this library handle all scripts
|
|
|
|
and all languages.
|
|
|
|
|
|
|
|
libunistring is for you if your application already uses the ISO
|
|
|
|
C / POSIX <ctype.h>, <wctype.h> functions and the text it
|
|
|
|
operates on is provided by the user and can be in any language.
|
|
|
|
|
|
|
|
libunistring is also for you if your application uses Unicode
|
|
|
|
strings as internal in-memory representation.
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
maintainers = [ ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-07-31 10:19:44 +00:00
|
|
|
})
|