Commit 01cb42ba authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'update-build-shell-nix-merge' of...

Merge branch 'update-build-shell-nix-merge' of ssh://gitlab.iscpif.fr:20022/gargantext/haskell-gargantext into dev-merge
parents 0e497373 c3fec4af
...@@ -72,7 +72,14 @@ stack install ...@@ -72,7 +72,14 @@ stack install
~/.local/bin/gargantext-init "gargantext.ini" ~/.local/bin/gargantext-init "gargantext.ini"
``` ```
For Docker env, run: For Docker env, first create the appropriate image:
``` sh
cd devops/docker
docker build -t fpco/stack-build:lts-14.27-garg .
```
then run:
``` sh ``` sh
stack --docker run gargantext-init -- gargantext.ini stack --docker run gargantext-init -- gargantext.ini
......
{ghc}: { ghc
with (import ./pinned.nix {}); , pkgs ? import ./pinned.nix {}
}:
haskell.lib.buildStackProject { let
inherit ghc; buildInputs = with pkgs; [
name = "gargantext";
buildInputs = [
docker-compose
blas
bzip2 bzip2
#gfortran
gfortran.cc.lib
glibc
gmp gmp
gsl gsl
igraph igraph
liblapack liblapack
lzma
pcre pcre
postgresql postgresql
#stack
xz xz
zlib zlib
blas
gfortran7
gfortran7.cc.lib
]; ];
libraryPaths = pkgs.lib.makeLibraryPath buildInputs;
in
pkgs.haskell.lib.buildStackProject rec {
inherit ghc;
inherit buildInputs;
name = "gargantext";
shellHook = ''
export LD_LIBRARY_PATH="${libraryPaths}"
export LIBRARY_PATH="${libraryPaths}"
'';
} }
from fpco/stack-build:lts-14.6 from fpco/stack-build:lts-14.27
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y git libigraph0-dev && \ apt-get install -y git libigraph0-dev && \
......
...@@ -10,6 +10,8 @@ copyright: ...@@ -10,6 +10,8 @@ copyright:
license: BSD3 license: BSD3
homepage: https://gargantext.org homepage: https://gargantext.org
ghc-options: -Wall ghc-options: -Wall
extra-libraries:
- gfortran
dependencies: dependencies:
- extra - extra
- text - text
......
# this version of nixpkgs contains liblapack at 3.8.0
# this version of nixpkgs contains gsl at 2.5.0
import (
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz";
sha256 = "0mhqhq21y5vrr1f30qd2bvydv4bbbslvyzclhw0kdxmkgg3z4c92";
}
)
# this version of nixpkgs contains liblapack at 3.8.0
# this version of nixpkgs contains gsl at 2.5.0
import ( import (
builtins.fetchTarball { builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/ece829033b7b8f4e81261fef5427144df4147bc4.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/18.09.tar.gz";
sha256 = "07n91k3d9i9pym8npsszha9mnvg4d1r0l0ldnhk4g8sx15vv1br5"; sha256 = "1ib96has10v5nr6bzf7v8kw7yzww8zanxgw2qi1ll1sbv6kj6zpd";
} }
) )
{ pkgs ? import ./pinned.nix {} }: { pkgs ? import ./pinned-19.09.nix {} }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
......
...@@ -8,13 +8,12 @@ packages: ...@@ -8,13 +8,12 @@ packages:
docker: docker:
enable: false enable: false
repo: 'fpco/stack-build:lts-14.6-garg' repo: 'fpco/stack-build:lts-14.27-garg'
run-args: run-args:
- '--publish=8008:8008' - '--publish=8008:8008'
nix: nix:
enable: false enable: false
#packages: [gmp]
add-gc-roots: true add-gc-roots: true
shell-file: build-shell.nix shell-file: build-shell.nix
......
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