···11-{ lib, stdenv, buildPackages
22-, fetchurl, linuxHeaders, libiconvReal
11+{ lib
22+, stdenv
33+, buildPackages
44+, fetchurl
55+, linuxHeaders
66+, libiconvReal
37, extraConfig ? ""
48}:
59610let
1111+ isCross = (stdenv.buildPlatform != stdenv.hostPlatform);
712 configParser = ''
813 function parseconfig {
914 set -x
···3641 UCLIBC_HAS_RPC y
3742 DO_C99_MATH y
3843 UCLIBC_HAS_PROGRAM_INVOCATION_NAME y
4444+ UCLIBC_HAS_RESOLVER_SUPPORT y
3945 UCLIBC_SUSV4_LEGACY y
4046 UCLIBC_HAS_THREADS_NATIVE y
4147 KERNEL_HEADERS "${linuxHeaders}/include"
4248 '' + lib.optionalString (stdenv.hostPlatform.gcc.float or "" == "soft") ''
4349 UCLIBC_HAS_FPU n
4444- '' + lib.optionalString (stdenv.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
5050+ '' + lib.optionalString (stdenv.isAarch32 && isCross) ''
4551 CONFIG_ARM_EABI y
4652 ARCH_WANTS_BIG_ENDIAN n
4753 ARCH_BIG_ENDIAN n
···4955 ARCH_LITTLE_ENDIAN y
5056 UCLIBC_HAS_FPU n
5157 '';
5252-5353- version = "1.0.38";
5458in
5555-5656-stdenv.mkDerivation {
5959+stdenv.mkDerivation rec {
5760 pname = "uclibc-ng";
5858- inherit version;
6161+ version = "1.0.41";
59626063 src = fetchurl {
6161- url = "https://downloads.uclibc-ng.org/releases/${version}/uClibc-ng-${version}.tar.bz2";
6262- # from "${url}.sha256";
6363- sha256 = "sha256-7wexvOOfDpIsM3XcdhHxESz7GsOW+ZkiA0dfiN5rHrU=";
6464+ url = "https://downloads.uclibc-ng.org/releases/${version}/uClibc-ng-${version}.tar.xz";
6565+ sha256 = "sha256-syqSoCGNlZItaXZGTm71Hi66z7zbYFggRY2du4ph4CU=";
6466 };
65676668 # 'ftw' needed to build acl, a coreutils dependency
···7880 hardeningDisable = [ "stackprotector" ];
79818082 # Cross stripping hurts.
8181- dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
8383+ dontStrip = isCross;
82848385 depsBuildBuild = [ buildPackages.stdenv.cc ];
8486···8688 "ARCH=${stdenv.hostPlatform.linuxArch}"
8789 "TARGET_ARCH=${stdenv.hostPlatform.linuxArch}"
8890 "VERBOSE=1"
8989- ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
9191+ ] ++ lib.optionals (isCross) [
9092 "CROSS=${stdenv.cc.targetPrefix}"
9193 ];
9294···9597 enableParallelBuilding = false;
96989799 installPhase = ''
100100+ runHook preInstall
101101+98102 mkdir -p $out
99103 make $makeFlags PREFIX=$out VERBOSE=1 install
100104 (cd $out/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
101105 # libpthread.so may not exist, so I do || true
102106 sed -i s@/lib/@$out/lib/@g $out/lib/libc.so $out/lib/libpthread.so || true
107107+108108+ runHook postInstall
103109 '';
104110111111+ meta = with lib; {
112112+ homepage = "https://uclibc-ng.org";
113113+ description = "Embedded C library";
114114+ longDescription = ''
115115+ uClibc-ng is a small C library for developing embedded Linux systems. It
116116+ is much smaller than the GNU C Library, but nearly all applications
117117+ supported by glibc also work perfectly with uClibc-ng.
118118+119119+ Porting applications from glibc to uClibc-ng typically involves just
120120+ recompiling the source code. uClibc-ng supports shared libraries and
121121+ threading. It currently runs on standard Linux and MMU-less (also known as
122122+ uClinux) systems with support for Aarch64, Alpha, ARC, ARM, AVR32,
123123+ Blackfin, CRIS, C-Sky, C6X, FR-V, H8/300, HPPA, i386, IA64, KVX, LM32,
124124+ M68K/Coldfire, Metag, Microblaze, MIPS, MIPS64, NDS32, NIOS2, OpenRISC,
125125+ PowerPC, RISCV64, Sparc, Sparc64, SuperH, Tile, X86_64 and XTENSA
126126+ processors. Alpha, FR-V, HPPA, IA64, LM32, NIOS2, Tile and Sparc64 are
127127+ experimental and need more testing.
128128+ '';
129129+ license = licenses.lgpl2Plus;
130130+ maintainers = with maintainers; [ rasendubi AndersonTorres ];
131131+ platforms = platforms.linux;
132132+ badPlatforms = platforms.aarch64;
133133+ };
134134+105135 passthru = {
106106- # Derivations may check for the existance of this attribute, to know what to link to.
136136+ # Derivations may check for the existance of this attribute, to know what to
137137+ # link to.
107138 libiconv = libiconvReal;
108139 };
109140110110- meta = with lib; {
111111- homepage = "https://uclibc-ng.org";
112112- description = "A small implementation of the C library";
113113- maintainers = with maintainers; [ rasendubi ];
114114- license = licenses.lgpl2;
115115- platforms = platforms.linux;
116116- broken = stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64;
117117- };
118141}
+10-6
pkgs/top-level/all-packages.nix
···11/* The top-level package collection of nixpkgs.
22- * It is sorted by categories corresponding to the folder names
33- * in the /pkgs folder. Inside the categories packages are roughly
44- * sorted by alphabet, but strict sorting has been long lost due
55- * to merges. Please use the full-text search of your editor. ;)
22+ * It is sorted by categories corresponding to the folder names in the /pkgs
33+ * folder. Inside the categories packages are roughly sorted by alphabet, but
44+ * strict sorting has been long lost due to merges. Please use the full-text
55+ * search of your editor. ;)
66 * Hint: ### starts category names.
77 */
88{ lib, noSysDirs, config, overlays }:
···2407224072 buildBarebox
2407324073 bareboxTools;
24074240742407524075- uclibc = callPackage ../os-specific/linux/uclibc { };
2407524075+ uclibc-ng = callPackage ../os-specific/linux/uclibc-ng { };
24076240762407724077- uclibcCross = callPackage ../os-specific/linux/uclibc {
2407724077+ uclibc-ng-cross = callPackage ../os-specific/linux/uclibc-ng {
2407824078 stdenv = crossLibcStdenv;
2407924079 };
2408024080+2408124081+ # Aliases
2408224082+ uclibc = uclibc-ng;
2408324083+ uclibcCross = uclibc-ng-cross;
24080240842408124085 eudev = callPackage ../os-specific/linux/eudev { util-linux = util-linuxMinimal; };
2408224086