Open jneem opened 6 days ago
Hm, unfortunately using a nixpkgs that's older than my system's nixpkgs doesn't work very well, possibly because of this. In my new organist shell, running stack new testpkg
gives
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'myEnv'
whose name attribute is located at /nix/store/fwdi5pvgkw12gr4mx7n35smj76dyy0k2-qk1dpz44db85rhd8lr4j6i2hkn9j5hg4-source/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'LD_LIBRARY_PATH' of derivation 'myEnv'
at «string»:1:411:
1| with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc965 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}/lib'' ''--extra-include-dirs=${lib.getDev pkg}/include'' ]) inputs; in runCommand ''myEnv'' { buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; STACK_PLATFORM_VARIANT=''nix''; STACK_IN_NIX_SHELL=1; LD_LIBRARY_PATH = libPath;STACK_IN_NIX_EXTRA_ARGS = stackExtraArgs; LANG="en_US.UTF-8";} ""
| ^
error: attribute 'ghc965' missing
at «string»:1:43:
1| with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc965 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}/lib'' ''--extra-include-dirs=${lib.getDev pkg}/include'' ]) inputs; in runCommand ''myEnv'' { buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; STACK_PLATFORM_VARIANT=''nix''; STACK_IN_NIX_SHELL=1; LD_LIBRARY_PATH = libPath;STACK_IN_NIX_EXTRA_ARGS = stackExtraArgs; LANG="en_US.UTF-8";} ""
| ^
Did you mean one of ghc925, ghc945, ghc96, ghc962 or ghc963?
Thanks for reporting that.
The HaskellStack shell is currently using some Nix trickery to get ormolu from the closure of hls (because ormolu-in-the-path and ormolu-in-the-lsp have to match to avoid inconsistencies in the formatting):
But the layout of the dependencies of hls changed between 23.11 and 24.05, breaking that.
I'm working on a fix to be compatible with both, will open a PR as soon as it's ready.
With a newly created organist environment, trying to use the
HaskellStack
shell fails withMaybe this is because hls-ormolu-plugin is broken?
Anyway, changing
nixpkgs
tonixpkgs/nixos-23.11
fixes it (but not 24.05; that's still broken).