-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax cabal version #56
Conversation
Allows for building with `7.10.3`, otherwise nixpkgs ghcjs version rejects this.
Haha, well this apparently breaks #42 if merged |
I think we should revisit #42, since the parse error is caused by the line 575 in
By removing that line, I was able to build successfully with cabal-1.22. The following sed scripts (reverting cabal-version to 1.22, and removing line 575), allow ghcjs-dom-jsffi to be built by cabal 1.22, ghc 7.10.3 on nix (and use the ghcjsi repl). ghcjs-dom-jsffi = overrideCabal super.ghcjs-dom-jsffi (drv: {
isLibrary = true;
libraryHaskellDepends = [ self.text self.base self.ghcjs-base self.ghcjs-prim self.ghc-prim ];
preConfigure = ''
sed -i 's|cabal-version: >=1.24|cabal-version: >=1.22|' *.cabal
sed -i '575d' *.cabal
'';
}); cc @hamishmack |
I propose we revert the cabal-version back to |
Also, since all of the modules from It seems like cabal is stripping the line, but that puts the module name awkwardly against the colon, causing a parse error: ":GHCJS.DOM.JSFFI.Generated.ANGLEInstancedArrays," There should be whitespace between the colon and the module name, think this has to do with https://github.com/ghcjs/domconv-webkit generation. EDIT: Of course, all of this is fine in Cabal 1.24, but if we want to use 1.22 (w/ old GHC on nixpkgs) then we run into this issue. I think we should make this change because GHCJS's REPL currently hasn't been ported to GHC8 and it's a big part of workflow. |
Why can't we use Cabal 1.24 when building ghcjs-dom with GHC 7.10? That is what we do on travis for instance. |
@dmjio From
|
@3noch, yes, and great point. I have cabal get ghcjs-dom-jsffi { mkDerivation, base, ghc-prim, ghcjs-base, ghcjs-prim, stdenv
, text, transformers
}:
mkDerivation {
pname = "ghcjs-dom-jsffi";
version = "0.5.0.2";
src = ./.;
libraryHaskellDepends = [
base ghc-prim ghcjs-base ghcjs-prim text transformers
];
description = "DOM library using JSFFI and GHCJS";
license = stdenv.lib.licenses.mit;
} now build: λ Davids-MacBook-Pro-3 ghcjs-dom-jsffi-0.5.0.2 → nix-build --argstr compiler ghcjs
these derivations will be built:
/nix/store/lsy332vz0wzh5lpp6bzfifi40ccvw526-ghcjs-dom-jsffi-0.5.0.2.drv
building path(s) ‘/nix/store/bmw23n8cgdib62yblg5vsibkyjkxxf80-ghcjs-dom-jsffi-0.5.0.2’
setupCompilerEnvironmentPhase
Build with /nix/store/3wcmkv4zxnsr1acapsb3dyyk2pxaxng9-ghcjs-0.2.0.
unpacking sources
unpacking source archive /nix/store/w50hnii3xmmlm7hrmgfzar3ircnmrbiw-ghcjs-dom-jsffi-0.5.0.2
source root is ghcjs-dom-jsffi-0.5.0.2
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/var/folders/m_/z586qg2d7gg1flh7y3nvw5600000gn/T/nix-build-ghcjs-dom-jsffi-0.5.0.2.drv-0/package.conf.d -j8
[1 of 1] Compiling Main ( Setup.lhs, /private/var/folders/m_/z586qg2d7gg1flh7y3nvw5600000gn/T/nix-build-ghcjs-dom-jsffi-0.5.0.2.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/bmw23n8cgdib62yblg5vsibkyjkxxf80-ghcjs-dom-jsffi-0.5.0.2 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=clang --package-db=/private/var/folders/m_/z586qg2d7gg1flh7y3nvw5600000gn/T/nix-build-ghcjs-dom-jsffi-0.5.0.2.drv-0/package.conf.d --ghc-option=-optl=-Wl,-headerpad_max_install_names --disable-split-objs --disable-library-profiling --disable-executable-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --disable-tests --with-hsc2hs=/nix/store/3lq4vnskmywlqxjprfjvy2plz6w02qk4-ghc-7.10.3/bin/hsc2hs --ghcjs
Warning: ghcjs-dom-jsffi.cabal: This package requires at least Cabal version
1.24
Configuring ghcjs-dom-jsffi-0.5.0.2...
Setup: This package description follows version 1.24 of the Cabal
specification. This tool only supports up to version 1.22.5.0.
builder for ‘/nix/store/lsy332vz0wzh5lpp6bzfifi40ccvw526-ghcjs-dom-jsffi-0.5.0.2.drv’ failed with exit code 1
error: build of ‘/nix/store/lsy332vz0wzh5lpp6bzfifi40ccvw526-ghcjs-dom-jsffi-0.5.0.2.drv’ failed This line indicates that it's getting built with an early cabal Setup: This package description follows version 1.24 of the Cabal
specification. This tool only supports up to version 1.22.5.0. I'm still looking into it, but think we might be able to upgrade this somehow. cc @hamishmack |
@hamishmack @3noch I can confirm 100% that new ghcjs packages, when evaluated with mkdir new-proj && cd new-proj
cabal init
nix-build --argstr compiler ghcjs
...
`Using Cabal-1.22.5.0 compiled by ghc-7.10` |
@dmjio Oh dear. |
If you are able to use the |
Closing as I think nix has moved on to Cabal >= 1.24 now |
Allows for building with
7.10.3
, otherwise nixpkgs ghcjs version rejects this.