diff --git a/doc/languages-frameworks/dhall.section.md b/doc/languages-frameworks/dhall.section.md index 83fe2e9ae0c42..846b8cfd3163b 100644 --- a/doc/languages-frameworks/dhall.section.md +++ b/doc/languages-frameworks/dhall.section.md @@ -307,12 +307,12 @@ $ nix-env --install --attr haskellPackages.dhall-nixpkgs $ nix-env --install --attr nix-prefetch-git # Used by dhall-to-nixpkgs -$ dhall-to-nixpkgs github https://github.com/Gabriel439/dhall-semver.git +$ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git { buildDhallGitHubPackage, Prelude }: buildDhallGitHubPackage { name = "dhall-semver"; githubBase = "github.com"; - owner = "Gabriel439"; + owner = "Gabriella439"; repo = "dhall-semver"; rev = "2d44ae605302ce5dc6c657a1216887fbb96392a4"; fetchSubmodules = false; diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index a36843c97c61e..894eba1494e5a 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -276,6 +276,15 @@ Defaults to `true`. : Whether to generate an index for interactive navigation of the HTML documentation. Defaults to `true` if supported. +`doInstallIntermediates` +: Whether to install intermediate build products (files written to `dist/build` +by GHC during the build process). With `enableSeparateIntermediatesOutput`, +these files are instead installed to [a separate `intermediates` +output.][multiple-outputs] The output can then be passed into a future build of +the same package with the `previousIntermediates` argument to support +incremental builds. See [“Incremental builds”](#haskell-incremental-builds) for +more information. Defaults to `false`. + `enableLibraryProfiling` : Whether to enable [profiling][profiling] for libraries contained in the package. Enabled by default if supported. @@ -371,6 +380,12 @@ Defaults to `false`. : Whether to install documentation to a separate `doc` output. Is automatically enabled if `doHaddock` is `true`. +`enableSeparateIntermediatesOutput` +: When `doInstallIntermediates` is true, whether to install intermediate build +products to a separate `intermediates` output. See [“Incremental +builds”](#haskell-incremental-builds) for more information. Defaults to +`false`. + `allowInconsistentDependencies` : If enabled, allow multiple versions of the same Haskell package in the dependency tree at configure time. Often in such a situation compilation would @@ -381,6 +396,11 @@ later fail because of type mismatches. Defaults to `false`. when loading the library in the REPL, but requires extra build time and disk space. Defaults to `false`. +`previousIntermediates` +: If non-null, intermediate build artifacts are copied from this input to +`dist/build` before performing compiling. See [“Incremental +builds”](#haskell-incremental-builds) for more information. Defaults to `null`. + `buildTarget` : Name of the executable or library to build and install. If unset, all available targets are built and installed. @@ -496,6 +516,54 @@ the [Meta-attributes section](#chap-meta) for their documentation. * `broken` * `hydraPlatforms` +### Incremental builds {#haskell-incremental-builds} + +`haskellPackages.mkDerivation` supports incremental builds for GHC 9.4 and +newer with the `doInstallIntermediates`, `enableSeparateIntermediatesOutput`, +and `previousIntermediates` arguments. + +The basic idea is to first perform a full build of the package in question, +save its intermediate build products for later, and then copy those build +products into the build directory of an incremental build performed later. +Then, GHC will use those build artifacts to avoid recompiling unchanged +modules. + +For more detail on how to store and use incremental build products, see +[Gabriella Gonzalez’ blog post “Nixpkgs support for incremental Haskell +builds”.][incremental-builds] motivation behind this feature. + +An incremental build for [the `turtle` package][turtle] can be performed like +so: + +```nix +let + pkgs = import {}; + inherit (pkgs) haskell; + inherit (haskell.lib.compose) overrideCabal; + + # Incremental builds work with GHC >=9.4. + turtle = haskell.packages.ghc944.turtle; + + # This will do a full build of `turtle`, while writing the intermediate build products + # (compiled modules, etc.) to the `intermediates` output. + turtle-full-build-with-incremental-output = overrideCabal (drv: { + doInstallIntermediates = true; + enableSeparateIntermediatesOutput = true; + }) turtle; + + # This will do an incremental build of `turtle` by copying the previously + # compiled modules and intermediate build products into the source tree + # before running the build. + # + # GHC will then naturally pick up and reuse these products, making this build + # complete much more quickly than the previous one. + turtle-incremental-build = overrideCabal (drv: { + previousIntermediates = turtle-full-build-with-incremental-output.intermediates; + }) turtle; +in + turtle-incremental-build +``` + ## Development environments {#haskell-development-environments} In addition to building and installing Haskell software, nixpkgs can also @@ -1083,8 +1151,11 @@ on the issue linked above. [haskell.nix]: https://input-output-hk.github.io/haskell.nix/index.html [HLS user guide]: https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-editor [hoogle]: https://wiki.haskell.org/Hoogle +[incremental-builds]: https://www.haskellforall.com/2022/12/nixpkgs-support-for-incremental-haskell.html [jailbreak-cabal]: https://github.com/NixOS/jailbreak-cabal/ +[multiple-outputs]: https://nixos.org/manual/nixpkgs/stable/#chap-multiple-output [optparse-applicative-completions]: https://github.com/pcapriotti/optparse-applicative/blob/7726b63796aa5d0df82e926d467f039b78ca09e2/README.md#bash-zsh-and-fish-completions [profiling-detail]: https://cabal.readthedocs.io/en/latest/cabal-project.html#cfg-field-profiling-detail [profiling]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html [search.nixos.org]: https://search.nixos.org +[turtle]: https://hackage.haskell.org/package/turtle diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ae163ca951fa3..4c6d09d07d5f1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5524,18 +5524,18 @@ githubId = 606000; name = "Gabriel Adomnicai"; }; - Gabriel439 = { - email = "Gabriel439@gmail.com"; - github = "Gabriella439"; - githubId = 1313787; - name = "Gabriel Gonzalez"; - }; GabrielDougherty = { email = "contact@gabrieldougherty.com"; github = "GabrielDougherty"; githubId = 10541219; name = "Gabriel Dougherty"; }; + Gabriella439 = { + email = "GenuineGabriella@gmail.com"; + github = "Gabriella439"; + githubId = 1313787; + name = "Gabriella Gonzalez"; + }; gador = { email = "florian.brandes@posteo.de"; github = "gador"; diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 294b7e51717be..14683ec601828 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -213,7 +213,7 @@ with lib.maintainers; { dhall = { members = [ - Gabriel439 + Gabriella439 ehmry ]; scope = "Maintain Dhall and related packages."; @@ -556,6 +556,15 @@ with lib.maintainers; { shortName = "Minimal Bootstrap"; }; + mercury = { + members = [ + _9999years + Gabriella439 + ]; + scope = "Group registry for packages maintained by Mercury"; + shortName = "Mercury Employees"; + }; + mobile = { members = [ samueldr diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 111c46d62161d..496245c10a3b0 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -202,7 +202,7 @@ package-maintainers: - vulkan-utils erictapen: - hakyll - Gabriel439: + Gabriella439: - annah - bench - break diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 55b7d8cd46dc0..207025d98d713 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -31,6 +31,7 @@ in , doBenchmark ? false , doHoogle ? true , doHaddockQuickjump ? doHoogle && lib.versionAtLeast ghc.version "8.6" +, doInstallIntermediates ? false , editedCabalFile ? null # aarch64 outputs otherwise exceed 2GB limit , enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.targetPlatform.isAarch64 or false) @@ -84,6 +85,7 @@ in , enableSeparateBinOutput ? false , enableSeparateDataOutput ? false , enableSeparateDocOutput ? doHaddock +, enableSeparateIntermediatesOutput ? false , # Don't fail at configure time if there are multiple versions of the # same package in the (recursive) dependencies of the package being # built. Will delay failures, if any, to compile time. @@ -93,6 +95,10 @@ in # This can make it slightly faster to load this library into GHCi, but takes # extra disk space and compile time. enableLibraryForGhci ? false + # Set this to a previous build of this same package to reuse the intermediate + # build products from that prior build as a starting point for accelerating + # this build +, previousIntermediates ? null } @ args: assert editedCabalFile != null -> revision != null; @@ -240,6 +246,8 @@ let "--ghc-options=-haddock" ]; + postPhases = optional doInstallIntermediates [ "installIntermediatesPhase" ]; + setupCompileFlags = [ (optionalString (!coreSetup) "-${nativePackageDbFlag}=$setupPackageConfDir") (optionalString enableParallelBuilding (parallelBuildingFlags)) @@ -306,6 +314,8 @@ let continue fi ''; + + intermediatesDir = "share/haskell/${ghc.version}/${pname}-${version}/dist"; in lib.fix (drv: assert allPkgconfigDepends != [] -> pkg-config != null; @@ -316,7 +326,9 @@ stdenv.mkDerivation ({ outputs = [ "out" ] ++ (optional enableSeparateDataOutput "data") ++ (optional enableSeparateDocOutput "doc") - ++ (optional enableSeparateBinOutput "bin"); + ++ (optional enableSeparateBinOutput "bin") + ++ (optional enableSeparateIntermediatesOutput "intermediates"); + setOutputFlags = false; pos = builtins.unsafeGetAttrPos "pname" args; @@ -393,7 +405,13 @@ stdenv.mkDerivation ({ # only use the links hack if we're actually building dylibs. otherwise, the # "dynamic-library-dirs" point to nonexistent paths, and the ln command becomes # "ln -s $out/lib/links", which tries to recreate the links dir and fails - + (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables)) '' + # + # Note: We need to disable this work-around when using intermediate build + # products from a prior build because otherwise Nix will change permissions on + # the `$out/lib/links` directory to read-only when the build is done after the + # dist directory has already been exported, which triggers an unnecessary + # rebuild of modules included in the exported dist directory. + + (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables) && !enableSeparateIntermediatesOutput) '' # Work around a limit in the macOS Sierra linker on the number of paths # referenced by any one dynamic library: # @@ -471,11 +489,22 @@ stdenv.mkDerivation ({ runHook postConfigure ''; - buildPhase = '' - runHook preBuild - ${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString} - runHook postBuild - ''; + buildPhase = + '' + runHook preBuild + '' + + lib.optionalString (previousIntermediates != null) + '' + mkdir -p dist; + rm -r dist/build + cp -r ${previousIntermediates}/${intermediatesDir}/build dist/build + find dist/build -exec chmod u+w {} + + find dist/build -exec touch -d '1970-01-01T00:00:00Z' {} + + '' + + '' + ${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString} + runHook postBuild + ''; inherit doCheck; @@ -558,6 +587,15 @@ stdenv.mkDerivation ({ runHook postInstall ''; + ${if doInstallIntermediates then "installIntermediatesPhase" else null} = '' + runHook preInstallIntermediates + intermediatesOutput=${if enableSeparateIntermediatesOutput then "$intermediates" else "$out"} + installIntermediatesDir="$intermediatesOutput/${intermediatesDir}" + mkdir -p "$installIntermediatesDir" + cp -r dist/build "$installIntermediatesDir" + runHook postInstallIntermediates + ''; + passthru = passthru // rec { inherit pname version; @@ -719,6 +757,7 @@ stdenv.mkDerivation ({ // optionalAttrs (args ? preFixup) { inherit preFixup; } // optionalAttrs (args ? postFixup) { inherit postFixup; } // optionalAttrs (args ? dontStrip) { inherit dontStrip; } +// optionalAttrs (postPhases != []) { inherit postPhases; } // optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } ) ) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 192ed28855261..1d8110d9a90b5 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -32052,7 +32052,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "annah"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "annihilator" = callPackage @@ -42753,7 +42753,7 @@ self: { description = "Command-line benchmark tool"; license = lib.licenses.bsd3; mainProgram = "bench"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "bench-graph" = callPackage @@ -49326,7 +49326,7 @@ self: { libraryHaskellDepends = [ base mtl transformers ]; description = "Break from a loop"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "breakout" = callPackage @@ -80784,7 +80784,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall_1_38_1" = callPackage @@ -80843,7 +80843,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall" = callPackage @@ -80929,7 +80929,7 @@ self: { description = "A configuration language guaranteed to terminate"; license = lib.licenses.bsd3; mainProgram = "dhall"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall_1_42_0" = callPackage @@ -81015,7 +81015,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-bash" = callPackage @@ -81040,7 +81040,7 @@ self: { description = "Compile Dhall to Bash"; license = lib.licenses.bsd3; mainProgram = "dhall-to-bash"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-bash_1_0_41" = callPackage @@ -81066,7 +81066,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall-to-bash"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-check" = callPackage @@ -81150,7 +81150,7 @@ self: { description = "Generate HTML docs from a dhall package"; license = lib.licenses.bsd3; mainProgram = "dhall-docs"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-fly" = callPackage @@ -81217,7 +81217,7 @@ self: { ]; description = "Convert between Dhall and JSON or YAML"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-json_1_7_12" = callPackage @@ -81248,7 +81248,7 @@ self: { description = "Convert between Dhall and JSON or YAML"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-lex" = callPackage @@ -81298,7 +81298,7 @@ self: { description = "Language Server Protocol (LSP) server for Dhall"; license = lib.licenses.mit; mainProgram = "dhall-lsp-server"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-nix" = callPackage @@ -81323,7 +81323,7 @@ self: { description = "Dhall to Nix compiler"; license = lib.licenses.bsd3; mainProgram = "dhall-to-nix"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-nix_1_1_26" = callPackage @@ -81347,7 +81347,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall-to-nix"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-nixpkgs" = callPackage @@ -81373,7 +81373,7 @@ self: { description = "Convert Dhall projects to Nix packages"; license = lib.licenses.bsd3; mainProgram = "dhall-to-nixpkgs"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-nixpkgs_1_0_10" = callPackage @@ -81398,7 +81398,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall-to-nixpkgs"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-openapi" = callPackage @@ -81424,7 +81424,7 @@ self: { description = "Convert an OpenAPI specification to a Dhall package"; license = lib.licenses.bsd3; mainProgram = "openapi-to-dhall"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhall-recursive-adt" = callPackage @@ -81494,7 +81494,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "dhall-to-text"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -81599,7 +81599,7 @@ self: { ]; description = "Convert between Dhall and YAML"; license = lib.licenses.gpl3Only; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dhcp-lease-parser" = callPackage @@ -83789,7 +83789,7 @@ self: { ]; description = "Easily stream directory contents in constant memory"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "dirtree" = callPackage @@ -94050,7 +94050,7 @@ self: { ]; description = "Simplified error-handling"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "errors-ext" = callPackage @@ -103672,7 +103672,7 @@ self: { benchmarkHaskellDepends = [ base criterion ]; description = "Composable, streaming, and efficient left folds"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "foldl-exceptions" = callPackage @@ -163566,7 +163566,7 @@ self: { description = "Indexed Types"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -180123,7 +180123,7 @@ self: { description = "Tutorial for the lens library"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -184142,7 +184142,7 @@ self: { testHaskellDepends = [ base doctest ]; description = "List monad transformer"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "list-tries" = callPackage @@ -189401,7 +189401,7 @@ self: { libraryHaskellDepends = [ base transformers ]; description = "A monad for managed values"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "managed-functions" = callPackage @@ -196033,7 +196033,7 @@ self: { description = "Monad morphisms"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "mmorph" = callPackage @@ -196049,7 +196049,7 @@ self: { ]; description = "Monad morphisms"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "mmsyn2" = callPackage @@ -200059,7 +200059,7 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "morte"; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -203227,7 +203227,7 @@ self: { description = "Model-view-controller"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -203243,7 +203243,7 @@ self: { description = "Concurrent and combinable updates"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "mvclient" = callPackage @@ -208266,7 +208266,7 @@ self: { description = "Parse and render *.drv files"; license = lib.licenses.bsd3; mainProgram = "pretty-derivation"; - maintainers = [ lib.maintainers.Gabriel439 lib.maintainers.sorki ]; + maintainers = [ lib.maintainers.Gabriella439 lib.maintainers.sorki ]; }) {}; "nix-diff" = callPackage @@ -208300,7 +208300,7 @@ self: { license = lib.licenses.bsd3; mainProgram = "nix-diff"; maintainers = [ - lib.maintainers.Gabriel439 lib.maintainers.sorki + lib.maintainers.Gabriella439 lib.maintainers.sorki lib.maintainers.terlar ]; }) {}; @@ -214726,7 +214726,7 @@ self: { libraryHaskellDepends = [ base ]; description = "Optional function arguments"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "options" = callPackage @@ -214871,7 +214871,7 @@ self: { executableHaskellDepends = [ base ]; description = "Auto-generate a command-line parser for your datatype"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "optparse-generic_1_5_0" = callPackage @@ -214892,7 +214892,7 @@ self: { description = "Auto-generate a command-line parser for your datatype"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "optparse-helper" = callPackage @@ -225584,7 +225584,7 @@ self: { ]; description = "Compositional pipelines"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-aeson" = callPackage @@ -225774,7 +225774,7 @@ self: { ]; description = "ByteString support for pipes"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-bzip" = callPackage @@ -225944,7 +225944,7 @@ self: { testHaskellDepends = [ async base pipes stm ]; description = "Concurrency for the pipes ecosystem"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-conduit" = callPackage @@ -226007,7 +226007,7 @@ self: { ]; description = "Fast, streaming csv parser"; license = lib.licenses.mit; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-errors" = callPackage @@ -226067,7 +226067,7 @@ self: { ]; description = "Extra utilities for pipes"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-fastx" = callPackage @@ -226152,7 +226152,7 @@ self: { testHaskellDepends = [ base doctest lens-family-core ]; description = "Group streams into substreams"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-http" = callPackage @@ -226170,7 +226170,7 @@ self: { ]; description = "HTTP client with pipes interface"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-illumina" = callPackage @@ -226441,7 +226441,7 @@ self: { libraryHaskellDepends = [ base pipes transformers ]; description = "Parsing infrastructure for the pipes ecosystem"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-postgresql-simple" = callPackage @@ -226568,7 +226568,7 @@ self: { ]; description = "Safety for the pipes ecosystem"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "pipes-shell" = callPackage @@ -262691,7 +262691,7 @@ self: { description = "Auto-generate a server for your datatype"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; broken = true; }) {}; @@ -296362,7 +296362,7 @@ self: { libraryHaskellDepends = [ base void ]; description = "Exhaustive pattern matching using lenses, traversals, and prisms"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "total-alternative" = callPackage @@ -299462,7 +299462,7 @@ self: { benchmarkHaskellDepends = [ base tasty-bench text ]; description = "Shell programming, Haskell-style"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "turtle_1_6_1" = callPackage @@ -299491,7 +299491,7 @@ self: { description = "Shell programming, Haskell-style"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "turtle-options" = callPackage @@ -301329,7 +301329,7 @@ self: { executableHaskellDepends = [ base diagrams-lib text ]; description = "Typed and composable spreadsheets"; license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.Gabriel439 ]; + maintainers = [ lib.maintainers.Gabriella439 ]; }) {}; "typed-streams" = callPackage diff --git a/pkgs/test/haskell/default.nix b/pkgs/test/haskell/default.nix index 337d2811c6550..86764380ecc30 100644 --- a/pkgs/test/haskell/default.nix +++ b/pkgs/test/haskell/default.nix @@ -6,4 +6,5 @@ lib.recurseIntoAttrs { documentationTarball = callPackage ./documentationTarball { }; setBuildTarget = callPackage ./setBuildTarget { }; writers = callPackage ./writers { }; + incremental = callPackage ./incremental { }; } diff --git a/pkgs/test/haskell/incremental/default.nix b/pkgs/test/haskell/incremental/default.nix new file mode 100644 index 0000000000000..b94a85277db3f --- /dev/null +++ b/pkgs/test/haskell/incremental/default.nix @@ -0,0 +1,35 @@ +# Demonstration of incremental builds for Haskell. Useful for speeding up CI. +# +# See: https://www.haskellforall.com/2022/12/nixpkgs-support-for-incremental-haskell.html +# See: https://felixspringer.xyz/homepage/blog/incrementalHaskellBuildsWithNix + +{ haskell, lib }: + +let + inherit (haskell.lib.compose) overrideCabal; + + # Incremental builds work with GHC >=9.4. + turtle = haskell.packages.ghc944.turtle; + + # This will do a full build of `turtle`, while writing the intermediate build products + # (compiled modules, etc.) to the `intermediates` output. + turtle-full-build-with-incremental-output = overrideCabal (drv: { + doInstallIntermediates = true; + enableSeparateIntermediatesOutput = true; + }) turtle; + + # This will do an incremental build of `turtle` by copying the previously + # compiled modules and intermediate build products into the source tree + # before running the build. + # + # GHC will then naturally pick up and reuse these products, making this build + # complete much more quickly than the previous one. + turtle-incremental-build = overrideCabal (drv: { + previousIntermediates = turtle-full-build-with-incremental-output.intermediates; + }) turtle; +in + turtle-incremental-build.overrideAttrs (old: { + meta = { + maintainers = lib.teams.mercury.members; + }; + })