Commit f3a9483f authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Working nix-shell with GHC 9.4.7

parent 60bd8b7b
Pipeline #5438 failed with stages
in 4 seconds
# Optimising CI speed by using tips from https://blog.nimbleways.com/let-s-make-faster-gitlab-ci-cd-pipelines/ # Optimising CI speed by using tips from https://blog.nimbleways.com/let-s-make-faster-gitlab-ci-cd-pipelines/
image: adinapoli/gargantext:v2.3 image: adinapoli/gargantext:v3.0
variables: variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root" STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
......
...@@ -11,8 +11,8 @@ STORE_DIR="${1:-$DEFAULT_STORE}" ...@@ -11,8 +11,8 @@ STORE_DIR="${1:-$DEFAULT_STORE}"
# `expected_cabal_project_freeze_hash` with the # `expected_cabal_project_freeze_hash` with the
# `sha256sum` result calculated on the `cabal.project` and `cabal.project.freeze`. # `sha256sum` result calculated on the `cabal.project` and `cabal.project.freeze`.
# This ensures the files stay deterministic so that CI cache can kick in. # This ensures the files stay deterministic so that CI cache can kick in.
expected_cabal_project_hash="69e03370a602f40243373515ff884a2cd50dc02eb6f52cd23ba9016a61fe8069" expected_cabal_project_hash="69933aa295e2ea1c7e223454472f407f7d34bf9a0c76e02152b39a8d0222872b"
expected_cabal_project_freeze_hash="796f0109611f3381278b1885ae1fa257c4177b99885eb04701938f1107c06ee5" expected_cabal_project_freeze_hash="bda3de8044e0cf49b077b06261a66fc7103f7bc09dd20f00b2f6b13c091d5512"
cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-11-23T20:05:40Z' cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-11-23T20:05:40Z'
......
-- Generated by stack2cabal -- Generated by stack2cabal
index-state: 2023-12-04T09:05:40Z index-state: 2023-11-23T20:05:40Z
with-compiler: ghc-8.10.7 with-compiler: ghc-9.4.7
packages: packages:
./ ./
...@@ -141,6 +141,11 @@ source-repository-package ...@@ -141,6 +141,11 @@ source-repository-package
location: https://gitlab.iscpif.fr/gargantext/iso639.git location: https://gitlab.iscpif.fr/gargantext/iso639.git
tag: eab929d106833ded8011a0d6705135e3fc506a9c tag: eab929d106833ded8011a0d6705135e3fc506a9c
source-repository-package
type: git
location: https://gitlab.iscpif.fr/gargantext/servant-xml-conduit.git
tag: 339fd608341bd2652cf5c0e9e76a3293acffbea6
source-repository-package source-repository-package
type: git type: git
location: https://github.com/haskell-servant/servant.git location: https://github.com/haskell-servant/servant.git
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,7 +10,7 @@ ARG CORENLP=4.5.4 ...@@ -10,7 +10,7 @@ ARG CORENLP=4.5.4
ARG CORE ARG CORE
COPY ./shell.nix /builds/gargantext/shell.nix COPY ./shell.nix /builds/gargantext/shell.nix
COPY ./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix COPY ./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY ./nix/pinned-22.05.nix /builds/gargantext/nix/pinned-22.05.nix COPY ./nix/pinned-23.11.nix /builds/gargantext/nix/pinned-23.11.nix
COPY ./nix/overlays/Cabal-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-3.10.1.0.nix COPY ./nix/overlays/Cabal-3.10.1.0.nix /builds/gargantext/nix/overlays/Cabal-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-3.10.1.0.nix COPY ./nix/overlays/cabal-install-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-3.10.1.0.nix
COPY ./nix/overlays/cabal-install-solver-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-solver-3.10.1.0.nix COPY ./nix/overlays/cabal-install-solver-3.10.1.0.nix /builds/gargantext/nix/overlays/cabal-install-solver-3.10.1.0.nix
......
import (builtins.fetchGit {
name = "nixos-23.11";
url = "https://github.com/nixos/nixpkgs";
ref = "refs/heads/nixos-23.11";
rev = "057f9aecfb71c4437d2b27d3323df7f93c010b7e";
})
{ pkgs ? import ./pinned-22.05.nix {} }: { pkgs ? import ./pinned-23.11.nix {} }:
rec { rec {
inherit pkgs; inherit pkgs;
# If we are on a Mac, in order to build successfully with cabal we need a bit more work. # If we are on a Mac, in order to build successfully with cabal we need a bit more work.
ghc = if pkgs.stdenv.isDarwin ghc = pkgs.haskell.compiler.ghc947; #if pkgs.stdenv.isDarwin
then haskell1.compiler.ghc8107.overrideAttrs (finalAttrs: previousAttrs: { # then haskell1.compiler.ghc947.overrideAttrs (finalAttrs: previousAttrs: {
# See https://github.com/NixOS/nixpkgs/pull/149942/files # # See https://github.com/NixOS/nixpkgs/pull/149942/files
patches = previousAttrs.patches ++ [ # patches = previousAttrs.patches ++ [
# Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`. # # Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`.
(pkgs.fetchpatch { # (pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch"; # url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch";
sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0="; # sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0=";
}) # })
]; # ];
}) # })
else pkgs.haskell.compiler.ghc8107; # else pkgs.haskell.compiler.ghc947;
haskell1 = pkgs.haskell // { haskell1 = pkgs.haskell // {
packages = pkgs.haskell.packages // { packages = pkgs.haskell.packages // {
ghc8107 = pkgs.haskell.packages.ghc8107.override { ghc947 = pkgs.haskell.packages.ghc947.override {
overrides = self: super: { overrides = self: super: {
directory = self.callPackage ./overlays/directory-1.3.7.0.nix {}; #directory = self.callPackage ./overlays/directory-1.3.7.1.nix {};
process = self.callPackage ./overlays/process-1.6.15.0.nix {}; #process = self.callPackage ./overlays/process-1.6.17.0.nix {};
hackage-security = self.callPackage ./overlays/hackage-security-0.6.2.3.nix {}; #hackage-security = self.callPackage ./overlays/hackage-security-0.6.2.3.nix {};
Cabal = self.callPackage ./overlays/Cabal-3.10.1.0.nix {}; #Cabal = self.callPackage ./overlays/Cabal-3.10.1.0.nix {};
Cabal-syntax = self.callPackage ./overlays/Cabal-syntax-3.10.1.0.nix {}; #Cabal-syntax = self.callPackage ./overlays/Cabal-syntax-3.10.1.0.nix {};
cabal-install-solver = self.callPackage ./overlays/cabal-install-solver-3.10.1.0.nix {}; #cabal-install-solver = self.callPackage ./overlays/cabal-install-solver-3.10.1.0.nix {};
cabal-install = self.callPackage ./overlays/cabal-install-3.10.1.0.nix {}; #cabal-install = self.callPackage ./overlays/cabal-install-3.10.1.0.nix {};
}; };
}; };
}; };
}; };
cabal_install_3_10_1_0 = pkgs.haskell.lib.compose.justStaticExecutables haskell1.packages.ghc8107.cabal-install; #cabal_install_3_10_1_0 = pkgs.haskell.lib.compose.justStaticExecutables haskell1.packages.ghc947.cabal-install;
igraph_0_10_4 = pkgs.igraph.overrideAttrs (finalAttrs: previousAttrs: { igraph_0_10_4 = pkgs.igraph.overrideAttrs (finalAttrs: previousAttrs: {
version = "0.10.4"; version = "0.10.4";
nativeBuildInputs = previousAttrs.nativeBuildInputs or [] ++ [ pkgs.gcc7 pkgs.clang_11 ];
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "igraph"; owner = "igraph";
repo = "igraph"; repo = "igraph";
...@@ -68,7 +70,7 @@ rec { ...@@ -68,7 +70,7 @@ rec {
"-DIGRAPH_USE_INTERNAL_GMP=OFF" "-DIGRAPH_USE_INTERNAL_GMP=OFF"
"-DIGRAPH_USE_INTERNAL_PLFIT=OFF" "-DIGRAPH_USE_INTERNAL_PLFIT=OFF"
"-DIGRAPH_GLPK_SUPPORT=ON" "-DIGRAPH_GLPK_SUPPORT=ON"
"-DIGRAPH_GRAPHML_SUPPORT=ON" "-DIGRAPH_GRAPHML_SUPPORT=OFF"
"-DIGRAPH_OPENMP_SUPPORT=ON" "-DIGRAPH_OPENMP_SUPPORT=ON"
"-DIGRAPH_ENABLE_LTO=AUTO" "-DIGRAPH_ENABLE_LTO=AUTO"
"-DIGRAPH_ENABLE_TLS=ON" "-DIGRAPH_ENABLE_TLS=ON"
...@@ -89,7 +91,7 @@ rec { ...@@ -89,7 +91,7 @@ rec {
}); });
hsBuildInputs = [ hsBuildInputs = [
ghc ghc
cabal_install_3_10_1_0 #cabal_install_3_10_1_0
]; ];
nonhsBuildInputs = with pkgs; [ nonhsBuildInputs = with pkgs; [
bzip2 bzip2
...@@ -104,7 +106,7 @@ rec { ...@@ -104,7 +106,7 @@ rec {
lapack lapack
lzma lzma
pcre pcre
pkgconfig pkg-config
postgresql postgresql
xz xz
zlib zlib
...@@ -114,7 +116,9 @@ rec { ...@@ -114,7 +116,9 @@ rec {
expat expat
icu icu
graphviz graphviz
llvm_9 llvm_11
clang_11
gcc7
igraph_0_10_4 igraph_0_10_4
libpqxx libpqxx
libsodium libsodium
......
resolver: lts-18.28 resolver: lts-21.17
flags: flags:
accelerate: accelerate:
debug: false debug: false
...@@ -112,12 +112,9 @@ extra-deps: ...@@ -112,12 +112,9 @@ extra-deps:
- KMP-0.2.0.0@sha256:6dfbac03ef00ebd9347234732cb86a40f62ab5a80c0cc6bedb8eb51766f7df28,2562 - KMP-0.2.0.0@sha256:6dfbac03ef00ebd9347234732cb86a40f62ab5a80c0cc6bedb8eb51766f7df28,2562
- MissingH-1.4.3.0@sha256:32f9892ec98cd21df4f4d3ed8d95a3831ae74287ea0641d6f09b2dc6ef061d39,4859 - MissingH-1.4.3.0@sha256:32f9892ec98cd21df4f4d3ed8d95a3831ae74287ea0641d6f09b2dc6ef061d39,4859
- Unique-0.4.7.8@sha256:9661f45aa31dde119a2114566166ea38b011a45653337045ee4ced75636533c0,2067 - Unique-0.4.7.8@sha256:9661f45aa31dde119a2114566166ea38b011a45653337045ee4ced75636533c0,2067
- constraints-extras-0.3.1.0@sha256:12016ebb91ad5ed2c82bf7e48c6bd6947d164d33c9dca5ac3965de1bb6c780c0,1777
- 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 - duckling-0.2.0.0@sha256:84becd4e48ee3676cdd6fe5745a77ee60e365ea730cd759610c8a7738f3eb4a6,60543
- fast-tagsoup-utf8-only-1.0.5@sha256:9292c8ff275c08b88b6013ccc410182552f180904214a07ad4db932ab462aaa1,1651
- fclabels-2.0.5@sha256:817006077632bd29e637956154aa33d3c10a59be0791c308cef955eb951b2675,4473
- 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