All Questions
26 questions
0
votes
1
answer
53
views
Stack tried to find libgmp then failed, even with no dependencies at all
I use nix-darwin and have enabled nix in ~/.stack/config.yaml.
Earlier today I did a sudo nix-collect-garbage -d then many things begin to break.
Minimum reproducible example:
stack new mwe
cd mwe
...
2
votes
1
answer
128
views
How to push my Haskell Stack build to Cachix
I made some backend using Stack.
My Stack project succeeds when I do stack build --nix and it seems to create a nix package in local project cache directory in which executable is built. (.stack-work/...
5
votes
1
answer
327
views
Is it possible to get Haskell stack to use Haskell packages provided by nix?
I'm developing a Haskell program that will eventually have some non-Haskell dependencies, and I heard that the nix integration in stack is one way to accomplish this. However, I'm now wondering if it'...
5
votes
0
answers
182
views
How can I copy a Haskell project managed with stack to another device for development?
I would like to move Haskell projects between my work computer and my laptop on a USB stick. I'm using the stack build system. My laptop is very often away from the Internet, sometimes when I ...
3
votes
1
answer
188
views
Can cabal/stack/nix be used to compile into dynamic library?
I'm trying to build shared library containing exported ffi code into shared library. I wonder if it is possible to do it with common tools like stack or nix (so basically with cabal)? Is it? Then how?
...
1
vote
0
answers
231
views
Is there a way for `stack --nix` to allow newer versions of ghc to be used?
I'm running stack --nix init for a new project (xmonad config) and getting error: attribute 'ghc863' missing, at (string):1:43; I have ghc 8.6.5 in the environment, and stack --version reports: 2.1.3....
3
votes
2
answers
344
views
How to add a Nix project as dependency in a Haskell Stack+Nix project
I'm trying to write a haskell project using stack + nix. My current stack.yaml and shell.nix are as follows:
resolver: lts-14.6
packages:
- .
nix:
enable: true
pure: true
shell-file: shell.nix
{...
2
votes
1
answer
191
views
stack exec failed when using http-client/http-client-tls in pure nix
I'm using nix, stack and http-client-tls to GET/POST data from/to HTTPS in Haskell.
The problem is, stack exec project-exec fails with:
project-exe: security: createProcess: runInteractiveProcess: ...
5
votes
1
answer
2k
views
How to pass customize environment variable (like password) in stack with nix?
I'm using stack with nix. I need to pass the environment variable as DB password to connect to Postgres while runtime. Currently, I enabled nix in the YAML and customized my own .nix to put the ...
0
votes
1
answer
748
views
Linker errors when trying to compile static executable with stack on Nixos
It seems I might need to add some 'packages' to the nix dependencies, though I'm not sure how to determine which packages (besides a tedious web search for each lm,lrt...)?
stack install
...
2
votes
0
answers
121
views
How to generate FFI dependencies before stack builds my project (with nix)?
I have a Haskell + stack + nix project that makes heavy use of FFI code. The problem is that two of the C files that I depend upon have to be generated before I can compile my Haskell project at large....
3
votes
1
answer
703
views
Setting XDG_RUNTIME_DIR in a Haskell Stack+Nix Project
Problem
I am running a Haskell project on NixOS (using stack) that makes use of XDG_RUNTIME_DIR (in case it matters: it's a wayland compositor project that runs with an X11 backend). When my program ...
3
votes
1
answer
587
views
How create a nix package with haskell stack
I need to create the nix package from a project stack with postgres template.
Basically it is the following: I have a virtual machine with NixOS and I need to portlet my project to another one with ...
4
votes
1
answer
296
views
How to Cache a Haskell Dependency to Speed Up Compilation Time?
Problem: I'm working on a Haskell project that uses stack (+ nix). We have a dependency that takes 10+ minutes to compile. Every time we clean our .stack-work, we have to wait for this huge package to ...
2
votes
1
answer
161
views
Using stack 1.8.0 (the current `stack upgrade --git`) in NixOS?
How does one obtain Stack 1.8.* on NixOS? In general, how does one ensure that the version of stack running on NixOS is the equivalent of the version that would run with stack update --git on a non-...