snack icon indicating copy to clipboard operation
snack copied to clipboard

Agda is fetched but fails to build

Open 0xameer opened this issue 3 years ago • 2 comments

: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

0xameer avatar Dec 19 '22 09:12 0xameer

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

nmattia avatar Dec 20 '22 10:12 nmattia

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)

0xameer avatar Dec 22 '22 19:12 0xameer