Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haskell-cabal2nix template not working out of the box #4

Open
MaxDaten opened this issue Jun 23, 2021 · 1 comment
Open

haskell-cabal2nix template not working out of the box #4

MaxDaten opened this issue Jun 23, 2021 · 1 comment

Comments

@MaxDaten
Copy link

MaxDaten commented Jun 23, 2021

$ nix --version
nix (Nix) 2.4pre20210601_5985b8b

Hi,

I'm currently diving into nix flakes, thanks for your blog post about flakes. I'm following this guide to generate a cabal2nix hakyll site-generator project: https://serokell.io/blog/practical-nix-flakes#packaging-existing-applications

executing (in a subfolder of my repo):

nix flake init -t github:serokell/templates#haskell-cabal2nix

places excatly this repo's haskell-cabal2nix/flake.nix in my project. I replaced packageName with:

- packageName = throw "put your package name here!";
+ packageName = "site-generator";

executing:

nix build

results in error:

error: builder for '/nix/store/pi1vw77kall69hjql189qdw13hf6zvh7-cabal2nix-site-generator.drv' failed with exit code 1;
       last 2 log lines:
       > installing
       > cabal2nix: nix-prefetch-url: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
       For full logs, run 'nix log /nix/store/pi1vw77kall69hjql189qdw13hf6zvh7-cabal2nix-site-generator.drv'.
(use '--show-trace' to show detailed location information)

changing:

 packages.${packageName} =
-  haskellPackages.callCabal2nix packageName self rec {
+  haskellPackages.callCabal2nix packageName ./. rec {
    # Dependency overrides go here
  };

renders nix build successful.

Am I missing something or is it because of a recent change in nix?

Greetings

Jan

@balsoft
Copy link
Member

balsoft commented Sep 6, 2021

This is a really interesting issue, I'll look into it. Thanks for noticing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants