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

Agda is fetched but fails to build #212

Open
carnotweat opened this issue Dec 19, 2022 · 2 comments
Open

Agda is fetched but fails to build #212

carnotweat opened this issue Dec 19, 2022 · 2 comments

Comments

@carnotweat
Copy link

carnotweat commented Dec 19, 2022

:PROPERTIES:
:ID: fe21a8c0-36d5-40f4-b3de-d78dcd1687b1
:END:
#+title: 2022-12-19

  • github issue
    Build with /nix/store/qvzsdj4q4fsali22q7488qxdxnl551gx-ghc-8.6.4.
    unpacking sources
    unpacking source archive /nix/store/7d86sgv4my21v3424l1c7vy6jvm3bid1-Agda-2.5.4.2.tar.gz
    source root is Agda-2.5.4.2
    setting SOURCE_DATE_EPOCH to timestamp 1540830739 of file Agda-2.5.4.2/stack-8.4.4.yaml
    patching sources
    compileBuildDriverPhase
    setupCompileFlags: -package-db=/build/setup-package.conf.d -j3 -threaded
    [1 of 1] Compiling Main ( Setup.hs, /build/Main.o )

Setup.hs:23:56: error:
• Couldn't match type ‘Distribution.System.Platform -> String’
with ‘[Char]’
Expected type: String
Actual type: Distribution.System.Platform -> String
• Probable cause: ‘exeExtension’ is applied to too few arguments
In the second argument of ‘(<.>)’, namely ‘exeExtension’
In the second argument of ‘(</>)’, namely ‘"agda" <.> exeExtension’
In the second argument of ‘(</>)’, namely
‘"agda" </> "agda" <.> exeExtension’
|
23 | agda = buildDir info </> "agda" </> "agda" <.> exeExtension
| ^^^^^^^^^^^^
error: builder for '/nix/store/nykrs3z1a8wmav9c27pi64zc5jkar6p6-Agda-2.5.4.2.drv' failed with exi$
error: 1 dependencies of derivation '/nix/store/v2ngrajw3iiy8gszr96hxj2b9f9l53z1-ghc-8.6.4-with-p$
error: 1 dependencies of derivation '/nix/store/c3v17xmw3656syd5njd73d07np8yfwii-snack.drv' faile
$
To reproduce it
add agda to bin/package.nix dep list , followed by nix-shell

@nmattia
Copy link
Owner

nmattia commented Dec 20, 2022

Hi,

Just to be clear, Snack was a one-off thing and is unmaintained!

That being said, it looks like this exeExtension needs an argument of type Platform:

agda = buildDir info </> "agda" </> "agda" <.> exeExtension

@carnotweat
Copy link
Author

I ll try that, also a clearer error message I get now (without agda) as I try snack run ghc
or ghcup
at /nix/store/r8iifjq4qp3hwmcd5hfn9ff9cyjkbk17-source/lib/sources.nix:49:17:

       48|       filter = filter';
       49|       outPath = builtins.filterSource filter' origSrc;
         |                 ^
       50|       _isLibCleanSourceWith = true;

(use '--show-trace' to show detailed location information)

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