owickstrom / pandoc-include-code

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

Does not build on NixOS #6

Closed dotlambda closed 6 years ago

dotlambda commented 6 years ago

Doing nix-env -f "<nixpkgs>" -iA haskellPackages.pandoc-include-code results in this error:

installing ‘pandoc-include-code-1.2.0.1’
these derivations will be built:
  /nix/store/7260hv49gdrhb2rav8a9w74z7ij21z7c-pandoc-include-code-1.2.0.1.drv
building path(s) ‘/nix/store/369yv33a1wxdilinq1538j052rby7929-pandoc-include-code-1.2.0.1’, ‘/nix/store/ha5s86xcysb3l2smjy52193m0wzpjrck-pandoc-include-code-1.2.0.1-doc’
setupCompilerEnvironmentPhase
Build with /nix/store/qfqapyxjch75m64xp3ck7c83kilwfjxq-ghc-8.2.2.
unpacking sources
unpacking source archive /nix/store/a4dj335vw91pvlg0pjmzjsccg3gx14c5-pandoc-include-code-1.2.0.1.tar.gz
source root is pandoc-include-code-1.2.0.1
setting SOURCE_DATE_EPOCH to timestamp 1509795532 of file pandoc-include-code-1.2.0.1/pandoc-include-code.cabal
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-pandoc-include-code-1.2.0.1.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /tmp/nix-build-pandoc-include-code-1.2.0.1.drv-0/Main.o )

Setup.hs:29:22: error:
    • Couldn't match expected type ‘Distribution.Types.UnqualComponentName.UnqualComponentName’
                  with actual type ‘[Char]’
    • In the second argument of ‘(==)’, namely ‘"oden-exe"’
      In the expression: exeName exe == "oden-exe"
      In a stmt of a pattern guard for
                     an equation for ‘addIfOden’:
        exeName exe == "oden-exe"
   |
29 |     | exeName exe == "oden-exe" = do
   |                      ^^^^^^^^^^
builder for ‘/nix/store/7260hv49gdrhb2rav8a9w74z7ij21z7c-pandoc-include-code-1.2.0.1.drv’ failed with exit code 1
owickstrom commented 6 years ago

Thanks for reporting! This is a weird copy-paste residue that shouldn't be in this project at all. I've replaced it with a default Setup.hs script, and released version 1.2.0.2 to Hackage.

owickstrom commented 6 years ago

Not sure how soon this is available for you to test against, but please ping me when you've tried with 1.2.0.2.

dotlambda commented 6 years ago

Thanks a lot. Only the tests fail now, but I've already opened a PR for that: #7.