nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

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