question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Start fails on Nixos

See original GitHub issue

Hi,

I just recently started using Nixos and tested my workflow with Intellij and Haskell on it. When importing for the first time a Haskell project in Intellij, it installs many tools using this command:

~/.nix-profile/bin/stack -j1 --stack-root ~/.cache/intellij-haskell/lts-13 --resolver lts-13 --local-bin-path ~/.cache/intellij-haskell/lts-13/bin install hoogle

However this fails as it requires Zlib which requires special Stack integration. The command is successful if I manually type it in a terminal and add --nix-packages "zlib" option to it:

~/.nix-profile/bin/stack --nix-packages "zlib" -j1 --stack-root ~/.cache/intellij-haskell/lts-13 --resolver lts-13 --local-bin-path ~/.cache/intellij-haskell/lts-13/bin install hoogle

Have I missed something (this is completely possible as I’m a huge noob in Nix/Nixos)? Or is something missing for Nixos use?

Note, in my project stack.yaml it was correctly configured:

resolver: lts-13.26
packages:
  - .
nix:
  enable: true
  packages: 
    - zlib

Cheers!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
rikvdkleijcommented, Jul 20, 2019

Stack’s nix integration is not without flaws.

You can try to add zlib to to shell.nix or default.nix to be sure of zlib in the nix-shell.

I have not so good experience with stack it’s nix integration, especially not on macOS. See https://github.com/commercialhaskell/stack/issues/4406 https://github.com/commercialhaskell/stack/issues/4329

Btw, you can better use nix and cabal new style. But yes, the plugin does not support that yet. It’s on my wish list and did already some preparations.

0reactions
rikvdkleijcommented, May 24, 2020

Thanks for the confirmation.

Eventually the plugin should support Cabal/Nix projects but that’s a separate issue 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xorg/window manager fails on startup - Help - NixOS Discourse
After a nixos-rebuild switch && reboot , the display manager service fails to start. Entering systemctl start display-manager starts lightdm.
Read more >
display-manager.service fails to start #2 #74736 - GitHub
Describe the bug. After booting, the display manager doesn't come up with NixOS 19.09. There's another posted issue with the same symptom ...
Read more >
Can't start X in NixOS - Reddit
Now I want to explore more about XMonad and so tried to start X with either xinit or startx from a text virtual...
Read more >
Nixos 22.05 system build fails when referencing channel "file ...
When running sudo nixos-rebuild --upgrade boot I run into an error of: error: file 'nixos-2111' was not found in the Nix search path...
Read more >
'[Nix-dev] Nixos boot fails at stage 1 in virtualbox' - MARC
[prev in thread] [next in thread] List: nix-dev Subject: [Nix-dev] Nixos boot fails at stage 1 ... mkfs.ext4 -j -L nixos /dev/sda1 $...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found