purebred-mua / purebred

A terminal based mail user agent based on notmuch
GNU Affero General Public License v3.0
139 stars 19 forks source link

Nix build is broken #479

Closed lucc closed 1 year ago

lucc commented 1 year ago

Describe the bug

The nix build is broken. It errors during compilation.

To Reproduce

Run nix build github:purebred-mua/purebred.

The log:

@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/3mkv7bqwqj6s5hqgf4lyrzq0bxi9qs7y-ghc-9.0.1.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/xlp3jvp0nw37a05hz1mrfiqrmcblyc5g-9d9sb9km4i49f5jj1chnqxmaqxi9cxzm-source
source root is 9d9sb9km4i49f5jj1chnqxmaqxi9cxzm-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )
Linking Setup ...
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configureFlags: --verbose --prefix=/nix/store/x6wza9dl0lqhp0v6qwj0xa7w8wmkgk3d-purebred-0.1.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/lbmky2nmsnqs0hygkx6sx6kznq5lrwvk-purebred-0.1.0.0-doc/share/doc/purebred-0.1.0.0 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-options=-j4 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/jzjqfff4cldlm2wpld313a2s1v6r3ycb-ncurses-6.2/lib --extra-lib-dirs=/nix/store/2z8hacx9dphisbf7syd9hvkiw4578r23-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/cwpvavf3z4dyrxmgm8jayadfr1ra8fkp-gmp-6.2.1/lib
Using Parsec parser
Configuring purebred-0.1.0.0...

Setup: Encountered missing or private dependencies:
brick >=1.0, stm-delay >=0.1

Expected behavior

The build should succeed and put the compiled executable in result/bin/purebred

lucc commented 1 year ago

I think the offending commit is e7f0b93974f087438bcf4fe50181eafe95312abd because the file .nix/brick.nix was not updated:

I tried this patch

diff --git a/.nix/brick.nix b/.nix/brick.nix
index 5e699aa..21b4e87 100644
--- a/.nix/brick.nix
+++ b/.nix/brick.nix
@@ -6,8 +6,8 @@
 }:
 mkDerivation {
   pname = "brick";
-  version = "0.73";
-  sha256 = "741c8d0717f0ab5addd5d3acc88cb36d645a0c73907bde509b2fd9d9bc02039c";
+  version = "1.0";
+  sha256 = "sha256-c4EgdcHCEXYbrWVHjcfhi/geFwO5hYMTOvlvDxjVIAM=";
   isLibrary = true;
   isExecutable = true;
   libraryHaskellDepends = [

but then I get an error when compiling brick:

@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/3mkv7bqwqj6s5hqgf4lyrzq0bxi9qs7y-ghc-9.0.1.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/s22jmzwin46rmmbx971vga8qsa1zzn3p-brick-1.0.tar.gz
source root is brick-1.0
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file brick-1.0/tests/Render.hs
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )
Linking Setup ...
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configureFlags: --verbose --prefix=/nix/store/2bal0s5kisvqbbhbm8xhazcd4j4kfiw3-brick-1.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/z5byv8gb129a6h5a6nk73nz0yhx68r60-brick-1.0-doc/share/doc/brick-1.0 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-options=-j4 +RTS -A64M -RTS --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/jzjqfff4cldlm2wpld313a2s1v6r3ycb-ncurses-6.2/lib --extra-lib-dirs=/nix/store/2z8hacx9dphisbf7syd9hvkiw4578r23-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/cwpvavf3z4dyrxmgm8jayadfr1ra8fkp-gmp-6.2.1/lib
Using Parsec parser
Configuring brick-1.0...

Setup: Encountered missing or private dependencies:
bimap >=0.5 && <0.6

At a first glance bimap seems to be a new dependency for brick 1.0 (at least it is not yet mentioned in the nix code) so I hope that @frasertweedale can take over from here.

romanofski commented 1 year ago

@lucc mind trying out the fix/nix-CI-runs branch? I'm currently having trouble with the CI but happy to merge this first, even tho it wouldn't fix CI.

lucc commented 1 year ago

Sorry I only checked for existing issues. Yes this will be fixed by #478.

lucc commented 1 year ago

PS: no hurry, I can wait until #478 is finished.