owickstrom / pandoc-include-code

A Pandoc filter for including code from source files
Mozilla Public License 2.0
139 stars 18 forks source link

Nix build fails - pandoc-types ==1.20 #27

Open chrissound opened 4 years ago

chrissound commented 4 years ago

Just thought I'd report this - not really an issue for myself - I can successfully use (7e4d9d967ff3e3855a7eae48408c43b3400ae6f4) in the meantime.

On the latest commit on master (fa7719659a7c20cddd30375e78d67f3d43161c58):

I suppose this issue might be as pandoc-types would possible be some other version on nixpkgs as opposed to 1.20. I think this could be solved with an override.

nix-build
building '/nix/store/da06a06zdzl608gfk8m7x8rzgzchw2sz-cabal2nix-pandoc-include-code.drv'...
installing
these derivations will be built:
  /nix/store/6j786nwvfydajl010ra4nqglpmrb4fvm-pandoc-include-code-1.5.0.0.drv
building '/nix/store/6j786nwvfydajl010ra4nqglpmrb4fvm-pandoc-include-code-1.5.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/xf5zihz12kszk0xiv6c0d0psc0mj10xs-ghc-8.6.5.
unpacking sources
unpacking source archive /nix/store/gm1yghz70lbwkglbvm9vmlscy5pkh064-pandoc-include-code
source root is pandoc-include-code
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/1d7fhkv2wcswznpbdc53j7j5kvjgk9pj-pandoc-include-code-1.5.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --datadir=/nix/store/8sa1jmawjiil3z71yj4f9kppcp50lhza-pandoc-include-code-1.5.0.0-data/share/ghc-8.6.5 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --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/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/j1gs46vkawlk9mz8lc9g0xfi94hwrcv7-libffi-3.2.1/lib --extra-lib-dirs=/nix/store/av3zmkb577zk4ds4xhzixdhvdvh726r7-gmp-6.1.2/lib
Using Parsec parser
Configuring pandoc-include-code-1.5.0.0...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:950:20 in Cabal-2.4.0.1:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:460:12 in Cabal-2.4.0.1:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.4.0.1:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.4.0.1:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.4.0.1:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.4.0.1:Distribution.Simple
  defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
pandoc-types ==1.20

builder for '/nix/store/6j786nwvfydajl010ra4nqglpmrb4fvm-pandoc-include-code-1.5.0.0.drv' failed with exit code 1
error: build of '/nix/store/6j786nwvfydajl010ra4nqglpmrb4fvm-pandoc-include-code-1.5.0.0.drv' failed
turion commented 3 years ago

Yes, maybe it shouldn't have such restrictive upper version bounds.

turion commented 3 years ago

I created a package set with:

pkgs.haskellPackages.override {
    overrides = self: super: {
      pandoc-include-code = pkgs.haskell.lib.doJailbreak super.pandoc-include-code;
    };
  };

So it seems like it builds with pandoc-types==1.22.

turion commented 3 years ago

Workaround in nixpkgs: https://github.com/NixOS/nixpkgs/pull/106084

But it would be nicer to have loose upper version bounds, then such a workaround wasn't necessary.