lol

hurd: cleanup unmaintained target

This has been not touched in 6 years. Let's remove it to cause less
problems when adding new cross-compiling infrastructure.
This also simplify gcc significantly.

+34 -906
+1 -1
lib/systems/doubles.nix
··· 36 36 cygwin = filterDoubles predicates.isCygwin; 37 37 darwin = filterDoubles predicates.isDarwin; 38 38 freebsd = filterDoubles predicates.isFreeBSD; 39 - # Should be better, but MinGW is unclear, and HURD is bit-rotted. 39 + # Should be better, but MinGW is unclear. 40 40 gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); 41 41 illumos = filterDoubles predicates.isSunOS; 42 42 linux = filterDoubles predicates.isLinux;
+1 -1
lib/systems/for-meta.nix
··· 20 20 cygwin = [ patterns.isCygwin ]; 21 21 darwin = [ patterns.isDarwin ]; 22 22 freebsd = [ patterns.isFreeBSD ]; 23 - # Should be better, but MinGW is unclear, and HURD is bit-rotted. 23 + # Should be better, but MinGW is unclear. 24 24 gnu = [ 25 25 { kernel = parse.kernels.linux; abi = abis.gnu; } 26 26 { kernel = parse.kernels.linux; abi = abis.gnueabi; }
+1 -2
lib/systems/inspect.nix
··· 27 27 28 28 isBSD = { kernel = { families = { inherit (kernelFamilies) bsd; }; }; }; 29 29 isDarwin = { kernel = { families = { inherit (kernelFamilies) darwin; }; }; }; 30 - isUnix = [ isBSD isDarwin isLinux isSunOS isHurd isCygwin ]; 30 + isUnix = [ isBSD isDarwin isLinux isSunOS isCygwin ]; 31 31 32 32 isMacOS = { kernel = kernels.macos; }; 33 33 isiOS = { kernel = kernels.ios; }; 34 34 isLinux = { kernel = kernels.linux; }; 35 35 isSunOS = { kernel = kernels.solaris; }; 36 36 isFreeBSD = { kernel = kernels.freebsd; }; 37 - isHurd = { kernel = kernels.hurd; }; 38 37 isNetBSD = { kernel = kernels.netbsd; }; 39 38 isOpenBSD = { kernel = kernels.openbsd; }; 40 39 isWindows = { kernel = kernels.windows; };
-3
lib/systems/parse.nix
··· 172 172 macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; }; 173 173 ios = { execFormat = macho; families = { inherit darwin; }; }; 174 174 freebsd = { execFormat = elf; families = { inherit bsd; }; }; 175 - hurd = { execFormat = elf; families = { }; }; 176 175 linux = { execFormat = elf; families = { }; }; 177 176 netbsd = { execFormat = elf; families = { inherit bsd; }; }; 178 177 none = { execFormat = unknown; families = { }; }; ··· 259 258 "2" = # We only do 2-part hacks for things Nix already supports 260 259 if elemAt l 1 == "cygwin" 261 260 then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; } 262 - else if elemAt l 1 == "gnu" 263 - then { cpu = elemAt l 0; kernel = "hurd"; abi = "gnu"; } 264 261 else { cpu = elemAt l 0; kernel = elemAt l 1; }; 265 262 "3" = # Awkwards hacks, beware! 266 263 if elemAt l 1 == "apple"
+1 -1
lib/tests/systems.nix
··· 22 22 cygwin = assertTrue (mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ]); 23 23 darwin = assertTrue (mseteq darwin [ "x86_64-darwin" ]); 24 24 freebsd = assertTrue (mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ]); 25 - gnu = assertTrue (mseteq gnu (linux /* ++ hurd ++ kfreebsd ++ ... */)); 25 + gnu = assertTrue (mseteq gnu (linux /* ++ kfreebsd ++ ... */)); 26 26 illumos = assertTrue (mseteq illumos [ "x86_64-solaris" ]); 27 27 linux = assertTrue (mseteq linux [ "i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mipsel-linux" ]); 28 28 netbsd = assertTrue (mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ]);
+3 -47
pkgs/development/compilers/gcc/4.8/default.nix
··· 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 28 27 , # Strip kills static libs of other archs (hence no cross) 29 28 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 30 29 , gnused ? null ··· 181 180 libc_dev = stdenv.cc.libc_dev; 182 181 183 182 postPatch = 184 - if targetPlatform.isHurd 185 - then 186 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 187 - # in glibc, so add the right `-I' flags to the default spec string. 188 - assert libcCross != null -> libpthreadCross != null; 189 - let 190 - libc = if libcCross != null then libcCross else stdenv.glibc; 191 - gnu_h = "gcc/config/gnu.h"; 192 - extraCPPDeps = 193 - libc.propagatedBuildInputs 194 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 195 - ++ stdenv.lib.optional (libpthread != null) libpthread; 196 - extraCPPSpec = 197 - concatStrings (intersperse " " 198 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 199 - extraLibSpec = 200 - if libpthreadCross != null 201 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 202 - else "-L${libpthread}/lib"; 203 - in 204 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 205 - sed -i "${gnu_h}" \ 206 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 207 - 208 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 209 - sed -i "${gnu_h}" \ 210 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 211 - 212 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 213 - sed -i "${gnu_h}" \ 214 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 215 - '' 216 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 183 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 217 184 # On NixOS, use the right path to the dynamic linker instead of 218 185 # `/lib/ld*.so'. 219 186 let ··· 379 346 ++ optional langJava boehmgc 380 347 ++ optionals javaAwtGtk xlibs 381 348 ++ optionals javaAwtGtk [ gmp mpfr ] 382 - ++ optional (libpthread != null) libpthread 383 - ++ optional (libpthreadCross != null) libpthreadCross 384 - 385 - # On GNU/Hurd glibc refers to Mach & Hurd 386 - # headers. 387 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 388 - libcCross.propagatedBuildInputs 389 349 )); 390 350 391 351 LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 392 352 ++ optional (zlib != null) zlib 393 353 ++ optional langJava boehmgc 394 354 ++ optionals javaAwtGtk xlibs 395 - ++ optionals javaAwtGtk [ gmp mpfr ] 396 - ++ optional (libpthread != null) libpthread) 355 + ++ optionals javaAwtGtk [ gmp mpfr ]) 397 356 ); 398 357 399 358 EXTRA_TARGET_FLAGS = optionals ··· 413 372 ] else [ 414 373 "-Wl,-rpath,${libcCross.out}/lib" 415 374 "-Wl,-rpath-link,${libcCross.out}/lib" 416 - ]) ++ optionals (libpthreadCross != null) [ 417 - "-L${libpthreadCross}/lib" 418 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 419 - ]); 375 + ])); 420 376 421 377 passthru = { 422 378 inherit langC langCC langObjC langObjCpp langFortran langGo version;
+3 -48
pkgs/development/compilers/gcc/4.9/default.nix
··· 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 28 27 , # Strip kills static libs of other archs (hence no cross) 29 28 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 30 29 , gnused ? null ··· 190 189 libc_dev = stdenv.cc.libc_dev; 191 190 192 191 postPatch = 193 - if targetPlatform.isHurd 194 - then 195 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 196 - # in glibc, so add the right `-I' flags to the default spec string. 197 - assert libcCross != null -> libpthreadCross != null; 198 - let 199 - libc = if libcCross != null then libcCross else stdenv.glibc; 200 - gnu_h = "gcc/config/gnu.h"; 201 - extraCPPDeps = 202 - libc.propagatedBuildInputs 203 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 204 - ++ stdenv.lib.optional (libpthread != null) libpthread; 205 - extraCPPSpec = 206 - concatStrings (intersperse " " 207 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 208 - extraLibSpec = 209 - if libpthreadCross != null 210 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 211 - else "-L${libpthread}/lib"; 212 - in 213 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 214 - sed -i "${gnu_h}" \ 215 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 216 - 217 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 218 - sed -i "${gnu_h}" \ 219 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 220 - 221 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 222 - sed -i "${gnu_h}" \ 223 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 224 - '' 225 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 192 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 226 193 # On NixOS, use the right path to the dynamic linker instead of 227 194 # `/lib/ld*.so'. 228 195 let ··· 401 368 ++ optional langJava boehmgc 402 369 ++ optionals javaAwtGtk xlibs 403 370 ++ optionals javaAwtGtk [ gmp mpfr ] 404 - ++ optional (libpthread != null) libpthread 405 - ++ optional (libpthreadCross != null) libpthreadCross 406 - 407 - # On GNU/Hurd glibc refers to Mach & Hurd 408 - # headers. 409 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 410 - libcCross.propagatedBuildInputs 411 371 )); 412 372 413 373 LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 414 374 ++ optional (zlib != null) zlib 415 375 ++ optional langJava boehmgc 416 376 ++ optionals javaAwtGtk xlibs 417 - ++ optionals javaAwtGtk [ gmp mpfr ] 418 - ++ optional (libpthread != null) libpthread) 419 - ); 377 + ++ optionals javaAwtGtk [ gmp mpfr ])); 420 378 421 379 EXTRA_TARGET_FLAGS = optionals 422 380 (targetPlatform != hostPlatform && libcCross != null) ··· 435 393 ] else [ 436 394 "-Wl,-rpath,${libcCross.out}/lib" 437 395 "-Wl,-rpath-link,${libcCross.out}/lib" 438 - ]) ++ optionals (libpthreadCross != null) [ 439 - "-L${libpthreadCross}/lib" 440 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 441 - ]); 396 + ])); 442 397 443 398 passthru = 444 399 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+4 -48
pkgs/development/compilers/gcc/5/default.nix
··· 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 28 27 , # Strip kills static libs of other archs (hence no cross) 29 28 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 30 29 , gnused ? null ··· 188 187 ''; 189 188 190 189 postPatch = 191 - if targetPlatform.isHurd 192 - then 193 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 194 - # in glibc, so add the right `-I' flags to the default spec string. 195 - assert libcCross != null -> libpthreadCross != null; 196 - let 197 - libc = if libcCross != null then libcCross else stdenv.glibc; 198 - gnu_h = "gcc/config/gnu.h"; 199 - extraCPPDeps = 200 - libc.propagatedBuildInputs 201 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 202 - ++ stdenv.lib.optional (libpthread != null) libpthread; 203 - extraCPPSpec = 204 - concatStrings (intersperse " " 205 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 206 - extraLibSpec = 207 - if libpthreadCross != null 208 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 209 - else "-L${libpthread}/lib"; 210 - in 211 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 212 - sed -i "${gnu_h}" \ 213 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 214 - 215 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 216 - sed -i "${gnu_h}" \ 217 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 218 - 219 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 220 - sed -i "${gnu_h}" \ 221 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 222 - '' 223 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 190 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 224 191 # On NixOS, use the right path to the dynamic linker instead of 225 192 # `/lib/ld*.so'. 226 193 let ··· 302 269 ] ++ 303 270 optional (libelf != null) "--with-libelf=${libelf}" ++ 304 271 optional (!(crossMingw && crossStageStatic)) 305 - "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++ 272 + "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++ 306 273 307 274 # Basic configuration 308 275 [ ··· 400 367 ++ optional langJava boehmgc 401 368 ++ optionals javaAwtGtk xlibs 402 369 ++ optionals javaAwtGtk [ gmp mpfr ] 403 - ++ optional (libpthread != null) libpthread 404 - ++ optional (libpthreadCross != null) libpthreadCross 405 - 406 - # On GNU/Hurd glibc refers to Mach & Hurd 407 - # headers. 408 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 409 - libcCross.propagatedBuildInputs 410 370 )); 411 371 412 372 LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] ··· 414 374 ++ optional langJava boehmgc 415 375 ++ optionals javaAwtGtk xlibs 416 376 ++ optionals javaAwtGtk [ gmp mpfr ] 417 - ++ optional (libpthread != null) libpthread) 418 - ); 377 + )); 419 378 420 379 EXTRA_TARGET_FLAGS = optionals 421 380 (targetPlatform != hostPlatform && libcCross != null) ··· 434 393 ] else [ 435 394 "-Wl,-rpath,${libcCross.out}/lib" 436 395 "-Wl,-rpath-link,${libcCross.out}/lib" 437 - ]) ++ optionals (libpthreadCross != null) [ 438 - "-L${libpthreadCross}/lib" 439 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 440 - ]); 396 + ])); 441 397 442 398 passthru = 443 399 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+3 -48
pkgs/development/compilers/gcc/6/default.nix
··· 24 24 , name ? "gcc" 25 25 , libcCross ? null 26 26 , crossStageStatic ? false 27 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 28 27 , # Strip kills static libs of other archs (hence no cross) 29 28 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 30 29 , gnused ? null ··· 192 191 ''; 193 192 194 193 postPatch = 195 - if targetPlatform.isHurd 196 - then 197 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 198 - # in glibc, so add the right `-I' flags to the default spec string. 199 - assert libcCross != null -> libpthreadCross != null; 200 - let 201 - libc = if libcCross != null then libcCross else stdenv.glibc; 202 - gnu_h = "gcc/config/gnu.h"; 203 - extraCPPDeps = 204 - libc.propagatedBuildInputs 205 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 206 - ++ stdenv.lib.optional (libpthread != null) libpthread; 207 - extraCPPSpec = 208 - concatStrings (intersperse " " 209 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 210 - extraLibSpec = 211 - if libpthreadCross != null 212 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 213 - else "-L${libpthread}/lib"; 214 - in 215 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 216 - sed -i "${gnu_h}" \ 217 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 218 - 219 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 220 - sed -i "${gnu_h}" \ 221 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 222 - 223 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 224 - sed -i "${gnu_h}" \ 225 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 226 - '' 227 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 194 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 228 195 # On NixOS, use the right path to the dynamic linker instead of 229 196 # `/lib/ld*.so'. 230 197 let ··· 408 375 ++ optional langJava boehmgc 409 376 ++ optionals javaAwtGtk xlibs 410 377 ++ optionals javaAwtGtk [ gmp mpfr ] 411 - ++ optional (libpthread != null) libpthread 412 - ++ optional (libpthreadCross != null) libpthreadCross 413 - 414 - # On GNU/Hurd glibc refers to Mach & Hurd 415 - # headers. 416 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 417 - libcCross.propagatedBuildInputs 418 378 )); 419 379 420 380 LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 421 381 ++ optional (zlib != null) zlib 422 382 ++ optional langJava boehmgc 423 383 ++ optionals javaAwtGtk xlibs 424 - ++ optionals javaAwtGtk [ gmp mpfr ] 425 - ++ optional (libpthread != null) libpthread) 426 - ); 384 + ++ optionals javaAwtGtk [ gmp mpfr ])); 427 385 428 386 EXTRA_TARGET_FLAGS = optionals 429 387 (targetPlatform != hostPlatform && libcCross != null) ··· 442 400 ] else [ 443 401 "-Wl,-rpath,${libcCross.out}/lib" 444 402 "-Wl,-rpath-link,${libcCross.out}/lib" 445 - ]) ++ optionals (libpthreadCross != null) [ 446 - "-L${libpthreadCross}/lib" 447 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 448 - ]); 403 + ])); 449 404 450 405 passthru = 451 406 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+3 -49
pkgs/development/compilers/gcc/7/default.nix
··· 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 21 20 , # Strip kills static libs of other archs (hence no cross) 22 21 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 23 22 , gnused ? null ··· 165 164 patchShebangs $configureScript 166 165 done 167 166 '' + ( 168 - if targetPlatform.isHurd 169 - then 170 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 171 - # in glibc, so add the right `-I' flags to the default spec string. 172 - assert libcCross != null -> libpthreadCross != null; 173 - let 174 - libc = if libcCross != null then libcCross else stdenv.glibc; 175 - gnu_h = "gcc/config/gnu.h"; 176 - extraCPPDeps = 177 - libc.propagatedBuildInputs 178 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 179 - ++ stdenv.lib.optional (libpthread != null) libpthread; 180 - extraCPPSpec = 181 - concatStrings (intersperse " " 182 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 183 - extraLibSpec = 184 - if libpthreadCross != null 185 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 186 - else "-L${libpthread}/lib"; 187 - in 188 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 189 - sed -i "${gnu_h}" \ 190 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 191 - 192 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 193 - sed -i "${gnu_h}" \ 194 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 195 - 196 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 197 - sed -i "${gnu_h}" \ 198 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 199 - '' 200 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 167 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 201 168 # On NixOS, use the right path to the dynamic linker instead of 202 169 # `/lib/ld*.so'. 203 170 let ··· 357 324 358 325 CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] 359 326 ++ optional (zlib != null) zlib 360 - ++ optional (libpthread != null) libpthread 361 - ++ optional (libpthreadCross != null) libpthreadCross 362 - 363 - # On GNU/Hurd glibc refers to Mach & Hurd 364 - # headers. 365 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 366 - libcCross.propagatedBuildInputs 367 327 )); 368 328 369 - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 370 - ++ optional (zlib != null) zlib 371 - ++ optional (libpthread != null) libpthread) 372 - ); 329 + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); 373 330 374 331 EXTRA_TARGET_FLAGS = optionals 375 332 (targetPlatform != hostPlatform && libcCross != null) ··· 388 345 ] else [ 389 346 "-Wl,-rpath,${libcCross.out}/lib" 390 347 "-Wl,-rpath-link,${libcCross.out}/lib" 391 - ]) ++ optionals (libpthreadCross != null) [ 392 - "-L${libpthreadCross}/lib" 393 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 394 - ]); 348 + ])); 395 349 396 350 passthru = 397 351 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+3 -49
pkgs/development/compilers/gcc/8/default.nix
··· 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 21 20 , # Strip kills static libs of other archs (hence no cross) 22 21 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 23 22 , gnused ? null ··· 160 159 patchShebangs $configureScript 161 160 done 162 161 '' + ( 163 - if targetPlatform.isHurd 164 - then 165 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 166 - # in glibc, so add the right `-I' flags to the default spec string. 167 - assert libcCross != null -> libpthreadCross != null; 168 - let 169 - libc = if libcCross != null then libcCross else stdenv.glibc; 170 - gnu_h = "gcc/config/gnu.h"; 171 - extraCPPDeps = 172 - libc.propagatedBuildInputs 173 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 174 - ++ stdenv.lib.optional (libpthread != null) libpthread; 175 - extraCPPSpec = 176 - concatStrings (intersperse " " 177 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 178 - extraLibSpec = 179 - if libpthreadCross != null 180 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 181 - else "-L${libpthread}/lib"; 182 - in 183 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 184 - sed -i "${gnu_h}" \ 185 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 186 - 187 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 188 - sed -i "${gnu_h}" \ 189 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 190 - 191 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 192 - sed -i "${gnu_h}" \ 193 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 194 - '' 195 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 162 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 196 163 # On NixOS, use the right path to the dynamic linker instead of 197 164 # `/lib/ld*.so'. 198 165 let ··· 346 313 347 314 CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] 348 315 ++ optional (zlib != null) zlib 349 - ++ optional (libpthread != null) libpthread 350 - ++ optional (libpthreadCross != null) libpthreadCross 351 - 352 - # On GNU/Hurd glibc refers to Mach & Hurd 353 - # headers. 354 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 355 - libcCross.propagatedBuildInputs 356 316 )); 357 317 358 - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 359 - ++ optional (zlib != null) zlib 360 - ++ optional (libpthread != null) libpthread) 361 - ); 318 + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); 362 319 363 320 EXTRA_TARGET_FLAGS = optionals 364 321 (targetPlatform != hostPlatform && libcCross != null) ··· 377 334 ] else [ 378 335 "-Wl,-rpath,${libcCross.out}/lib" 379 336 "-Wl,-rpath-link,${libcCross.out}/lib" 380 - ]) ++ optionals (libpthreadCross != null) [ 381 - "-L${libpthreadCross}/lib" 382 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 383 - ]); 337 + ])); 384 338 385 339 passthru = 386 340 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+3 -49
pkgs/development/compilers/gcc/snapshot/default.nix
··· 17 17 , name ? "gcc" 18 18 , libcCross ? null 19 19 , crossStageStatic ? false 20 - , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 21 20 , # Strip kills static libs of other archs (hence no cross) 22 21 stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform 23 22 , gnused ? null ··· 134 133 hardeningDisable = [ "format" ]; 135 134 136 135 postPatch = 137 - if targetPlatform.isHurd 138 - then 139 - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not 140 - # in glibc, so add the right `-I' flags to the default spec string. 141 - assert libcCross != null -> libpthreadCross != null; 142 - let 143 - libc = if libcCross != null then libcCross else stdenv.glibc; 144 - gnu_h = "gcc/config/gnu.h"; 145 - extraCPPDeps = 146 - libc.propagatedBuildInputs 147 - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross 148 - ++ stdenv.lib.optional (libpthread != null) libpthread; 149 - extraCPPSpec = 150 - concatStrings (intersperse " " 151 - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); 152 - extraLibSpec = 153 - if libpthreadCross != null 154 - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" 155 - else "-L${libpthread}/lib"; 156 - in 157 - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." 158 - sed -i "${gnu_h}" \ 159 - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' 160 - 161 - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." 162 - sed -i "${gnu_h}" \ 163 - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' 164 - 165 - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." 166 - sed -i "${gnu_h}" \ 167 - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' 168 - '' 169 - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then 136 + if targetPlatform != hostPlatform || stdenv.cc.libc != null then 170 137 # On NixOS, use the right path to the dynamic linker instead of 171 138 # `/lib/ld*.so'. 172 139 let ··· 314 281 315 282 CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] 316 283 ++ optional (zlib != null) zlib 317 - ++ optional (libpthread != null) libpthread 318 - ++ optional (libpthreadCross != null) libpthreadCross 319 - 320 - # On GNU/Hurd glibc refers to Mach & Hurd 321 - # headers. 322 - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) 323 - libcCross.propagatedBuildInputs 324 284 )); 325 285 326 - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] 327 - ++ optional (zlib != null) zlib 328 - ++ optional (libpthread != null) libpthread) 329 - ); 286 + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); 330 287 331 288 EXTRA_TARGET_FLAGS = optionals 332 289 (targetPlatform != hostPlatform && libcCross != null) ··· 345 302 ] else [ 346 303 "-Wl,-rpath,${libcCross.out}/lib" 347 304 "-Wl,-rpath-link,${libcCross.out}/lib" 348 - ]) ++ optionals (libpthreadCross != null) [ 349 - "-L${libpthreadCross}/lib" 350 - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" 351 - ]); 305 + ])); 352 306 353 307 passthru = 354 308 { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; };
+1 -8
pkgs/development/tools/misc/gdb/default.nix
··· 11 11 , pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null 12 12 , guile ? null 13 13 14 - # Additional dependencies for GNU/Hurd. 15 - , mig ? null, hurd ? null 16 - 17 14 }: 18 15 19 16 let ··· 21 18 version = "8.1.1"; 22 19 in 23 20 24 - assert targetPlatform.isHurd -> mig != null && hurd != null; 25 21 assert pythonSupport -> python != null; 26 22 27 23 stdenv.mkDerivation rec { ··· 38 34 patches = [ ./debug-info-from-env.patch ] 39 35 ++ stdenv.lib.optional stdenv.isDarwin ./darwin-target-match.patch; 40 36 41 - nativeBuildInputs = [ pkgconfig texinfo perl setupDebugInfoDirs ] 42 - # TODO(@Ericson2314) not sure if should be host or target 43 - ++ stdenv.lib.optional targetPlatform.isHurd mig; 37 + nativeBuildInputs = [ pkgconfig texinfo perl setupDebugInfoDirs ]; 44 38 45 39 buildInputs = [ ncurses readline gmp mpfr expat zlib guile ] 46 40 ++ stdenv.lib.optional pythonSupport python 47 - ++ stdenv.lib.optional targetPlatform.isHurd hurd 48 41 ++ stdenv.lib.optional doCheck dejagnu; 49 42 50 43 propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
-113
pkgs/os-specific/gnu/default.nix
··· 1 - # Packages that make up the GNU/Hurd operating system (aka. GNU). 2 - 3 - args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool 4 - , texinfo, glibcCross, hurdPartedCross, libuuid, samba 5 - , gccCrossStageStatic, gcc 6 - , pkgsi686Linux, newScope, config 7 - , targetPlatform, buildPlatform 8 - , overrides ? {} 9 - , buildPackages, pkgs 10 - }: 11 - 12 - with args; 13 - 14 - let 15 - callPackage = newScope gnu; 16 - 17 - forcedNativePackages = 18 - if stdenv.hostPlatform == stdenv.buildPlatform 19 - then pkgs 20 - else buildPackages; 21 - 22 - gnu = { 23 - hurdCross = forcedNativePackages.callPackage ./hurd { 24 - inherit fetchgit stdenv autoconf libtool texinfo 25 - glibcCross hurdPartedCross; 26 - inherit (gnu) machHeaders mig; 27 - libuuid = libuuid.crossDrv; 28 - automake = automake111x; 29 - headersOnly = false; 30 - cross = assert targetPlatform != buildPlatform; targetPlatform; 31 - gccCross = gcc; 32 - }; 33 - 34 - hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd { 35 - inherit fetchgit stdenv autoconf libtool texinfo glibcCross; 36 - inherit (gnu) machHeaders mig; 37 - hurdPartedCross = null; 38 - libuuid = null; 39 - automake = automake111x; 40 - headersOnly = false; 41 - cross = assert targetPlatform != buildPlatform; targetPlatform; 42 - 43 - # The "final" GCC needs glibc and the Hurd libraries (libpthread in 44 - # particular) so we first need an intermediate Hurd built with the 45 - # intermediate GCC. 46 - gccCross = gccCrossStageStatic; 47 - 48 - # This intermediate Hurd is only needed to build libpthread, which needs 49 - # libihash, and to build Parted, which needs libstore and 50 - # libshouldbeinlibc. 51 - buildTarget = "libihash libstore libshouldbeinlibc"; 52 - installTarget = "libihash-install libstore-install libshouldbeinlibc-install"; 53 - }; 54 - 55 - hurdHeaders = callPackage ./hurd { 56 - automake = automake111x; 57 - headersOnly = true; 58 - gccCross = null; 59 - glibcCross = null; 60 - libuuid = null; 61 - hurdPartedCross = null; 62 - }; 63 - 64 - libpthreadHeaders = callPackage ./libpthread { 65 - headersOnly = true; 66 - hurd = null; 67 - }; 68 - 69 - libpthreadCross = forcedNativePackages.callPackage ./libpthread { 70 - inherit fetchgit stdenv autoconf automake libtool glibcCross; 71 - inherit (gnu) machHeaders hurdHeaders; 72 - hurd = gnu.hurdCrossIntermediate; 73 - gccCross = gccCrossStageStatic; 74 - cross = assert targetPlatform != buildPlatform; targetPlatform; 75 - }; 76 - 77 - # In theory GNU Mach doesn't have to be cross-compiled. However, since it 78 - # has to be built for i586 (it doesn't work on x86_64), one needs a cross 79 - # compiler for that host. 80 - mach = callPackage ./mach { 81 - automake = automake111x; 82 - }; 83 - 84 - machHeaders = callPackage ./mach { 85 - automake = automake111x; 86 - headersOnly = true; 87 - mig = null; 88 - }; 89 - 90 - mig = callPackage ./mig { 91 - # Build natively, but force use of a 32-bit environment because we're 92 - # targeting `i586-pc-gnu'. 93 - stdenv = pkgsi686Linux.stdenv; 94 - }; 95 - 96 - # XXX: Use this one for its `.crossDrv'. Using the one above from 97 - # `x86_64-linux' leads to building a different cross-toolchain because of 98 - # the `forceSystem'. 99 - mig_raw = callPackage ./mig {}; 100 - 101 - smbfs = callPackage ./smbfs { 102 - hurd = gnu.hurdCross; 103 - }; 104 - 105 - unionfs = callPackage ./unionfs { 106 - hurd = gnu.hurdCross; 107 - }; 108 - } 109 - 110 - # Allow callers to override elements of this attribute set. 111 - // overrides; 112 - 113 - in gnu # we trust!
-91
pkgs/os-specific/gnu/hurd/default.nix
··· 1 - { fetchgit, stdenv, autoconf, automake, libtool, texinfo 2 - , machHeaders, mig, headersOnly ? true 3 - , cross ? null, gccCross ? null, glibcCross ? null 4 - , hurdPartedCross ? null, libuuid ? null 5 - , buildTarget ? "all", installTarget ? "install" }: 6 - 7 - assert (cross != null) -> (gccCross != null); 8 - assert (hurdPartedCross != null) -> (libuuid != null); 9 - 10 - let 11 - # Unfortunately we can't use `master@{DATE}', see 12 - # <http://www.bramschoenmakers.nl/en/node/645>. 13 - date = "20111115"; 14 - rev = "969fbb646ffd89a482302e303eaded79781c3331"; 15 - suffix = if headersOnly 16 - then "-headers" 17 - else (if buildTarget != "all" 18 - then "-minimal" 19 - else ""); 20 - in 21 - stdenv.mkDerivation ({ 22 - name = "hurd${suffix}-${date}"; 23 - 24 - src = fetchgit { 25 - url = "git://git.sv.gnu.org/hurd/hurd.git"; 26 - sha256 = "b7f57ec2c6dcaf35ec03fb7979eb5506180ce4c6e2edf60a587f12ac5b11f004"; 27 - inherit rev; 28 - }; 29 - 30 - buildInputs = [ autoconf automake libtool texinfo mig ] 31 - ++ stdenv.lib.optional (hurdPartedCross != null) hurdPartedCross 32 - ++ stdenv.lib.optional (libuuid != null) libuuid 33 - ++ stdenv.lib.optional (gccCross != null) gccCross 34 - ++ stdenv.lib.optional (glibcCross != null) glibcCross; 35 - 36 - propagatedBuildInputs = [ machHeaders ]; 37 - 38 - configureFlags = stdenv.lib.optionals headersOnly [ "--build=i586-pc-gnu" ] 39 - ++ (if hurdPartedCross != null 40 - then [ "--with-parted" ] 41 - else [ "--without-parted" ]); 42 - 43 - # Use `preConfigure' only for `autoreconf', so that users know they can 44 - # simply clear it when the autoconf phase is unneeded. 45 - preConfigure = "autoreconf -vfi"; 46 - 47 - postConfigure = 48 - '' echo "removing \`-o root' from makefiles..." 49 - for mf in {utils,daemons}/Makefile 50 - do 51 - sed -i "$mf" -e's/-o root//g' 52 - done 53 - ''; 54 - 55 - # Not needed after https://github.com/NixOS/nixpkgs/pull/43833 56 - dontPatchShebangs = stdenv.hostPlatform != stdenv.buildPlatform; 57 - 58 - meta = { 59 - description = "The GNU Hurd, GNU project's replacement for the Unix kernel"; 60 - 61 - longDescription = 62 - '' The GNU Hurd is the GNU project's replacement for the Unix kernel. 63 - It is a collection of servers that run on the Mach microkernel to 64 - implement file systems, network protocols, file access control, and 65 - other features that are implemented by the Unix kernel or similar 66 - kernels (such as Linux). 67 - ''; 68 - 69 - license = stdenv.lib.licenses.gpl2Plus; 70 - 71 - homepage = http://www.gnu.org/software/hurd/; 72 - 73 - maintainers = [ stdenv.lib.maintainers.ludo ]; 74 - }; 75 - } 76 - 77 - // 78 - 79 - stdenv.lib.optionalAttrs (!headersOnly && buildTarget != null) { 80 - # Use the default `buildPhase' and `installPhase' so that the usual hooks 81 - # can still be used. 82 - buildFlags = buildTarget; 83 - installTargets = assert installTarget != null; installTarget; 84 - } 85 - 86 - // 87 - 88 - stdenv.lib.optionalAttrs headersOnly { 89 - dontBuild = true; 90 - installPhase = "make install-headers"; 91 - })
-81
pkgs/os-specific/gnu/libpthread/default.nix
··· 1 - { fetchgit, stdenv, autoconf, automake, libtool 2 - , machHeaders, hurdHeaders, hurd, headersOnly ? false 3 - , cross ? null, gccCross ? null, glibcCross ? null }: 4 - 5 - assert (cross != null) -> (gccCross != null) && (glibcCross != null); 6 - assert (!headersOnly) -> (hurd != null); 7 - 8 - let 9 - date = "20111020"; 10 - 11 - # Use the `tschwinge/Peter_Herbolzheimer' branch as prescribed in 12 - # <http://www.gnu.org/software/hurd/hurd/building/cross-compiling.html>. 13 - rev = "a7b82c3302bf9c47176648eb802a61ae2d9a16f5"; 14 - in 15 - stdenv.mkDerivation ({ 16 - name = "libpthread-hurd-${if headersOnly then "headers-" else ""}${date}"; 17 - 18 - src = fetchgit { 19 - url = "git://git.sv.gnu.org/hurd/libpthread.git"; 20 - sha256 = "e8300762914d927c0da4168341a5982a1057613e1af363ee68942087b2570b3d"; 21 - inherit rev; 22 - }; 23 - 24 - nativeBuildInputs = [ autoconf automake libtool ]; 25 - buildInputs = [ machHeaders hurdHeaders ] 26 - ++ stdenv.lib.optional (!headersOnly) hurd 27 - ++ stdenv.lib.optional (gccCross != null) gccCross; 28 - 29 - preConfigure = "autoreconf -vfi"; 30 - 31 - meta = { 32 - description = "GNU Hurd's libpthread"; 33 - 34 - license = stdenv.lib.licenses.lgpl2Plus; 35 - 36 - maintainers = [ stdenv.lib.maintainers.ludo ]; 37 - }; 38 - } 39 - 40 - // 41 - 42 - (if headersOnly 43 - then { 44 - configureFlags = 45 - [ "--build=i586-pc-gnu" 46 - "ac_cv_lib_ihash_hurd_ihash_create=yes" 47 - ]; 48 - 49 - dontBuild = true; 50 - installPhase = "make install-data-local-headers"; 51 - } 52 - else { }) 53 - 54 - // 55 - 56 - (if cross != null 57 - then { 58 - # Tell gcc where to find `crt1.o' et al. This is specified in two 59 - # different ways: one for gcc as run from `configure', and one for linking 60 - # libpthread.so (by default `libtool --mode=link' swallows `-B', hence 61 - # this workaround; see 62 - # <http://lists.gnu.org/archive/html/bug-libtool/2010-05/msg00012.html>.) 63 - LDFLAGS = "-B${glibcCross}/lib"; 64 - makeFlags = [ "LDFLAGS=-Wc,-B${glibcCross}/lib" ]; 65 - 66 - # Help the linker find glibc. 67 - CPATH = "${glibcCross}/include"; 68 - LIBRARY_PATH = "${glibcCross}/lib"; 69 - 70 - passthru = { 71 - # Extra target LDFLAGS to allow the cross-linker to find the 72 - # dependencies of the cross libpthread.so, namely libihash.so. 73 - # Note: these are raw `ld' flags, so `-Wl,' must be prepended when using 74 - # `gcc'. 75 - # 76 - # This is actually only useful while building the final cross-gcc, since 77 - # afterwards gcc-cross-wrapper should add the relevant flags. 78 - TARGET_LDFLAGS = "-rpath-link=${hurd}/lib"; 79 - }; 80 - } 81 - else { }))
-57
pkgs/os-specific/gnu/mach/default.nix
··· 1 - { fetchgit, stdenv, mig ? null, autoconf, automake, texinfo 2 - , headersOnly ? false }: 3 - 4 - assert (!headersOnly) -> (mig != null); 5 - 6 - let 7 - date = "20120303"; 8 - rev = "2a603e88f86bee88e013c2451eacf076fbcaed81"; 9 - in 10 - stdenv.mkDerivation ({ 11 - name = "gnumach${if headersOnly then "-headers" else ""}-${date}"; 12 - 13 - src = fetchgit { 14 - url = "git://git.sv.gnu.org/hurd/gnumach.git"; 15 - sha256 = "1q8zk8xzbiwpnvvmfgkylj4gwkvkn5n2ydy9j054qv5plnaczj1c"; 16 - inherit rev; 17 - }; 18 - 19 - configureFlags = 20 - stdenv.lib.optional headersOnly "--build=i586-pc-gnu" # cheat 21 - 22 - # Always enable dependency tracking. See 23 - # <http://lists.gnu.org/archive/html/bug-hurd/2010-05/msg00137.html>. 24 - ++ [ "--enable-dependency-tracking" ]; 25 - 26 - nativeBuildInputs = [ autoconf automake texinfo ] 27 - ++ stdenv.lib.optional (mig != null) mig; 28 - 29 - preConfigure = "autoreconf -vfi"; 30 - 31 - meta = { 32 - description = "GNU Mach, the microkernel used by the GNU Hurd"; 33 - 34 - longDescription = 35 - '' GNU Mach is the microkernel that the GNU Hurd system is based on. 36 - 37 - It is maintained by the Hurd developers for the GNU project and 38 - remains compatible with Mach 3.0. 39 - 40 - The majority of GNU Mach's device drivers are from Linux 2.0. They 41 - were added using glue code, i.e., a Linux emulation layer in Mach. 42 - ''; 43 - 44 - license = stdenv.lib.licenses.gpl2Plus; 45 - 46 - homepage = http://www.gnu.org/software/hurd/microkernel/mach/gnumach.html; 47 - 48 - maintainers = [ stdenv.lib.maintainers.ludo ]; 49 - platforms = [ "i586-gnu" ]; 50 - }; 51 - } 52 - 53 - // 54 - 55 - (if headersOnly 56 - then { dontBuild = true; installPhase = "make install-data"; } 57 - else {}))
-50
pkgs/os-specific/gnu/mig/default.nix
··· 1 - { fetchgit, stdenv, autoconf, automake, flex, bison, machHeaders, bash }: 2 - 3 - let 4 - date = "20100512"; 5 - rev = "4fee6a5652f609cb68cdbd9049d4da7a194f15f8"; 6 - in 7 - stdenv.mkDerivation { 8 - name = "mig-${date}"; 9 - 10 - src = fetchgit { 11 - url = "git://git.sv.gnu.org/hurd/mig.git"; 12 - sha256 = "d6958d9b60925d4600aac133c9505bc873a16b203c69260bd0fb228922ee9273"; 13 - inherit rev; 14 - }; 15 - 16 - patches = [ ./noyywrap.patch ]; 17 - 18 - nativeBuildInputs = [ autoconf automake flex bison machHeaders ]; 19 - 20 - preConfigure = "autoreconf -vfi"; 21 - 22 - doCheck = true; 23 - 24 - # Fix the shebang to point to the cross-built shell. Won't be needed 25 - # after #43833. 26 - postInstall = '' 27 - sed -i "$out/bin/mig" -e 's|^#!/.*|#!${bash}/bin/sh|g' 28 - ''; 29 - 30 - meta = { 31 - description = "GNU MIG, the Mach interface generator"; 32 - 33 - longDescription = 34 - '' GNU MIG is the GNU distribution of the Mach 3.0 interface generator 35 - MIG, as maintained by the GNU Hurd developers for the GNU project. 36 - 37 - You need this tool to compile the GNU Mach and GNU Hurd 38 - distributions, and to compile the GNU C library for the Hurd. Also, 39 - you will need it for other software in the GNU system that uses 40 - Mach-based inter-process communication. 41 - ''; 42 - 43 - license = stdenv.lib.licenses.gpl2Plus; 44 - 45 - homepage = http://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html; 46 - 47 - # platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # really GNU/Hurd 48 - maintainers = [ stdenv.lib.maintainers.ludo ]; 49 - }; 50 - }
-12
pkgs/os-specific/gnu/mig/noyywrap.patch
··· 1 - Fix undefined reference to `yywrap'. 2 - 3 - diff --git a/lexxer.l b/lexxer.l 4 - index 9725d0b..15264bc 100644 5 - --- a/lexxer.l 6 - +++ b/lexxer.l 7 - @@ -1,4 +1,5 @@ 8 - %option nounput 9 - +%option noyywrap 10 - 11 - %k 10000 12 - %n 5000
-44
pkgs/os-specific/gnu/smbfs/default.nix
··· 1 - { fetchcvs, stdenv, hurd, machHeaders, samba }: 2 - 3 - let 4 - date = "2012-03-15"; 5 - samba_patched = stdenv.lib.overrideDerivation samba (attrs: { 6 - patches = attrs.patches ++ [ ./samba-without-byte-range-locks.patch ]; 7 - }); 8 - in 9 - stdenv.mkDerivation rec { 10 - name = "smbfs-${date}"; 11 - 12 - src = fetchcvs { 13 - cvsRoot = ":pserver:anonymous@cvs.savannah.nongnu.org:/sources/hurdextras"; 14 - module = "smbfs"; 15 - sha256 = "5941d1a5da4488cbf0efe9aa0b41fe4ff5ba57b84ed24f7ff7c0feda4501d3e3"; 16 - inherit date; 17 - }; 18 - 19 - patchPhase = 20 - '' sed -i "Makefile" \ 21 - -e 's|gcc|i586-pc-gnu-gcc|g ; 22 - s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g' 23 - ''; 24 - 25 - buildInputs = [ hurd machHeaders samba_patched ]; 26 - 27 - installPhase = 28 - '' mkdir -p "$out/hurd" 29 - cp -v smbfs "$out/hurd" 30 - 31 - mkdir -p "$out/share/doc/${name}" 32 - cp -v README "$out/share/doc/${name}" 33 - ''; 34 - 35 - meta = { 36 - description = "SMB/CIFS file system translator for GNU/Hurd"; 37 - 38 - homepage = http://www.nongnu.org/hurdextras/; 39 - 40 - license = stdenv.lib.licenses.gpl3Plus; 41 - 42 - maintainers = [ stdenv.lib.maintainers.ludo ]; 43 - }; 44 - }
-14
pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch
··· 1 - Since GNU/Hurd doesn't support byte-range file locks, shamelessly 2 - disable them to allow the SMB client library to work (it uses TDB 3 - to access /etc/samba/private/secrets.tdb, for instance.) 4 - 5 - --- samba/lib/tdb/common/lock.c 2010-02-08 16:12:57.000000000 +0100 6 - +++ samba/lib/tdb/common/lock.c 2012-03-01 23:39:02.000000000 +0100 7 - @@ -48,7 +48,7 @@ int tdb_brlock(struct tdb_context *tdb, 8 - struct flock fl; 9 - int ret; 10 - 11 - - if (tdb->flags & TDB_NOLOCK) { 12 - + if (1) { 13 - return 0; 14 - }
-43
pkgs/os-specific/gnu/unionfs/default.nix
··· 1 - { fetchgit, stdenv, hurd, machHeaders, mig }: 2 - 3 - let 4 - date = "20120313"; 5 - rev = "64dfa4e12d93c13b676d1cd7d86f4f4004ebfafa"; 6 - in 7 - stdenv.mkDerivation rec { 8 - name = "unionfs-${date}"; 9 - 10 - src = fetchgit { 11 - url = "git://git.sv.gnu.org/hurd/unionfs.git"; 12 - sha256 = "1c3d71112cb25f8f82719a16df936e43abcb1adb77af96c1bb100a8ad0889d65"; 13 - inherit rev; 14 - }; 15 - 16 - patchPhase = 17 - '' sed -i "Makefile" \ 18 - -e 's|gcc|i586-pc-gnu-gcc|g ; 19 - s|-std=gnu99|-std=gnu99 -fgnu89-inline|g' 20 - ''; 21 - 22 - makeFlags = [ "CC=i586-pc-gnu-gcc" ]; 23 - buildInputs = [ hurd machHeaders ]; 24 - nativeBuildInputs = [ mig ]; 25 - 26 - installPhase = 27 - '' mkdir -p "$out/hurd" 28 - cp -v unionfs "$out/hurd" 29 - 30 - mkdir -p "$out/share/doc/${name}" 31 - cp -v [A-Z]* "$out/share/doc/${name}" 32 - ''; 33 - 34 - meta = { 35 - description = "Union file system translator for GNU/Hurd"; 36 - 37 - homepage = http://www.gnu.org/software/hurd/hurd/translator/unionfs.html; 38 - 39 - license = stdenv.lib.licenses.gpl2Plus; 40 - 41 - maintainers = [ stdenv.lib.maintainers.ludo ]; 42 - }; 43 - }
+1 -1
pkgs/stdenv/generic/default.nix
··· 121 121 122 122 # Utility flags to test the type of platform. 123 123 inherit (hostPlatform) 124 - isDarwin isLinux isSunOS isHurd isCygwin isFreeBSD isOpenBSD 124 + isDarwin isLinux isSunOS isCygwin isFreeBSD isOpenBSD 125 125 isi686 isx86_64 is64bit isAarch32 isAarch64 isMips isBigEndian; 126 126 isArm = builtins.trace "stdenv.isArm is deprecated after 18.03" hostPlatform.isArm; 127 127
+2 -3
pkgs/tools/filesystems/nixpart/0.4/parted.nix
··· 1 1 { stdenv, fetchurl, lvm2, libuuid, gettext, readline 2 - , utillinux, check, enableStatic ? false, hurd ? null }: 2 + , utillinux, check, enableStatic ? false }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 name = "parted-3.1"; ··· 12 12 buildInputs = [ libuuid ] 13 13 ++ stdenv.lib.optional (readline != null) readline 14 14 ++ stdenv.lib.optional (gettext != null) gettext 15 - ++ stdenv.lib.optional (lvm2 != null) lvm2 16 - ++ stdenv.lib.optional (hurd != null) hurd; 15 + ++ stdenv.lib.optional (lvm2 != null) lvm2; 17 16 18 17 configureFlags = 19 18 (if (readline != null)
+2 -3
pkgs/tools/misc/parted/default.nix
··· 1 1 { stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline, perl, python2 2 - , utillinux, check, enableStatic ? false, hurd ? null }: 2 + , utillinux, check, enableStatic ? false }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 name = "parted-3.2"; ··· 30 30 buildInputs = [ libuuid ] 31 31 ++ stdenv.lib.optional (readline != null) readline 32 32 ++ stdenv.lib.optional (gettext != null) gettext 33 - ++ stdenv.lib.optional (lvm2 != null) lvm2 34 - ++ stdenv.lib.optional (hurd != null) hurd; 33 + ++ stdenv.lib.optional (lvm2 != null) lvm2; 35 34 36 35 configureFlags = 37 36 (if (readline != null)
+2 -40
pkgs/top-level/all-packages.nix
··· 4502 4502 4503 4503 patchutils = callPackage ../tools/text/patchutils { }; 4504 4504 4505 - parted = callPackage ../tools/misc/parted { hurd = null; }; 4505 + parted = callPackage ../tools/misc/parted { }; 4506 4506 4507 4507 pell = callPackage ../applications/misc/pell { }; 4508 4508 ··· 4528 4528 p0f = callPackage ../tools/security/p0f { }; 4529 4529 4530 4530 pngout = callPackage ../tools/graphics/pngout { }; 4531 - 4532 - hurdPartedCross = 4533 - if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu" 4534 - then (makeOverridable 4535 - ({ hurd }: 4536 - (parted.override { 4537 - # Needs the Hurd's libstore. 4538 - inherit hurd; 4539 - 4540 - # The Hurd wants a libparted.a. 4541 - enableStatic = true; 4542 - 4543 - gettext = null; 4544 - readline = null; 4545 - devicemapper = null; 4546 - }).crossDrv) 4547 - { hurd = gnu.hurdCrossIntermediate; }) 4548 - else null; 4549 4531 4550 4532 ipsecTools = callPackage ../os-specific/linux/ipsec-tools { flex = flex_2_5_35; }; 4551 4533 ··· 8762 8744 8763 8745 gdb = callPackage ../development/tools/misc/gdb { 8764 8746 guile = null; 8765 - hurd = gnu.hurdCross; 8766 - inherit (gnu) mig; 8767 8747 }; 8768 8748 8769 8749 jhiccup = callPackage ../development/tools/java/jhiccup { }; ··· 13737 13717 13738 13718 libossp_uuid = callPackage ../development/libraries/libossp-uuid { }; 13739 13719 13740 - libuuid = 13741 - if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu" 13742 - then (utillinuxMinimal // { 13743 - crossDrv = lib.overrideDerivation utillinuxMinimal.crossDrv (args: { 13744 - # `libblkid' fails to build on GNU/Hurd. 13745 - configureFlags = args.configureFlags 13746 - + " --disable-libblkid --disable-mount --disable-libmount" 13747 - + " --disable-fsck --enable-static --disable-partx"; 13748 - doCheck = false; 13749 - CPPFLAGS = # ugly hack for ugly software! 13750 - lib.concatStringsSep " " 13751 - (map (v: "-D${v}=4096") 13752 - [ "PATH_MAX" "MAXPATHLEN" "MAXHOSTNAMELEN" ]); 13753 - }); 13754 - }) 13755 - else if stdenv.isLinux 13720 + libuuid = if stdenv.isLinux 13756 13721 then utillinuxMinimal 13757 13722 else null; 13758 13723 ··· 13823 13788 }; 13824 13789 13825 13790 nmon = callPackage ../os-specific/linux/nmon { }; 13826 - 13827 - # GNU/Hurd core packages. 13828 - gnu = recurseIntoAttrs (callPackage ../os-specific/gnu { }); 13829 13791 13830 13792 hwdata = callPackage ../os-specific/linux/hwdata { }; 13831 13793