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