nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 514 lines 22 kB view raw
1{ stdenv, buildPackages, buildHaskellPackages, ghc 2, jailbreak-cabal, hscolour, cpphs, nodejs, shellFor 3}: 4 5let 6 isCross = stdenv.buildPlatform != stdenv.hostPlatform; 7 inherit (buildPackages) 8 fetchurl removeReferencesTo 9 pkgconfig coreutils gnugrep gnused glibcLocales; 10in 11 12{ pname 13, dontStrip ? (ghc.isGhcjs or false) 14, version, revision ? null 15, sha256 ? null 16, src ? fetchurl { url = "mirror://hackage/${pname}-${version}.tar.gz"; inherit sha256; } 17, buildDepends ? [], setupHaskellDepends ? [], libraryHaskellDepends ? [], executableHaskellDepends ? [] 18, buildTarget ? "" 19, buildTools ? [], libraryToolDepends ? [], executableToolDepends ? [], testToolDepends ? [], benchmarkToolDepends ? [] 20, configureFlags ? [] 21, buildFlags ? [] 22, haddockFlags ? [] 23, description ? "" 24, doCheck ? !isCross && stdenv.lib.versionOlder "7.4" ghc.version 25, doBenchmark ? false 26, doHoogle ? true 27, editedCabalFile ? null 28, enableLibraryProfiling ? true 29, enableExecutableProfiling ? false 30, profilingDetail ? "exported-functions" 31# TODO enable shared libs for cross-compiling 32, enableSharedExecutables ? false 33, enableSharedLibraries ? (ghc.enableShared or false) 34, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin 35, enableStaticLibraries ? !stdenv.hostPlatform.isWindows 36, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4" 37, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? [] 38# On macOS, statically linking against system frameworks is not supported; 39# see https://developer.apple.com/library/content/qa/qa1118/_index.html 40# They must be propagated to the environment of any executable linking with the library 41, libraryFrameworkDepends ? [], executableFrameworkDepends ? [] 42, homepage ? "https://hackage.haskell.org/package/${pname}" 43, platforms ? with stdenv.lib.platforms; unix ++ windows # GHC can cross-compile 44, hydraPlatforms ? null 45, hyperlinkSource ? true 46, isExecutable ? false, isLibrary ? !isExecutable 47, jailbreak ? false 48, license 49# We cannot enable -j<n> parallelism for libraries because GHC is far more 50# likely to generate a non-determistic library ID in that case. Further 51# details are at <https://github.com/peti/ghc-library-id-bug>. 52# 53# Currently disabled for aarch64. See https://ghc.haskell.org/trac/ghc/ticket/15449. 54, enableParallelBuilding ? ((stdenv.lib.versionOlder "7.8" ghc.version && !isLibrary) || stdenv.lib.versionOlder "8.0.1" ghc.version) && !(stdenv.buildPlatform.isAarch64) 55, maintainers ? [] 56, doCoverage ? false 57, doHaddock ? !(ghc.isHaLVM or false) 58, passthru ? {} 59, pkgconfigDepends ? [], libraryPkgconfigDepends ? [], executablePkgconfigDepends ? [], testPkgconfigDepends ? [], benchmarkPkgconfigDepends ? [] 60, testDepends ? [], testHaskellDepends ? [], testSystemDepends ? [], testFrameworkDepends ? [] 61, benchmarkDepends ? [], benchmarkHaskellDepends ? [], benchmarkSystemDepends ? [], benchmarkFrameworkDepends ? [] 62, testTarget ? "" 63, broken ? false 64, preCompileBuildDriver ? "", postCompileBuildDriver ? "" 65, preUnpack ? "", postUnpack ? "" 66, patches ? [], patchPhase ? "", prePatch ? "", postPatch ? "" 67, preConfigure ? "", postConfigure ? "" 68, preBuild ? "", postBuild ? "" 69, installPhase ? "", preInstall ? "", postInstall ? "" 70, checkPhase ? "", preCheck ? "", postCheck ? "" 71, preFixup ? "", postFixup ? "" 72, shellHook ? "" 73, coreSetup ? false # Use only core packages to build Setup.hs. 74, useCpphs ? false 75, hardeningDisable ? stdenv.lib.optional (ghc.isHaLVM or false) "all" 76, enableSeparateBinOutput ? false 77, enableSeparateDataOutput ? false 78, enableSeparateDocOutput ? doHaddock 79, # Don't fail at configure time if there are multiple versions of the 80 # same package in the (recursive) dependencies of the package being 81 # built. Will delay failures, if any, to compile time. 82 allowInconsistentDependencies ? false 83, maxBuildCores ? 4 # GHC usually suffers beyond -j4. https://ghc.haskell.org/trac/ghc/ticket/9221 84} @ args: 85 86assert editedCabalFile != null -> revision != null; 87 88# --enable-static does not work on windows. This is a bug in GHC. 89# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf. 90assert stdenv.hostPlatform.isWindows -> enableStaticLibraries == false; 91 92let 93 94 inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast 95 concatStringsSep enableFeature optionalAttrs toUpper; 96 97 isGhcjs = ghc.isGhcjs or false; 98 isHaLVM = ghc.isHaLVM or false; 99 packageDbFlag = if isGhcjs || isHaLVM || versionOlder "7.6" ghc.version 100 then "package-db" 101 else "package-conf"; 102 103 # GHC used for building Setup.hs 104 # 105 # Same as our GHC, unless we're cross, in which case it is native GHC with the 106 # same version, or ghcjs, in which case its the ghc used to build ghcjs. 107 nativeGhc = buildHaskellPackages.ghc; 108 nativePackageDbFlag = if versionOlder "7.6" nativeGhc.version 109 then "package-db" 110 else "package-conf"; 111 112 # the target dir for haddock documentation 113 docdir = docoutput: docoutput + "/share/doc/" + pname + "-" + version; 114 115 binDir = if enableSeparateBinOutput then "$bin/bin" else "$out/bin"; 116 117 newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal"; 118 newCabalFile = fetchurl { 119 url = newCabalFileUrl; 120 sha256 = editedCabalFile; 121 name = "${pname}-${version}-r${revision}.cabal"; 122 }; 123 124 defaultSetupHs = builtins.toFile "Setup.hs" '' 125 import Distribution.Simple 126 main = defaultMain 127 ''; 128 129 crossCabalFlags = [ 130 "--with-ghc=${ghc.targetPrefix}ghc" 131 "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg" 132 "--with-gcc=${stdenv.cc.targetPrefix}cc" 133 "--with-ld=${stdenv.cc.bintools.targetPrefix}ld" 134 "--with-ar=${stdenv.cc.bintools.targetPrefix}ar" 135 # use the one that comes with the cross compiler. 136 "--with-hsc2hs=${ghc.targetPrefix}hsc2hs" 137 "--with-strip=${stdenv.cc.bintools.targetPrefix}strip" 138 ] ++ optionals (!isHaLVM) [ 139 "--hsc2hs-option=--cross-compile" 140 (optionalString enableHsc2hsViaAsm "--hsc2hs-option=--via-asm") 141 ]; 142 143 crossCabalFlagsString = 144 stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags); 145 146 buildFlagsString = optionalString (buildFlags != []) (" " + concatStringsSep " " buildFlags); 147 148 defaultConfigureFlags = [ 149 "--verbose" 150 "--prefix=$out" 151 "--libdir=\\$prefix/lib/\\$compiler" 152 "--libsubdir=\\$abi/\\$libname" 153 (optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}") 154 (optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}") 155 "--with-gcc=$CC" # Clang won't work without that extra information. 156 "--package-db=$packageConfDir" 157 (optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}") 158 (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") 159 (optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES") 160 (optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp") 161 (enableFeature (enableDeadCodeElimination && !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && (versionAtLeast "8.0.1" ghc.version)) "split-objs") 162 (enableFeature enableLibraryProfiling "library-profiling") 163 (optionalString ((enableExecutableProfiling || enableLibraryProfiling) && versionOlder "8" ghc.version) "--profiling-detail=${profilingDetail}") 164 (enableFeature enableExecutableProfiling (if versionOlder ghc.version "8" then "executable-profiling" else "profiling")) 165 (enableFeature enableSharedLibraries "shared") 166 (optionalString (versionAtLeast ghc.version "7.10") (enableFeature doCoverage "coverage")) 167 (optionalString (versionOlder "8.4" ghc.version) (enableFeature enableStaticLibraries "static")) 168 (optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic")) 169 (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests")) 170 (enableFeature doBenchmark "benchmarks") 171 "--enable-library-vanilla" # TODO: Should this be configurable? 172 "--enable-library-for-ghci" # TODO: Should this be configurable? 173 ] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [ 174 "--ghc-option=-split-sections" 175 ] ++ optionals dontStrip [ 176 "--disable-library-stripping" 177 "--disable-executable-stripping" 178 ] ++ optionals isGhcjs [ 179 "--ghcjs" 180 ] ++ optionals isCross ([ 181 "--configure-option=--host=${stdenv.hostPlatform.config}" 182 ] ++ crossCabalFlags 183 ) ++ optionals enableSeparateBinOutput ["--bindir=${binDir}"]; 184 185 setupCompileFlags = [ 186 (optionalString (!coreSetup) "-${nativePackageDbFlag}=$setupPackageConfDir") 187 (optionalString (isGhcjs || isHaLVM || versionOlder "7.8" ghc.version) "-j$NIX_BUILD_CORES") 188 # https://github.com/haskell/cabal/issues/2398 189 (optionalString (versionOlder "7.10" ghc.version && !isHaLVM) "-threaded") 190 ]; 191 192 isHaskellPkg = x: x ? isHaskellLibrary; 193 194 allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++ 195 optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends; 196 197 depsBuildBuild = [ nativeGhc ]; 198 nativeBuildInputs = [ ghc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) pkgconfig ++ 199 setupHaskellDepends ++ 200 buildTools ++ libraryToolDepends ++ executableToolDepends ++ 201 optionals doCheck testToolDepends ++ 202 optionals doBenchmark benchmarkToolDepends; 203 propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends ++ libraryFrameworkDepends; 204 otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++ executableFrameworkDepends ++ 205 allPkgconfigDepends ++ 206 optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testFrameworkDepends) ++ 207 optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkFrameworkDepends); 208 209 210 allBuildInputs = propagatedBuildInputs ++ otherBuildInputs ++ depsBuildBuild ++ nativeBuildInputs; 211 isHaskellPartition = 212 stdenv.lib.partition isHaskellPkg allBuildInputs; 213 214 setupCommand = "./Setup"; 215 216 ghcCommand' = if isGhcjs then "ghcjs" else "ghc"; 217 ghcCommand = "${ghc.targetPrefix}${ghcCommand'}"; 218 219 nativeGhcCommand = "${nativeGhc.targetPrefix}ghc"; 220 221 buildPkgDb = ghcName: packageConfDir: '' 222 # If this dependency has a package database, then copy the contents of it, 223 # unless it is one of our GHCs. These can appear in our dependencies when 224 # we are doing native builds, and they have package databases in them, but 225 # we do not want to copy them over. 226 # 227 # We don't need to, since those packages will be provided by the GHC when 228 # we compile with it, and doing so can result in having multiple copies of 229 # e.g. Cabal in the database with the same name and version, which is 230 # ambiguous. 231 if [ -d "$p/lib/${ghcName}/package.conf.d" ] && [ "$p" != "${ghc}" ] && [ "$p" != "${nativeGhc}" ]; then 232 cp -f "$p/lib/${ghcName}/package.conf.d/"*.conf ${packageConfDir}/ 233 continue 234 fi 235 ''; 236in stdenv.lib.fix (drv: 237 238assert allPkgconfigDepends != [] -> pkgconfig != null; 239 240stdenv.mkDerivation ({ 241 name = "${pname}-${version}"; 242 243 outputs = [ "out" ] 244 ++ (optional enableSeparateDataOutput "data") 245 ++ (optional enableSeparateDocOutput "doc") 246 ++ (optional enableSeparateBinOutput "bin"); 247 setOutputFlags = false; 248 249 pos = builtins.unsafeGetAttrPos "pname" args; 250 251 prePhases = ["setupCompilerEnvironmentPhase"]; 252 preConfigurePhases = ["compileBuildDriverPhase"]; 253 preInstallPhases = ["haddockPhase"]; 254 255 inherit src; 256 257 inherit depsBuildBuild nativeBuildInputs; 258 buildInputs = otherBuildInputs ++ optionals (!isLibrary) propagatedBuildInputs; 259 propagatedBuildInputs = optionals isLibrary propagatedBuildInputs; 260 261 LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase. 262 263 prePatch = optionalString (editedCabalFile != null) '' 264 echo "Replace Cabal file with edited version from ${newCabalFileUrl}." 265 cp ${newCabalFile} ${pname}.cabal 266 '' + prePatch; 267 268 postPatch = optionalString jailbreak '' 269 echo "Run jailbreak-cabal to lift version restrictions on build inputs." 270 ${jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal 271 '' + postPatch; 272 273 setupCompilerEnvironmentPhase = '' 274 NIX_BUILD_CORES=$(( NIX_BUILD_CORES < ${toString maxBuildCores} ? NIX_BUILD_CORES : ${toString maxBuildCores} )) 275 runHook preSetupCompilerEnvironment 276 277 echo "Build with ${ghc}." 278 ${optionalString (isLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"} 279 280 setupPackageConfDir="$TMPDIR/setup-package.conf.d" 281 mkdir -p $setupPackageConfDir 282 packageConfDir="$TMPDIR/package.conf.d" 283 mkdir -p $packageConfDir 284 285 setupCompileFlags="${concatStringsSep " " setupCompileFlags}" 286 configureFlags="${concatStringsSep " " defaultConfigureFlags} $configureFlags" 287 '' 288 # We build the Setup.hs on the *build* machine, and as such should only add 289 # dependencies for the build machine. 290 # 291 # pkgs* arrays defined in stdenv/setup.hs 292 + '' 293 for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do 294 ${buildPkgDb nativeGhc.name "$setupPackageConfDir"} 295 done 296 ${nativeGhcCommand}-pkg --${nativePackageDbFlag}="$setupPackageConfDir" recache 297 '' 298 # For normal components 299 + '' 300 for p in "''${pkgsHostHost[@]}" "''${pkgsHostTarget[@]}"; do 301 ${buildPkgDb ghc.name "$packageConfDir"} 302 if [ -d "$p/include" ]; then 303 configureFlags+=" --extra-include-dirs=$p/include" 304 fi 305 if [ -d "$p/lib" ]; then 306 configureFlags+=" --extra-lib-dirs=$p/lib" 307 fi 308 '' 309 # It is not clear why --extra-framework-dirs does work fine on Linux 310 + optionalString (!stdenv.buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") '' 311 if [[ -d "$p/Library/Frameworks" ]]; then 312 configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks" 313 fi 314 '' + '' 315 done 316 '' 317 # only use the links hack if we're actually building dylibs. otherwise, the 318 # "dynamic-library-dirs" point to nonexistent paths, and the ln command becomes 319 # "ln -s $out/lib/links", which tries to recreate the links dir and fails 320 + (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables)) '' 321 # Work around a limit in the macOS Sierra linker on the number of paths 322 # referenced by any one dynamic library: 323 # 324 # Create a local directory with symlinks of the *.dylib (macOS shared 325 # libraries) from all the dependencies. 326 local dynamicLinksDir="$out/lib/links" 327 mkdir -p $dynamicLinksDir 328 for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'|sort -u); do 329 ln -s "$d/"*.dylib $dynamicLinksDir 330 done 331 # Edit the local package DB to reference the links directory. 332 for f in "$packageConfDir/"*.conf; do 333 sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," $f 334 done 335 '') + '' 336 ${ghcCommand}-pkg --${packageDbFlag}="$packageConfDir" recache 337 338 runHook postSetupCompilerEnvironment 339 ''; 340 341 compileBuildDriverPhase = '' 342 runHook preCompileBuildDriver 343 344 for i in Setup.hs Setup.lhs ${defaultSetupHs}; do 345 test -f $i && break 346 done 347 348 echo setupCompileFlags: $setupCompileFlags 349 ${nativeGhcCommand} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i 350 351 runHook postCompileBuildDriver 352 ''; 353 354 # Cabal takes flags like `--configure-option=--host=...` instead 355 configurePlatforms = []; 356 inherit configureFlags; 357 358 configurePhase = '' 359 runHook preConfigure 360 361 unset GHC_PACKAGE_PATH # Cabal complains if this variable is set during configure. 362 363 echo configureFlags: $configureFlags 364 ${setupCommand} configure $configureFlags 2>&1 | ${coreutils}/bin/tee "$NIX_BUILD_TOP/cabal-configure.log" 365 ${stdenv.lib.optionalString (!allowInconsistentDependencies) '' 366 if ${gnugrep}/bin/egrep -q -z 'Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then 367 echo >&2 "*** abort because of serious configure-time warning from Cabal" 368 exit 1 369 fi 370 ''} 371 export GHC_PACKAGE_PATH="$packageConfDir:" 372 373 runHook postConfigure 374 ''; 375 376 buildPhase = '' 377 runHook preBuild 378 ${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString} 379 runHook postBuild 380 ''; 381 382 inherit doCheck; 383 384 checkPhase = '' 385 runHook preCheck 386 ${setupCommand} test ${testTarget} 387 runHook postCheck 388 ''; 389 390 haddockPhase = '' 391 runHook preHaddock 392 ${optionalString (doHaddock && isLibrary) '' 393 ${setupCommand} haddock --html \ 394 ${optionalString doHoogle "--hoogle"} \ 395 ${optionalString (isLibrary && hyperlinkSource) "--hyperlink-source"} \ 396 ${stdenv.lib.concatStringsSep " " haddockFlags} 397 ''} 398 runHook postHaddock 399 ''; 400 401 # The scary sed expression handles two cases in v2.5 Cabal's package configs: 402 # 1. 'id: short-name-0.0.1-9yvw8HF06tiAXuxm5U8KjO' 403 # 2. 'id:\n 404 # very-long-descriptive-useful-name-0.0.1-9yvw8HF06tiAXuxm5U8KjO' 405 installPhase = '' 406 runHook preInstall 407 408 ${if !isLibrary then "${setupCommand} install" else '' 409 ${setupCommand} copy 410 local packageConfDir="$out/lib/${ghc.name}/package.conf.d" 411 local packageConfFile="$packageConfDir/${pname}-${version}.conf" 412 mkdir -p "$packageConfDir" 413 ${setupCommand} register --gen-pkg-config=$packageConfFile 414 if [ -d "$packageConfFile" ]; then 415 mv "$packageConfFile/"* "$packageConfDir" 416 rmdir "$packageConfFile" 417 fi 418 for packageConfFile in "$packageConfDir/"*; do 419 local pkgId=$( ${gnused}/bin/sed -n -e ':a' -e '/^id:$/N; s/id:\n[ ]*\([^\n]*\).*$/\1/p; s/id:[ ]*\([^\n]*\)$/\1/p; ta' $packageConfFile ) 420 mv $packageConfFile $packageConfDir/$pkgId.conf 421 done 422 423 # delete confdir if there are no libraries 424 find $packageConfDir -maxdepth 0 -empty -delete; 425 ''} 426 ${optionalString isGhcjs '' 427 for exeDir in "${binDir}/"*.jsexe; do 428 exe="''${exeDir%.jsexe}" 429 printWords '#!${nodejs}/bin/node' > "$exe" 430 echo >> "$exe" 431 cat "$exeDir/all.js" >> "$exe" 432 chmod +x "$exe" 433 done 434 ''} 435 ${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"} 436 ${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") '' 437 for exe in "${binDir}/"* ; do 438 install_name_tool -add_rpath "$out/lib/ghc-${ghc.version}/${pname}-${version}" "$exe" 439 done 440 ''} 441 442 ${optionalString enableSeparateDocOutput '' 443 for x in ${docdir "$doc"}"/html/src/"*.html; do 444 remove-references-to -t $out $x 445 done 446 mkdir -p $doc 447 ''} 448 ${optionalString enableSeparateDataOutput "mkdir -p $data"} 449 450 runHook postInstall 451 ''; 452 453 passthru = passthru // { 454 455 inherit pname version; 456 457 compiler = ghc; 458 459 460 getBuildInputs = { 461 inherit propagatedBuildInputs otherBuildInputs allPkgconfigDepends; 462 haskellBuildInputs = isHaskellPartition.right; 463 systemBuildInputs = isHaskellPartition.wrong; 464 }; 465 466 isHaskellLibrary = isLibrary; 467 468 # TODO: ask why the split outputs are configurable at all? 469 # TODO: include tests for split if possible 470 # Given the haskell package, returns 471 # the directory containing the haddock documentation. 472 # `null' if no haddock documentation was built. 473 # TODO: fetch the self from the fixpoint instead 474 haddockDir = self: if doHaddock then "${docdir self.doc}/html" else null; 475 476 env = shellFor { 477 packages = p: [ drv ]; 478 inherit shellHook; 479 }; 480 481 }; 482 483 meta = { inherit homepage license platforms; } 484 // optionalAttrs broken { inherit broken; } 485 // optionalAttrs (description != "") { inherit description; } 486 // optionalAttrs (maintainers != []) { inherit maintainers; } 487 // optionalAttrs (hydraPlatforms != null) { inherit hydraPlatforms; } 488 ; 489 490} 491// optionalAttrs (preCompileBuildDriver != "") { inherit preCompileBuildDriver; } 492// optionalAttrs (postCompileBuildDriver != "") { inherit postCompileBuildDriver; } 493// optionalAttrs (preUnpack != "") { inherit preUnpack; } 494// optionalAttrs (postUnpack != "") { inherit postUnpack; } 495// optionalAttrs (patches != []) { inherit patches; } 496// optionalAttrs (patchPhase != "") { inherit patchPhase; } 497// optionalAttrs (preConfigure != "") { inherit preConfigure; } 498// optionalAttrs (postConfigure != "") { inherit postConfigure; } 499// optionalAttrs (preBuild != "") { inherit preBuild; } 500// optionalAttrs (postBuild != "") { inherit postBuild; } 501// optionalAttrs (doBenchmark) { inherit doBenchmark; } 502// optionalAttrs (checkPhase != "") { inherit checkPhase; } 503// optionalAttrs (preCheck != "") { inherit preCheck; } 504// optionalAttrs (postCheck != "") { inherit postCheck; } 505// optionalAttrs (preInstall != "") { inherit preInstall; } 506// optionalAttrs (installPhase != "") { inherit installPhase; } 507// optionalAttrs (postInstall != "") { inherit postInstall; } 508// optionalAttrs (preFixup != "") { inherit preFixup; } 509// optionalAttrs (postFixup != "") { inherit postFixup; } 510// optionalAttrs (dontStrip) { inherit dontStrip; } 511// optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; } 512// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } 513) 514)