Merge pull request #296645 from Stunkymonkey/haskell-modules-deprecate-phases

haskell-modules/generic-builder.nix: use runCommand instead of phases
This commit is contained in:
maralorn 2024-08-05 00:30:09 +02:00 committed by GitHub
commit c20c714d7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
{ lib, stdenv, buildPackages, buildHaskellPackages, ghc
, jailbreak-cabal, hscolour, cpphs
, jailbreak-cabal, hscolour, cpphs, runCommand
, ghcWithHoogle, ghcWithPackages
, nodejs
}:
@ -820,8 +820,8 @@ stdenv.mkDerivation ({
lib.optionals (!isCross) setupHaskellDepends);
ghcCommandCaps = lib.toUpper ghcCommand';
in stdenv.mkDerivation {
inherit name shellHook;
in runCommand name {
inherit shellHook;
depsBuildBuild = lib.optional isCross ghcEnvForBuild;
nativeBuildInputs =
@ -829,8 +829,6 @@ stdenv.mkDerivation ({
collectedToolDepends;
buildInputs =
otherBuildInputsSystem;
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
"NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
@ -840,7 +838,7 @@ stdenv.mkDerivation ({
"NIX_${ghcCommandCaps}_LIBDIR" = if ghc.isHaLVM or false
then "${ghcEnv}/lib/HaLVM-${ghc.version}"
else "${ghcEnv}/${ghcLibdir}";
};
} "echo $nativeBuildInputs $buildInputs > $out";
env = envFunc { };