Last active
October 26, 2019 07:45
-
-
Save PierreR/19646e004c53d1417d587beb46495079 to your computer and use it in GitHub Desktop.
Haskell derivation won't work with nixpkgs 19.09 (or unstable)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
sources = import ../nix/sources.nix; | |
overlay = self: super: { | |
haskellPackages = super.haskellPackages.override { | |
overrides = self: super: { | |
language-puppet = import ./language-puppet.nix { }; | |
unit-test = self.callPackage ./unit-test.nix {}; | |
}; | |
}; | |
}; | |
pkgs = import sources.nixpkgs { config = {}; overlays = [ overlay ]; }; | |
in | |
pkgs.haskellPackages.unit-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
sources = import ../nix/sources.nix; | |
pkgs = import sources.nixpkgs { }; | |
language-puppet = import ./language-puppet.nix {} ; | |
filter = path: type: | |
type != "symlink" | |
&& baseNameOf path != "puppet-env"; | |
unit-test = pkgs.haskell.lib.dontHaddock | |
(pkgs.haskellPackages.callCabal2nix "puppet-unit-test" (builtins.path { | |
name = "puppet-unit-test"; | |
inherit filter; | |
path = ./.; | |
}) { inherit language-puppet;}); | |
in | |
unit-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
→ nix-build 100 ↵ | |
building '/nix/store/ik2844fvdqxw6w8bwcxkbxqsm9z2n7iz-cabal2nix-puppet-unit-test.drv'... | |
installing | |
these derivations will be built: | |
/nix/store/q84w0l15qi2i8k8d3hcwlvds3gvm7wh1-puppet-unit-test-3.6.2.drv | |
building '/nix/store/q84w0l15qi2i8k8d3hcwlvds3gvm7wh1-puppet-unit-test-3.6.2.drv'... | |
setupCompilerEnvironmentPhase | |
Build with /nix/store/hcrblsvvbmamb2lwsv68n87dvncr6pq3-ghc-8.6.5. | |
unpacking sources | |
unpacking source archive /nix/store/s3l8yj5fhrc3f2cijsf95r7k5byf5mgw-puppet-unit-test | |
source root is puppet-unit-test | |
patching sources | |
compileBuildDriverPhase | |
setupCompileFlags: -package-db=/build/setup-package.conf.d -j3 -threaded | |
[1 of 1] Compiling Main ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /build/Main.o ) | |
Linking Setup ... | |
configuring | |
configureFlags: --verbose --prefix=/nix/store/3sqinqllaj1cd116kmmvz30q34h7d6b9-puppet-unit-test-3.6.2 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j3 --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/23wg5gf404zmnn8fixrg8rm38f06hqny-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/fc98gcs4qh953bldnhb7lqqp9fqaxssv-libffi-3.2.1/lib --extra-lib-dirs=/nix/store/4q2rhqn2zppmghfqvsprv4hdn3683c76-gmp-6.1.2/lib --extra-lib-dirs=/nix/store/9a5w3h919cf9njfp9ralcwj5w6mjyiks-language-puppet-1.4.6/lib --extra-lib-dirs=/nix/store/6000vanh3r8ak77i4gpv0qppgrx7hy9b-aeson-1.4.2.0/lib --extra-lib-dirs=/nix/store/l4nl6y6pkflfp11n00314hcnlnbx2gjq-attoparsec-0.13.2.2/lib --extra-lib-dirs=/nix/store/afx59kirwa87x017rgficv7slvv4h2sm-scientific-0.3.6.2/lib --extra-lib-dirs=/nix/store/i2zacp5m2h5shvkh3y353lp3p5hkwg9z-hashable-1.2.7.0/lib --extra-lib-dirs=/nix/store/m0jy15hn181pb2w4g02fl7fhpqbcba9z-integer-logarithms-1.0.2.2/lib --extra-lib-dirs=/nix/store/q6875ph3yvky1r133lf2l7nr00w5my6j-primitive-0.6.4.0/lib --extra-lib-dirs=/nix/store/6796jcacmjy3m1lhjsimdq02pc1c1gx7-base-compat-0.10.5/lib --extra-lib-dirs=/nix/store/m4qp12fx9fcwd1wimnbdqq2b56v40sq9-dlist-0.8.0.5/lib --extra-lib-dirs=/nix/store/irj456aa53n6nn8qnpqa6wqcg3739kvr-tagged-0.8.6/lib --extra-lib-dirs=/nix/store/ssr3nmah6q6h7dp9cjlmv4h0z8v5wf46-th-abstraction-0.2.11.0/lib --extra-lib-dirs=/nix/store/1aj2idn5l2pvw0j16x93qz01rl8v1qp1-time-locale-compat-0.1.1.5/lib --extra-lib-dirs=/nix/store/svg7i4fmjdibs3xnlm9arpfx77ia3vcd-old-locale-1.0.0.7/lib --extra-lib-dirs=/nix/store/iksqki2mw7h3n6hhs4iikidzxk5prihl-unordered-containers-0.2.9.0/lib --extra-lib-dirs=/nix/store/3qvs9kkwcfr05i62scsd8ibiwhdlkfvs-uuid-types-1.0.3/lib --extra-lib-dirs=/nix/store/wm6bw7krqb37i2k4ry7ihwf88sk1gvhb-random-1.1/lib --extra-lib-dirs=/nix/store/pjdvmvac9vakbhi28q5s8akn9jmk6qsj-vector-0.12.0.2/lib --extra-lib-dirs=/nix/store/8wiadjizjrxgby3pw0z0jdwix1js3m56-ansi-wl-pprint-0.6.8.2/lib --extra-lib-dirs=/nix/store/vfw6vb06dmqfk9678p7l53nz8q6jfyki-ansi-terminal-0.8.2/lib --extra-lib-dirs=/nix/store/xf53sq06ncyc32hl7vcv42fgdk2lc60i-colour-2.3.4/lib --extra-lib-dirs=/nix/store/25lgr9fwq7dxybwxzn2xw10b8gk29npd-base16-bytestring-0.1.1.6/lib --extra-lib-dirs=/nix/store/5968mr5izyhd9l3ad75ljqkk2i7jz6ps-case-insensitive-1.2.0.11/lib --extra-lib-dirs=/nix/store/hxznf1f6qhkqj6w6m7gplm81mp68dyl7-cryptonite-0.25/lib --extra-lib-dirs=/nix/store/f33hhnrzwn1sr15zdrnbb4lvjzx19n6g-basement-0.0.10/lib --extra-lib-dirs=/nix/store/6ihmg07fk4fvphbv3krhfl24xyhs2vka-memory-0.14.18/lib --extra-lib-dirs=/nix/store/mqj7m4fky1ggxm5y86kg98r4kr5qsd9a-filecache-0.4.1/lib --extra-lib-dirs=/nix/store/78if87q28i05l14wlvv4nqm98r4dwy42-exceptions-0.10.0/lib --extra-lib-dirs=/nix/store/pxb9bczqkw7zghdn6vnr3z72n103c5dc-transformers-compat-0.6.2/lib --extra-lib-dirs=/nix/store/gvaknzdm1hjdqqbx9z7i38vma2a3sklv-fsnotify-0.3.0.1/lib --extra-lib-dirs=/nix/store/cmkx9vcd8g4y9v8d28dqc0nr2fydj081-async-2.2.1/lib --extra-lib-dirs=/nix/store/63a1n05asagrla3w2524ghcqpmf89vkr-hinotify-0.4/lib --extra-lib-dirs=/nix/store/xp4jsbwdlnc5jk4jjp9c7wj06m974iy4-shelly-1.8.0/lib --extra-lib-dirs=/nix/store/b52mgg0ii6whm1rxr1pikvasxbmxbvwb-enclosed-exceptions-1.0.3/lib --extra-lib-dirs=/nix/store/5gbrglm8wq1sv6riz7gl2rld813hvrql-lifted-base-0.2.3.12/lib --extra-lib-dirs=/nix/store/ap5bmq92bmrh83azgjpxmx58z1k2p172-monad-control-1.0.2.3/lib --extra-lib-dirs=/nix/store/l66nw7jbkvhd5bv3zhh544fxkvr1zv1i-transformers-base-0.4.5.2/lib --extra-lib-dirs=/nix/store/9h1qvxjxs370drmgl79ccdsly98fkryq-base-orphans-0.8/lib --extra-lib-dirs=/nix/store/dlsrhxlmar86q6ir39b770f5zx1p6095-lifted-async-0.10.0.3/lib --extra-lib-dirs=/nix/store/fr23blg54gfb33aqawmxic2k66y2kjjk-constraints-0.10.1/lib --extra-lib-dirs=/nix/store/j2p24lw78jgfjy1dib3g18p62xl85a97-semigroups-0.18.5/lib --extra-lib-dirs=/nix/store/qriir7j12riqzhw3mskf810i2d6cgzm2-system-fileio-0.3.16.4/lib --extra-lib-dirs=/nix/store/ilczrmzczg3fx734d6mmqx49znmwi765-system-filepath-0.4.14/lib --extra-lib-dirs=/nix/store/ilczrmzczg3fx734d6mmqx49znmwi765-system-filepath-0.4.14/lib --extra-lib-dirs=/nix/store/35360a2f4q3xdyf6qfa1sc2l4dnz4kf6-unix-compat-0.5.1/lib --extra-lib-dirs=/nix/store/35360a2f4q3xdyf6qfa1sc2l4dnz4kf6-unix-compat-0.5.1/lib --extra-lib-dirs=/nix/store/rhrczqx7brxydwfncf6jsg5c23lail3p-strict-base-types-0.6.1/lib --extra-lib-dirs=/nix/store/brp1lrcw7k61ncpngzqd7mn4rda8vvyb-bifunctors-5.5.3/lib --extra-lib-dirs=/nix/store/fl8b0bhbzimrf51m406m77s0chl9cbsd-comonad-5.0.4/lib --extra-lib-dirs=/nix/store/r722a7a6fnd1ldr95c2cga1y5ii1qf6g-contravariant-1.5/lib --extra-lib-dirs=/nix/store/2hfimjvb0qkksxbail93w5j2q3h6hmya-StateVar-1.1.1.1/lib --extra-lib-dirs=/nix/store/0ll6sjz9gi2v5sbk8xy3jgi8ws3kw7ix-distributive-0.6/lib --extra-lib-dirs=/nix/store/p0v0j7cix5by7im9ilfylkzbbwfqflmp-lens-4.17/lib --extra-lib-dirs=/nix/store/3xxjn3wwzqm669pvw1aiwxlljcclmymz-call-stack-0.1.0/lib --extra-lib-dirs=/nix/store/m04bdqcd3qzmmq5yyqzm07s4cnrmpifc-free-5.1/lib --extra-lib-dirs=/nix/store/swqn4m9a0axcpxh0kfi1j1i8r3ia4rfk-profunctors-5.3/lib --extra-lib-dirs=/nix/store/xjgb057i3i1a5sr7c22qm0rvv27xi4wy-semigroupoids-5.3.2/lib --extra-lib-dirs=/nix/store/6273gni3mgdxbhzbzbfhax5rl1rhwmzf-kan-extensions-5.2/lib --extra-lib-dirs=/nix/store/82kazj6q2dacm74xmcipnbfi4yvvzxkx-adjunctions-4.4/lib --extra-lib-dirs=/nix/store/adhnzps87ffr6bjsnxix2nhsi9567z1c-void-0.7.2/lib --extra-lib-dirs=/nix/store/p5ykac6kq5j32y9gkwbz0fx6fjqy5wnm-invariant-0.5.1/lib --extra-lib-dirs=/nix/store/vl93fikh4hg0m7ic3s7rm7ygp0cr59v1-parallel-3.2.2.0/lib --extra-lib-dirs=/nix/store/gw9jyy88pkvl53hhcg9l1m8srwd6558z-reflection-2.1.4/lib --extra-lib-dirs=/nix/store/pqjxa7y0nvxg3zi0vcc95i0jzzg4jq7w-QuickCheck-2.12.6.1/lib --extra-lib-dirs=/nix/store/8g5i06dayz54kzzkpd13xnhb48y2bg6p-erf-2.0.0.0/lib --extra-lib-dirs=/nix/store/cl50kid59kqmhk076phrx01f541zrr6l-tf-random-0.5/lib --extra-lib-dirs=/nix/store/qx9p77mvsjhw407996igs8i1b20r2kmr-strict-0.3.2/lib --extra-lib-dirs=/nix/store/s994ybr2dw0xlzgajzlss8zc8kgp65kb-formatting-6.3.7/lib --extra-lib-dirs=/nix/store/jdwx2gw0fqd02h85qisb5l6pliw4yhfx-clock-0.7.2/lib --extra-lib-dirs=/nix/store/dfj2dv81fkv1v3x6lmdk9rnjjj1nj1f8-hruby-0.3.6/lib --extra-lib-dirs=/nix/store/7xc26bz0wiq2mgyackms1b400kk02saj-hslogger-1.2.12/lib --extra-lib-dirs=/nix/store/xsxpx8n6ch9ma1pic12zvzfawypj3n21-network-2.8.0.0/lib --extra-lib-dirs=/nix/store/2ly4gagmh7mycm2y4ijbfnwc605i3lzn-http-api-data-0.4/lib --extra-lib-dirs=/nix/store/rr6pia1qpd35ppk05bhlx13d5zmmwlq0-attoparsec-iso8601-1.0.1.0/lib --extra-lib-dirs=/nix/store/3r0vimvci8c1bflcf4dx7b48r7gqr89v-cookie-0.4.4/lib --extra-lib-dirs=/nix/store/bhbrpk38if6y5kia154fh298accwy7yj-data-default-class-0.1.2.0/lib --extra-lib-dirs=/nix/store/a577s8r52gnp26b1n8857wgfbhz6x8hz-http-types-0.12.3/lib --extra-lib-dirs=/nix/store/4javi12mad5xw2v3frcn6haz6xwwkx64-http-client-0.5.14/lib --extra-lib-dirs=/nix/store/27c84pyggsar39bzr304k2bwwi9f94iv-blaze-builder-0.4.1.0/lib --extra-lib-dirs=/nix/store/z933bsxq0smgqsyfkvsymkpz5p1h4wpp-mime-types-0.1.0.9/lib --extra-lib-dirs=/nix/store/cbzisw03d9qxxmfayxqqybyi280d2chs-network-uri-2.6.1.0/lib --extra-lib-dirs=/nix/store/bn4ndn1qci6gb56csnvcq5xj92s6dcz2-streaming-commons-0.2.1.0/lib --extra-lib-dirs=/nix/store/hxr252a4rrw4r26dbwsrq04dk5ldls26-zlib-0.6.2/lib --extra-lib-dirs=/nix/store/8m5y7nqhf60y1yjm1zslp6lv73a5pxym-lens-aeson-1.0.2/lib --extra-lib-dirs=/nix/store/i7n6bsnjs3z35q569c8c49d07ywkml77-megaparsec-7.0.4/lib --extra-lib-dirs=/nix/store/ms8aif89pfpc6j9z5mbwlvfh72c4j14z-parser-combinators-1.0.1/lib --extra-lib-dirs=/nix/store/v7fl6kfx3z31x0hnqlb0yr1wgf5nvn5c-operational-0.2.3.5/lib --extra-lib-dirs=/nix/store/d9xsdfca08qaff7ylsz2wmfcmmsdqzgv-pcre-utils-0.1.8.1.1/lib --extra-lib-dirs=/nix/store/l5ihk67iv9mzpi3ad6d9vjy03lcyb4f2-regex-pcre-builtin-0.94.4.8.8.35/lib --extra-lib-dirs=/nix/store/c60vnwbl9r0z8b58khy7p4pzvgmk0202-regex-base-0.93.2/lib --extra-lib-dirs=/nix/store/f7mw165rag1xrnvg17c9ah40qkrx819b-protolude-0.2.3/lib --extra-lib-dirs=/nix/store/w4m9apss5kdn1f7if9yh70k9i8xxih4x-mtl-compat-0.2.1.3/lib --extra-lib-dirs=/nix/store/47cyzw83mm7skrgam9dg3vypz93w2m78-servant-0.15/lib --extra-lib-dirs=/nix/store/fss2cjfb8x0ysrjff5839gfn1n7j0c6i-http-media-0.7.1.3/lib --extra-lib-dirs=/nix/store/inbaylx7lsrgbxggljmhj73dgkz7qr5c-utf8-string-1.0.1.1/lib --extra-lib-dirs=/nix/store/0ijalhk9bpxwmx3f97xwl555hz5zjfr4-mmorph-1.1.2/lib --extra-lib-dirs=/nix/store/xky8f9k1bbdpcjsidnhz21cvaqzjxqxs-singleton-bool-0.1.4/lib --extra-lib-dirs=/nix/store/ydmk05hmj115w69h26akqxlawd2yhvkm-string-conversions-0.4.0.1/lib --extra-lib-dirs=/nix/store/d0ijsqiv00l23bla34xqqlkmabym24li-vault-0.3.1.2/lib --extra-lib-dirs=/nix/store/m1ljp12yjb5qczmqbjybhp7961pnbv2w-servant-client-0.15/lib --extra-lib-dirs=/nix/store/hxlklily6x6kxn60f8s4y2676nzv87y4-servant-client-core-0.15/lib --extra-lib-dirs=/nix/store/vi66qzrjyz0qvxwv5rnd3vpwmm6a91yv-base64-bytestring-1.0.0.2/lib --extra-lib-dirs=/nix/store/q5h6rs2hcyxkvfw2py3wfkg6pf0x8ig7-generics-sop-0.4.0.1/lib --extra-lib-dirs=/nix/store/ysdlawz0r4jrd39f2chh81hik68y6f5j-sop-core-0.4.0.0/lib --extra-lib-dirs=/nix/store/qa6ykcwz5k55m78mvmccbm7vig6043br-safe-0.3.17/lib --extra-lib-dirs=/nix/store/fg0nm79j1p3y7a3jisd9xxr8n6wm5np1-split-0.2.3.3/lib --extra-lib-dirs=/nix/store/cwwii13i57x04l9brv17i2723ahn7r2n-yaml-0.11.0.0/lib --extra-lib-dirs=/nix/store/xs4a1268l918ymlr30q8lxv0crswi2ri-conduit-1.3.1.1/lib --extra-lib-dirs=/nix/store/hl4m82s0jx6yl4khxhrnbb8fa8c1qm3b-mono-traversable-1.0.11.0/lib --extra-lib-dirs=/nix/store/zacahjkrqzf1ljarlkd7dhighlm014am-vector-algorithms-0.8.0.1/lib --extra-lib-dirs=/nix/store/hlh41hpm9mfnmqc45p3wifa9h8jl9r53-resourcet-1.2.2/lib --extra-lib-dirs=/nix/store/qmq9lgi9nlcvs4r8jpj7cjng6fbwq54f-unliftio-core-0.1.2.0/lib --extra-lib-dirs=/nix/store/qmq9lgi9nlcvs4r8jpj7cjng6fbwq54f-unliftio-core-0.1.2.0/lib --extra-lib-dirs=/nix/store/w0d0l5wmadg43law66im2gx22zjgab3a-libyaml-0.1.1.0/lib --extra-lib-dirs=/nix/store/3n9k4hbhmscz1pmcjcg2khnh821im6b2-Glob-0.9.3/lib --extra-lib-dirs=/nix/store/jr0xgihgxrn9f4ks92pixsbi2l27x7x1-optparse-applicative-0.14.3.0/lib | |
Using Parsec parser | |
Configuring puppet-unit-test-3.6.2... | |
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 /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs:2:8 in main:Main | |
Setup: Encountered missing dependencies: | |
language-puppet >=1.4.3 | |
builder for '/nix/store/q84w0l15qi2i8k8d3hcwlvds3gvm7wh1-puppet-unit-test-3.6.2.drv' failed with exit code 1 | |
error: build of '/nix/store/q84w0l15qi2i8k8d3hcwlvds3gvm7wh1-puppet-unit-test-3.6.2.drv' failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
rev = "ea24474a425f8b188a2a768df9f72f429c78cc6e"; | |
sha256 = "1bvqyh2390p7syvklh5khg2ndxf58izqas57nw7jq7qjxa2mk6rc"; | |
in | |
import (fetchTarball { | |
url = "https://github.com/bartavelle/language-puppet/archive/${rev}.tar.gz"; | |
inherit sha256; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: puppet-unit-test | |
version: 3.6.2 | |
license: BSD3 | |
author: Pierre Radermecker | |
maintainer: [email protected] | |
build-type: Simple | |
cabal-version: >=1.10 | |
executable build | |
main-is: build.hs | |
-- other-modules: | |
other-extensions: DeriveGeneric, OverloadedStrings, StrictData, TemplateHaskell | |
build-depends: base >=4.9 | |
, foldl >=1.2 | |
, lens >=4.15 | |
, transformers >=0.5 | |
, language-puppet >=1.4.3 | |
, aeson >=1.1 | |
, bytestring >=0.10 | |
, unordered-containers >=0.2 | |
, containers >=0.5 | |
, text >=1.2 | |
, hslogger >=1.2 | |
, shake >=0.15 | |
-- hs-source-dirs: | |
default-language: Haskell2010 | |
ghc-options: -threaded |
I have found the problem. I need to pass pkgs from puppet-unit-test to language-puppet to ensure they are using the same haskell package set.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I remove the bound for language-puppet in the cabal file, I would get the error: