Commit ce6a2a4d authored by Alfredo Di Napoli's avatar Alfredo Di Napoli Committed by Alfredo Di Napoli

Almost working setup

parent b9cd7de8
...@@ -34,8 +34,8 @@ source-repository-package ...@@ -34,8 +34,8 @@ source-repository-package
source-repository-package source-repository-package
type: git type: git
location: https://github.com/alpmestan/accelerate-llvm.git location: https://github.com/AccelerateHS/accelerate-llvm.git
tag: 944f5a4aea35ee6aedb81ea754bf46b131fce9e3 tag: 2b5d69448557e89002c0179ea1aaf59bb757a6e3
subdir: accelerate-llvm-native/ subdir: accelerate-llvm-native/
accelerate-llvm/ accelerate-llvm/
...@@ -161,13 +161,20 @@ source-repository-package ...@@ -161,13 +161,20 @@ source-repository-package
type: git type: git
location: https://github.com/adinapoli/llvm-hs.git location: https://github.com/adinapoli/llvm-hs.git
tag: 7533a9ccd3bfe77141745f6b61039a26aaf5c83b tag: 7533a9ccd3bfe77141745f6b61039a26aaf5c83b
subdir: llvm-hs-pure subdir:
llvm-hs
llvm-hs-pure
source-repository-package source-repository-package
type: git type: git
location: https://github.com/MercuryTechnologies/ekg-json.git location: https://github.com/MercuryTechnologies/ekg-json.git
tag: 232db57d6ce0940fcc902adf30a9ed3f3561f21d tag: 232db57d6ce0940fcc902adf30a9ed3f3561f21d
source-repository-package
type: git
location: https://github.com/adinapoli/duckling.git
tag: d84d64d79cbdd2efb874cbb1bc804ac013e848e2
allow-older: * allow-older: *
allow-newer: * allow-newer: *
......
...@@ -1539,6 +1539,7 @@ constraints: any.AC-Angle ==1.0, ...@@ -1539,6 +1539,7 @@ constraints: any.AC-Angle ==1.0,
any.list-transformer ==1.0.9, any.list-transformer ==1.0.9,
any.listsafe ==0.1.0.1, any.listsafe ==0.1.0.1,
any.literatex ==0.3.0.0, any.literatex ==0.3.0.0,
any.llvm-hs ==12.0.0,
any.lmdb ==0.2.5, any.lmdb ==0.2.5,
any.load-env ==0.2.1.0, any.load-env ==0.2.1.0,
any.loc ==0.1.4.1, any.loc ==0.1.4.1,
......
...@@ -492,6 +492,7 @@ library ...@@ -492,6 +492,7 @@ library
, lens-aeson < 1.3 , lens-aeson < 1.3
, lifted-base ^>= 0.2.3.12 , lifted-base ^>= 0.2.3.12
, listsafe ^>= 0.1.0.1 , listsafe ^>= 0.1.0.1
, llvm-hs >= 12.0.0
, located-base ^>= 0.1.1.1 , located-base ^>= 0.1.1.1
, logging-effect ^>= 1.3.12 , logging-effect ^>= 1.3.12
, matrix ^>= 0.3.6.1 , matrix ^>= 0.3.6.1
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
, # LLVM is conceptually a run-time-only dependency, but for , # LLVM is conceptually a run-time-only dependency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
buildTargetLlvmPackages, llvmPackages buildTargetLlvmPackages, llvmPackages, targetCC
, # If enabled, GHC will be built with the GPL-free but slightly slower native , # If enabled, GHC will be built with the GPL-free but slightly slower native
# bignum backend instead of the faster but GPLed gmp backend. # bignum backend instead of the faster but GPLed gmp backend.
...@@ -134,8 +134,6 @@ let ...@@ -134,8 +134,6 @@ let
pkgsBuildTarget.targetPackages.stdenv.cc pkgsBuildTarget.targetPackages.stdenv.cc
] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
# Sometimes we have to dispatch between the bintools wrapper and the unwrapped # Sometimes we have to dispatch between the bintools wrapper and the unwrapped
# derivation for certain tools depending on the platform. # derivation for certain tools depending on the platform.
bintoolsFor = { bintoolsFor = {
...@@ -171,7 +169,7 @@ in ...@@ -171,7 +169,7 @@ in
# C compiler, bintools and LLVM are used at build time, but will also leak into # C compiler, bintools and LLVM are used at build time, but will also leak into
# the resulting GHC's settings file and used at runtime. This means that we are # the resulting GHC's settings file and used at runtime. This means that we are
# currently only able to build GHC if hostPlatform == buildPlatform. # currently only able to build GHC if hostPlatform == buildPlatform.
assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc; #assert targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
assert buildTargetLlvmPackages.llvm == llvmPackages.llvm; assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang; assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
...@@ -223,6 +221,9 @@ stdenv.mkDerivation (rec { ...@@ -223,6 +221,9 @@ stdenv.mkDerivation (rec {
# GHC is a bit confused on its cross terminology. # GHC is a bit confused on its cross terminology.
# TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths
preConfigure = '' preConfigure = ''
echo "=================="
echo ${targetCC}
echo "=================="
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}" export "''${env#TARGET_}=''${!env}"
done done
...@@ -369,6 +370,7 @@ stdenv.mkDerivation (rec { ...@@ -369,6 +370,7 @@ stdenv.mkDerivation (rec {
inherit bootPkgs targetPrefix; inherit bootPkgs targetPrefix;
inherit llvmPackages; inherit llvmPackages;
inherit targetCC;
inherit enableShared; inherit enableShared;
# This is used by the haskell builder to query # This is used by the haskell builder to query
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
rec { rec {
inherit pkgs; inherit pkgs;
ghc947 = pkgs.callPackage ./overlays/ghc947.nix { ghc947 = pkgs.callPackage ./overlays/ghc947.nix {
stdenv = pkgs.clang12Stdenv;
bootPkgs = pkgs.haskell.packages.ghc8107; bootPkgs = pkgs.haskell.packages.ghc8107;
inherit (pkgs.buildPackages.python3Packages) sphinx; inherit (pkgs.buildPackages.python3Packages) sphinx;
# Need to use apple's patched xattr until # Need to use apple's patched xattr until
...@@ -11,8 +12,9 @@ rec { ...@@ -11,8 +12,9 @@ rec {
inherit (pkgs.buildPackages.darwin) xattr autoSignDarwinBinariesHook; inherit (pkgs.buildPackages.darwin) xattr autoSignDarwinBinariesHook;
buildTargetLlvmPackages = pkgs.pkgsBuildTarget.llvmPackages_12; buildTargetLlvmPackages = pkgs.pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12; llvmPackages = pkgs.llvmPackages_12;
targetCC = pkgs.clang12Stdenv.cc;
}; };
#cabal_install_3_10_1_0 = pkgs.haskell.lib.compose.justStaticExecutables haskell1.packages.ghc947.cabal-install; cabal_install_3_10_1_0 = pkgs.haskell.lib.compose.justStaticExecutables pkgs.haskell.packages.ghc947.cabal-install;
graphviz = pkgs.graphviz.overrideAttrs (finalAttrs: previousAttrs: { graphviz = pkgs.graphviz.overrideAttrs (finalAttrs: previousAttrs: {
# Increase the YY_BUF_SIZE, see https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/290#note_9015 # Increase the YY_BUF_SIZE, see https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/290#note_9015
patches = [ patches = [
...@@ -82,7 +84,7 @@ rec { ...@@ -82,7 +84,7 @@ rec {
}); });
hsBuildInputs = [ hsBuildInputs = [
ghc947 ghc947
#cabal_install_3_10_1_0 cabal_install_3_10_1_0
]; ];
nonhsBuildInputs = with pkgs; [ nonhsBuildInputs = with pkgs; [
bzip2 bzip2
...@@ -106,8 +108,8 @@ rec { ...@@ -106,8 +108,8 @@ rec {
expat expat
icu icu
graphviz graphviz
llvm_12
clang_12 clang_12
llvm_12
gcc7 gcc7
igraph_0_10_4 igraph_0_10_4
libpqxx libpqxx
...@@ -119,8 +121,11 @@ rec { ...@@ -119,8 +121,11 @@ rec {
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH="${pkgs.gfortran7.cc.lib}:${libPaths}:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="${pkgs.gfortran7.cc.lib}:${libPaths}:$LD_LIBRARY_PATH"
export LIBRARY_PATH="${pkgs.gfortran7.cc.lib}:${libPaths}" export LIBRARY_PATH="${pkgs.gfortran7.cc.lib}:${libPaths}"
export PATH="${pkgs.clang_12}/bin:$PATH"
export NIX_CC="${pkgs.clang_12}"
export CC="${pkgs.clang_12}/bin/clang"
''; '';
shell = pkgs.mkShell { shell = pkgs.mkShell.override { stdenv = pkgs.clang12Stdenv; } {
name = "gargantext-shell"; name = "gargantext-shell";
buildInputs = hsBuildInputs ++ nonhsBuildInputs; buildInputs = hsBuildInputs ++ nonhsBuildInputs;
inherit shellHook; inherit shellHook;
......
...@@ -77,8 +77,8 @@ extra-deps: ...@@ -77,8 +77,8 @@ extra-deps:
commit: a110807651036ca2228a76507ee35bbf7aedf87a commit: a110807651036ca2228a76507ee35bbf7aedf87a
- git: https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git - git: https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git
commit: a3875fe652d3bb5acb522674c22c6c814c1b4ad0 commit: a3875fe652d3bb5acb522674c22c6c814c1b4ad0
- git: https://github.com/alpmestan/accelerate-llvm.git - git: https://github.com/AccelerateHS/accelerate-llvm.git
commit: 944f5a4aea35ee6aedb81ea754bf46b131fce9e3 commit: 2b5d69448557e89002c0179ea1aaf59bb757a6e3
subdirs: subdirs:
- accelerate-llvm/ - accelerate-llvm/
- accelerate-llvm-native/ - accelerate-llvm-native/
...@@ -97,8 +97,9 @@ extra-deps: ...@@ -97,8 +97,9 @@ extra-deps:
- git: https://github.com/chessai/eigen.git - git: https://github.com/chessai/eigen.git
commit: 1790fdf9138970dde0dbabf8b270698145a4a88c commit: 1790fdf9138970dde0dbabf8b270698145a4a88c
- git: https://github.com/adinapoli/llvm-hs.git - git: https://github.com/adinapoli/llvm-hs.git
commit: 787dddc034c94fbe5322b3a3c766c153c9259306 commit: 7533a9ccd3bfe77141745f6b61039a26aaf5c83b
subdirs: subdirs:
- llvm-hs
- llvm-hs-pure - llvm-hs-pure
# Mercury is a reputable Haskell company. # Mercury is a reputable Haskell company.
- git: https://github.com/MercuryTechnologies/ekg-json.git - git: https://github.com/MercuryTechnologies/ekg-json.git
...@@ -106,6 +107,9 @@ extra-deps: ...@@ -106,6 +107,9 @@ extra-deps:
# Temporary fork of boolexpr # Temporary fork of boolexpr
- git: https://github.com/adinapoli/boolexpr.git - git: https://github.com/adinapoli/boolexpr.git
commit: 91928b5d7f9342e9865dde0d94862792d2b88779 commit: 91928b5d7f9342e9865dde0d94862792d2b88779
# Temporary fork of duckling
- git: https://github.com/adinapoli/duckling.git
commit: d84d64d79cbdd2efb874cbb1bc804ac013e848e2
# Others dependencies (using stack resolver) # Others dependencies (using stack resolver)
- HSvm-0.1.1.3.22 - HSvm-0.1.1.3.22
- KMP-0.2.0.0@sha256:6dfbac03ef00ebd9347234732cb86a40f62ab5a80c0cc6bedb8eb51766f7df28,2562 - KMP-0.2.0.0@sha256:6dfbac03ef00ebd9347234732cb86a40f62ab5a80c0cc6bedb8eb51766f7df28,2562
...@@ -113,7 +117,6 @@ extra-deps: ...@@ -113,7 +117,6 @@ extra-deps:
- Unique-0.4.7.8@sha256:9661f45aa31dde119a2114566166ea38b011a45653337045ee4ced75636533c0,2067 - Unique-0.4.7.8@sha256:9661f45aa31dde119a2114566166ea38b011a45653337045ee4ced75636533c0,2067
- context-0.2.0.0@sha256:6b643adb4a64fe521873d08df0497f71f88e18b9ecff4b68b4eef938e446cfc9,1886 - context-0.2.0.0@sha256:6b643adb4a64fe521873d08df0497f71f88e18b9ecff4b68b4eef938e446cfc9,1886
- dependent-sum-0.7.1.0@sha256:0e419237f5b86da3659772afff9cab355c0f8d5b3fdb15a5b30e673d8dc83941,2147 - dependent-sum-0.7.1.0@sha256:0e419237f5b86da3659772afff9cab355c0f8d5b3fdb15a5b30e673d8dc83941,2147
- duckling-0.2.0.0@sha256:84becd4e48ee3676cdd6fe5745a77ee60e365ea730cd759610c8a7738f3eb4a6,60543
- full-text-search-0.2.1.4@sha256:81f6df3327e5b604f99b15e78635e5d6ca996e504c21d268a6d751d7d131aa36,6032 - full-text-search-0.2.1.4@sha256:81f6df3327e5b604f99b15e78635e5d6ca996e504c21d268a6d751d7d131aa36,6032
- fullstop-0.1.4@sha256:80a3e382ef53551bb936e7da8b2825621df0ea169af1212debcb0a90010b30c8,2044 - fullstop-0.1.4@sha256:80a3e382ef53551bb936e7da8b2825621df0ea169af1212debcb0a90010b30c8,2044
- ghc-clippy-plugin-0.0.0.1 - ghc-clippy-plugin-0.0.0.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment