| 6 Jan 2025 |
maralorn | The haskell library ghc-internal is a core package and thus included in the package db from our ghc derivation. | 22:32:41 |
maralorn | What is most likely broken is building the nix derivation for an independent ghc-internal package. | 22:33:34 |
maralorn | But that has no use anyway because it is either the bundled version or an incompatible version. | 22:34:09 |
maralorn | Because of this there should be a ghc-internal = null; file in a configuration-ghc-....nix file in nixpkgs. | 22:35:16 |
maralorn | * Because of this there should be a ghc-internal = null; override in a configuration-ghc-....nix file in nixpkgs. | 22:35:30 |
maralorn | João Moreira: How did you encounter the breakage? | 22:36:09 |
| 7 Jan 2025 |
João Moreira | In reply to @maralorn:maralorn.de João Moreira: How did you encounter the breakage? I made this derivation
{ lib
, mkDerivation
, fetchFromGitHub
, haskellPackages
}:
mkDerivation rec {
pname = "kind-lang";
version = "unstable-2024-12-09";
src = fetchFromGitHub {
owner = "higherorderco";
repo = "kind";
rev = "5cfff210b3aeed01ebd73b2364cf9e5d2df658af";
hash = "sha256-gHJ+eruwsybjRc5f1VWsof2jWQjuO/9nhOMKAvuMl7w=";
};
postPatch = ''
substituteInPlace kind-lang.cabal \
--replace "==" "^>="
'';
isLibrary = false;
isExecutable = true;
libraryHaskellDepends = with haskellPackages; [
ansi-terminal_1_1_1
base_4_20_0_1
containers_0_7
directory_1_3_9_0
filepath_1_5_3_0
hs-highlight
mtl_2_3_1
parsec_3_1_17_0
];
executableHaskellDepends = with haskellPackages; [
ansi-terminal_1_1_1
base_4_20_0_1
directory_1_3_9_0
filepath_1_5_3_0
hs-highlight
mtl_2_3_1
];
# Test suite does nothing.
doCheck = false;
description = "A modern proof language";
mainProgram = "kind";
homepage = "https://github.com/higherorderco/kind";
changelog = "https://github.com/higherorderco/kind/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
}
then
nix-build -E 'with import <nixpkgs> {}; haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ./default.nix {})'
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'kind-lang-unstable-2024-12-09'
whose name attribute is located at /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'buildInputs' of derivation 'kind-lang-unstable-2024-12-09'
at /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/stdenv/generic/make-derivation.nix:383:7:
382| depsHostHost = elemAt (elemAt dependencies 1) 0;
383| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
384| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘ghc-internal-9.1001.0’ in /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/development/haskell-modules/hackage-packages.nix:121205 is marked as broken, refusing to evaluate.
Then I looked into https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/hackage-packages.nix#L121214
AND
- https://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellPackages.ghc-internal.x86_64-linux#tabs-status
- https://cache.nixos.org/log/bxhkzb647jdfnr228kw4hrkrwz9bcm9k-ghc-internal-9.1001.0.drv
Error: Setup: Encountered missing or private dependencies:
ghc-prim >=0.11 && <0.12
But maybe that specific error not valid anymore
nix search nixpkgs#haskellPackages ghc-prim
* legacyPackages.x86_64-linux.haskellPackages.ghc-prim_0_11_0 (0.11.0)
| 00:18:16 |
João Moreira | In reply to @maralorn:maralorn.de João Moreira: How did you encounter the breakage? * I made this derivation
{ lib
, mkDerivation
, fetchFromGitHub
, haskellPackages
}:
mkDerivation rec {
pname = "kind-lang";
version = "unstable-2024-12-09";
src = fetchFromGitHub {
owner = "higherorderco";
repo = "kind";
rev = "5cfff210b3aeed01ebd73b2364cf9e5d2df658af";
hash = "sha256-gHJ+eruwsybjRc5f1VWsof2jWQjuO/9nhOMKAvuMl7w=";
};
postPatch = ''
substituteInPlace kind-lang.cabal \
--replace "==" "^>="
'';
isLibrary = false;
isExecutable = true;
libraryHaskellDepends = with haskellPackages; [
ansi-terminal_1_1_1
base_4_20_0_1
containers_0_7
directory_1_3_9_0
filepath_1_5_3_0
hs-highlight
mtl_2_3_1
parsec_3_1_17_0
];
executableHaskellDepends = with haskellPackages; [
ansi-terminal_1_1_1
base_4_20_0_1
directory_1_3_9_0
filepath_1_5_3_0
hs-highlight
mtl_2_3_1
];
# Test suite does nothing.
doCheck = false;
description = "A modern proof language";
mainProgram = "kind";
homepage = "https://github.com/higherorderco/kind";
changelog = "https://github.com/higherorderco/kind/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
}
then
nix-build -E 'with import <nixpkgs> {}; haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ./default.nix {})'
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'kind-lang-unstable-2024-12-09'
whose name attribute is located at /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'buildInputs' of derivation 'kind-lang-unstable-2024-12-09'
at /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/stdenv/generic/make-derivation.nix:383:7:
382| depsHostHost = elemAt (elemAt dependencies 1) 0;
383| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
384| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘ghc-internal-9.1001.0’ in /nix/store/c9wv7i0af6mysmy65x6nvyfw5izzxv4g-source/pkgs/development/haskell-modules/hackage-packages.nix:121205 is marked as broken, refusing to evaluate.
Then I looked into https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/hackage-packages.nix#L121214
121202: "ghc-internal" = callPackage
121203- ({ mkDerivation, ghc-bignum, ghc-prim, rts }:
121204- mkDerivation {
121205- pname = "ghc-internal";
121206- version = "9.1001.0";
121207- sha256 = "0z38v4gnyis99r3rli2g3dyg948d98lhd1ylz5irbghnvrn8myhl";
121208- revision = "1";
121209- editedCabalFile = "1rx55yc51xaarcyj8mgrdn6pmr8ri2n962h813dy5vc1pj49g8yz";
121210- libraryHaskellDepends = [ ghc-bignum ghc-prim rts ];
121211- description = "Basic libraries";
121212- license = lib.licenses.bsd3;
121213- hydraPlatforms = lib.platforms.none;
121214- broken = true;
121215- }) {};
AND
- https://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellPackages.ghc-internal.x86_64-linux#tabs-status
- https://cache.nixos.org/log/bxhkzb647jdfnr228kw4hrkrwz9bcm9k-ghc-internal-9.1001.0.drv
Error: Setup: Encountered missing or private dependencies:
ghc-prim >=0.11 && <0.12
But maybe that specific error not valid anymore
nix search nixpkgs#haskellPackages ghc-prim
* legacyPackages.x86_64-linux.haskellPackages.ghc-prim_0_11_0 (0.11.0)
| 00:22:07 |
João Moreira | hm no, still error on the same thing
nix build --print-build-logs '~/nixpkgs/master#haskellPackages.ghc-internal'
ghc-internal> trying https://hackage.haskell.org/package/ghc-internal-9.1001.0/revision/1.cabal
ghc-internal> % Total % Received % Xferd Average Speed Time Time Time Current
ghc-internal> Dload Upload Total Spent Left Speed
ghc-internal> 100 15281 0 15281 0 0 7052 0 --:--:-- 0:00:02 --:--:-- 7054
ghc-internal> Running phase: setupCompilerEnvironmentPhase
ghc-internal> Build with /nix/store/pb9lljj3m0i6m3x30759k80pq5cf4sqi-ghc-9.6.6.
ghc-internal> Running phase: unpackPhase
ghc-internal> unpacking source archive /nix/store/xm2kz91j6cfpa05afd2ql4m0ywc3bvg2-ghc-internal-9.1001.0.tar.gz
ghc-internal> source root is ghc-internal-9.1001.0
ghc-internal> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file ghc-internal-9.1001.0/src/GHC/Internal/Word.hs
ghc-internal> Running phase: patchPhase
ghc-internal> Replace Cabal file with edited version from mirror://hackage/ghc-internal-9.1001.0/revision/1.cabal.
ghc-internal> Running phase: compileBuildDriverPhase
ghc-internal> setupCompileFlags: -package-db=/build/tmp.q8BpJrEO8y/setup-package.conf.d -threaded
ghc-internal> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.q8BpJrEO8y/Main.o )
ghc-internal> [2 of 2] Linking Setup
ghc-internal> Running phase: updateAutotoolsGnuConfigScriptsPhase
ghc-internal> Running phase: configurePhase
ghc-internal> configureFlags: --verbose --prefix=/nix/store/xs0nnkzmqqcwh027zfipq7rxaw6i456r-ghc-internal-9.1001.0 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/d7x4vnaxjpwvvxff9n8ydm81zsg0vchm-ghc-internal-9.1001.0-doc/share/doc/ghc-internal-9.1001.0 --with-gcc=gcc --package-db=/build/tmp.q8BpJrEO8y/package.conf.d --ghc-option=-j4 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/wm1qn5jqrxpcjkc640gq8a90ns5gw3cn-ncurses-6.4.20221231/lib --extra-lib-dirs=/nix/store/r04wysx6yl7ys1rdv1b1lih6in1810r0-libffi-3.4.6/lib --extra-lib-dirs=/nix/store/wkysiv0sxqs6wn44nb46bbyig4plzsy4-elfutils-0.192/lib --extra-lib-dirs=/nix/store/ghb61mqc90qf1nx6kyahhhagicyxvcyg-gmp-with-cxx-6.3.0/lib
ghc-internal> Using Parsec parser
ghc-internal> Configuring ghc-internal-9.1001.0...
ghc-internal> CallStack (from HasCallStack):
ghc-internal> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0:Distribution.Simple.Utils
ghc-internal> Error: Setup: Encountered missing or private dependencies:
ghc-internal> ghc-prim >=0.11 && <0.12
error: builder for '/nix/store/lbh2vgpqn9i7spr8hzzi3c72pva4pymm-ghc-internal-9.1001.0.drv' failed with exit code 1;
last 22 log lines:
> Running phase: setupCompilerEnvironmentPhase
> Build with /nix/store/pb9lljj3m0i6m3x30759k80pq5cf4sqi-ghc-9.6.6.
> Running phase: unpackPhase
> unpacking source archive /nix/store/xm2kz91j6cfpa05afd2ql4m0ywc3bvg2-ghc-internal-9.1001.0.tar.gz
> source root is ghc-internal-9.1001.0
> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file ghc-internal-9.1001.0/src/GHC/Internal/Word.hs
> Running phase: patchPhase
> Replace Cabal file with edited version from mirror://hackage/ghc-internal-9.1001.0/revision/1.cabal.
> Running phase: compileBuildDriverPhase
> setupCompileFlags: -package-db=/build/tmp.q8BpJrEO8y/setup-package.conf.d -threaded
> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.q8BpJrEO8y/Main.o )
> [2 of 2] Linking Setup
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> configureFlags: --verbose --prefix=/nix/store/xs0nnkzmqqcwh027zfipq7rxaw6i456r-ghc-internal-9.1001.0 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/d7x4vnaxjpwvvxff9n8ydm81zsg0vchm-ghc-internal-9.1001.0-doc/share/doc/ghc-internal-9.1001.0 --with-gcc=gcc --package-db=/build/tmp.q8BpJrEO8y/package.conf.d --ghc-option=-j4 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/wm1qn5jqrxpcjkc640gq8a90ns5gw3cn-ncurses-6.4.20221231/lib --extra-lib-dirs=/nix/store/r04wysx6yl7ys1rdv1b1lih6in1810r0-libffi-3.4.6/lib --extra-lib-dirs=/nix/store/wkysiv0sxqs6wn44nb46bbyig4plzsy4-elfutils-0.192/lib --extra-lib-dirs=/nix/store/ghb61mqc90qf1nx6kyahhhagicyxvcyg-gmp-with-cxx-6.3.0/lib
> Using Parsec parser
> Configuring ghc-internal-9.1001.0...
> CallStack (from HasCallStack):
> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0:Distribution.Simple.Utils
> Error: Setup: Encountered missing or private dependencies:
> ghc-prim >=0.11 && <0.12
>
For full logs, run 'nix log /nix/store/lbh2vgpqn9i7spr8hzzi3c72pva4pymm-ghc-internal-9.1001.0.drv'.
| 00:35:36 |
maralorn | Manually specifying the dependency versions in your nix derivation is probably a bad idea. | 00:35:59 |
maralorn | You are overriding the base version. That is not gonna work. | 00:37:24 |
maralorn | You get this specific error because you are picking base_4_20 which is apparently a derivation which exists in nixpkgs but currently has no use and depends on the broken ghc-internal. | 00:38:33 |
João Moreira | maralorn: that did it, thank you very much! I've been trying to find it, but couldn't... so is there a standard way to override default ghc version/package in cabal2nix? | 01:35:11 |
João Moreira | * maralorn: that did it, thank you very much! I've been trying to find it, but couldn't... so is there a standard way to override default ghc package in cabal2nix | 01:35:53 |
João Moreira | * maralorn: that did it, thank you very much! I've been trying to find it, but couldn't... so is there a standard way to override default ghc package in cabal2nix (i need to use a different version e.g. haskell.compiler.ghc98. | 01:37:19 |
João Moreira | * maralorn: that did it, thank you very much! I've been trying to find it, but couldn't... so is there a standard way to override default ghc package in cabal2nix (i need to use a different version e.g. haskell.compiler.ghc98) | 01:37:26 |
maralorn | Replace haskellPackages with haskell.packages.ghc98 | 01:44:11 |
| raboof left the room. | 06:43:25 |
João Moreira | maralorn: derivation built successfully! tested it and it's working! thank you very much! i might contribute it to nixpkgs | 11:38:46 |
| @immae:immae.eu left the room. | 12:09:28 |
alexfmpe | If you put it on hackage it will eventually propagate to nixpkgs | 12:14:14 |
alexfmpe | Valeu! | 12:14:21 |
hellwolf | https://discourse.haskell.org/t/please-contribute-to-the-ghc-9-10-breakage-inventory/9533/18?u=hellwolf
I don't know if I was right to suggest that | 14:29:59 |
sterni (he/him) | probably a good idea although we haven't seen a lot of fixes to 9.10 so far, so it's not comprehensive, really | 17:38:42 |
sterni (he/him) | damn it's depressing seeing other people's overlays for e.g. 9.10 support that just never get contributed back upstream | 17:39:55 |
sterni (he/him) | nixpkgs without overlays when 😵💫 | 17:40:14 |
alexfmpe | Man, the amount of .nix churn there was on the reflex/obsidian ecosystem | 17:56:54 |
alexfmpe | Just for CI | 17:56:59 |
alexfmpe | Imagine lazy evaluation as a task prioritization strategy | 17:57:29 |
alexfmpe | That's what it looked like | 17:57:39 |