Skip to main content

All 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 ...
Futarimiti's user avatar
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/...
Ingun전인건's user avatar
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'...
Jonathan Gallagher's user avatar
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 ...
Ari Fordsham's user avatar
  • 2,515
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? ...
majkrzak's user avatar
  • 1,555
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....
bbarker's user avatar
  • 13.2k
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 {...
eatt1029's user avatar
  • 103
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: ...
eatt1029's user avatar
  • 103
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 ...
R Beckett's user avatar
  • 105
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 ...
Chris Stryczynski's user avatar
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....
George's user avatar
  • 7,337
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 ...
George's user avatar
  • 7,337
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 ...
Rodolpho Pueyrredón's user avatar
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 ...
George's user avatar
  • 7,337
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-...
George's user avatar
  • 7,337

15 30 50 per page