Commit af97411e authored by Julien Moutinho's avatar Julien Moutinho

build: add support for `haskell.nix`

parent 7b4d10a9
Pipeline #6094 failed with stages
......@@ -45,3 +45,7 @@ devops/docker/js-cache
cabal.project.local
gargantext_profile_out.dot
# Nix
!flake.lock
nix/cache/haskell-nix/gc-roots/
......@@ -255,7 +255,7 @@ constraints: any.Cabal ==3.8.1.0,
any.hlint ==3.5,
hlint +ghc-lib +gpl -hsyaml +threaded,
any.hmatrix ==0.20.2,
hmatrix -disable-default-paths -no-random_r -openblas,
hmatrix -disable-default-paths -no-random_r +openblas,
any.hmatrix-gsl-stats ==0.4.1.8,
hmatrix-gsl-stats -onlygsl,
any.hourglass ==0.2.12,
......
{
"nodes": {
"HTTP": {
"flake": false,
"locked": {
"lastModified": 1451647621,
"narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=",
"owner": "phadej",
"repo": "HTTP",
"rev": "9bc0996d412fef1787449d841277ef663ad9a915",
"type": "github"
},
"original": {
"owner": "phadej",
"repo": "HTTP",
"type": "github"
}
},
"accelerate": {
"flake": false,
"locked": {
"lastModified": 1699626663,
"narHash": "sha256-R5PuLsx60FZZ5hPJvq+HRxHNyiyC/4ayzdGvVHRuLJA=",
"ref": "refs/heads/master",
"rev": "334d05519436bb7f20f9926ec76418f5b8afa359",
"revCount": 3164,
"submodules": true,
"type": "git",
"url": "https://github.com/AccelerateHS/accelerate.git"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/AccelerateHS/accelerate.git"
}
},
"accelerate-arithmetic": {
"flake": false,
"locked": {
"lastModified": 1657380689,
"narHash": "sha256-0ix/+L1X9/S2hct2/z2mdqkHHVd67zphdiQGnQ/djBU=",
"owner": "alpmestan",
"repo": "accelerate-arithmetic",
"rev": "a110807651036ca2228a76507ee35bbf7aedf87a",
"type": "github"
},
"original": {
"owner": "alpmestan",
"repo": "accelerate-arithmetic",
"type": "github"
}
},
"accelerate-llvm": {
"flake": false,
"locked": {
"lastModified": 1692704049,
"narHash": "sha256-7+FzD5d3UpSBGC5BQZHefVVrD0WnDAS1lS9HpVlBNaA=",
"owner": "AccelerateHS",
"repo": "accelerate-llvm",
"rev": "2b5d69448557e89002c0179ea1aaf59bb757a6e3",
"type": "github"
},
"original": {
"owner": "AccelerateHS",
"repo": "accelerate-llvm",
"type": "github"
}
},
"accelerate-utility": {
"flake": false,
"locked": {
"lastModified": 1656682204,
"narHash": "sha256-APVFWVkWiNtojzNy4hH5k25w7DnvgS3auvDubmjlG7I=",
"ref": "fix-error",
"rev": "a3875fe652d3bb5acb522674c22c6c814c1b4ad0",
"revCount": 4,
"type": "git",
"url": "https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git"
},
"original": {
"ref": "fix-error",
"type": "git",
"url": "https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git"
}
},
"boolexpr": {
"flake": false,
"locked": {
"lastModified": 1697119510,
"narHash": "sha256-0Ut4QJVD2ocsUxMVDm9uCp/O3ICPdxVrIrjFcdvOtJ4=",
"owner": "boolexpr",
"repo": "boolexpr",
"rev": "bcd7cb20a1b1bc3b58c4ba1b6ae1bccfe62f67ae",
"type": "github"
},
"original": {
"owner": "boolexpr",
"repo": "boolexpr",
"type": "github"
}
},
"cabal-32": {
"flake": false,
"locked": {
"lastModified": 1603716527,
"narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=",
"owner": "haskell",
"repo": "cabal",
"rev": "48bf10787e27364730dd37a42b603cee8d6af7ee",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.2",
"repo": "cabal",
"type": "github"
}
},
"cabal-34": {
"flake": false,
"locked": {
"lastModified": 1645834128,
"narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=",
"owner": "haskell",
"repo": "cabal",
"rev": "5ff598c67f53f7c4f48e31d722ba37172230c462",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.4",
"repo": "cabal",
"type": "github"
}
},
"cabal-36": {
"flake": false,
"locked": {
"lastModified": 1669081697,
"narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=",
"owner": "haskell",
"repo": "cabal",
"rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "3.6",
"repo": "cabal",
"type": "github"
}
},
"cardano-shell": {
"flake": false,
"locked": {
"lastModified": 1608537748,
"narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=",
"owner": "input-output-hk",
"repo": "cardano-shell",
"rev": "9392c75087cb9a3d453998f4230930dea3a95725",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "cardano-shell",
"type": "github"
}
},
"coreNLP": {
"flake": false,
"locked": {
"narHash": "sha256-SViN/2TcDQrL+3RwUhbCTJDxqffhiWjutZE4oj++aIw=",
"type": "tarball",
"url": "http://nlp.stanford.edu/software/stanford-corenlp-4.5.4.zip"
},
"original": {
"type": "tarball",
"url": "http://nlp.stanford.edu/software/stanford-corenlp-4.5.4.zip"
}
},
"crawlerArxiv": {
"flake": false,
"locked": {
"lastModified": 1692611196,
"narHash": "sha256-qy2IOnuDF9LXof/xBPqjBayyiZC+Y3q8+mkbslTHSTA=",
"ref": "refs/heads/master",
"rev": "eb130c71fa17adaceed6ff66beefbccb13df51ba",
"revCount": 20,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/arxiv-api.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/arxiv-api.git"
}
},
"crawlerHAL": {
"flake": false,
"locked": {
"lastModified": 1710761107,
"narHash": "sha256-gV2aWfbUcI2mWSVWtbo9SBMXCkkVQQ9ezn4yw0Qv3uw=",
"ref": "refs/heads/master",
"rev": "b99b9e568c8bdc73af2b8016ed03ba5ee83c2030",
"revCount": 61,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
}
},
"crawlerISTEX": {
"flake": false,
"locked": {
"lastModified": 1704711455,
"narHash": "sha256-MB5hOVEtzJl9fF4vBWgVh8mf2eK/v50R61bhXXTE7xk=",
"ref": "refs/heads/master",
"rev": "c0a08d62c40a169b7934ceb7cb12c39952160e7a",
"revCount": 29,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/istex.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/istex.git"
}
},
"crawlerIsidore": {
"flake": false,
"locked": {
"lastModified": 1706271280,
"narHash": "sha256-w83woM9j0K/fUKyrtlddMv0aDsced2VbuijxAaTDhyA=",
"ref": "refs/heads/master",
"rev": "e9b594a4718acc06db037f6d3f429a90db76c267",
"revCount": 16,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git"
}
},
"crawlerPubMed": {
"flake": false,
"locked": {
"lastModified": 1702304628,
"narHash": "sha256-8Nv956Wl711a061a3Is6mH9JhpCbnRWAG+3FRiiPMjw=",
"rev": "300764df4f78ea6175535f9b78b884cc2aa9da61",
"revCount": 54,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git"
}
},
"data-time-segment": {
"flake": false,
"locked": {
"lastModified": 1557407857,
"narHash": "sha256-P2ttxZ2tRGR1O4VBTfsw+W7X+sIBr0cy4MUTToSbJ1w=",
"owner": "delanoe",
"repo": "data-time-segment",
"rev": "10a416b9f6c443866b36479c3441ebb3bcdeb7ef",
"type": "github"
},
"original": {
"owner": "delanoe",
"repo": "data-time-segment",
"type": "github"
}
},
"eigen": {
"flake": false,
"locked": {
"lastModified": 1657563506,
"narHash": "sha256-utHUJGCtQ6RbnONi/zvGZkgYOAIEAp2y1xSTNpNGVXc=",
"owner": "chessai",
"repo": "eigen",
"rev": "8fff32a43df743c8c83428a86dd566a0936a4fba",
"type": "github"
},
"original": {
"owner": "chessai",
"repo": "eigen",
"type": "github"
}
},
"ekg-json": {
"flake": false,
"locked": {
"lastModified": 1690473199,
"narHash": "sha256-l8Ny6OC/cqS/C2JGgYa7RhQkw+hjKlos5WY9aZvfids=",
"owner": "MercuryTechnologies",
"repo": "ekg-json",
"rev": "232db57d6ce0940fcc902adf30a9ed3f3561f21d",
"type": "github"
},
"original": {
"owner": "MercuryTechnologies",
"ref": "wavewave/ghcHEAD",
"repo": "ekg-json",
"type": "github"
}
},
"epo-api-client": {
"flake": false,
"locked": {
"lastModified": 1700039380,
"narHash": "sha256-MgHpsv3svnIWZQAajv6WfI0uvOf29mLCfsu19k/LZk8=",
"ref": "refs/heads/main",
"rev": "9225d046083853200b9045c8d71161e6a234fc5c",
"revCount": 8,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1672831974,
"narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=",
"owner": "input-output-hk",
"repo": "flake-compat",
"rev": "45f2638735f8cdc40fe302742b79f248d23eb368",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "hkm/gitlab-fix",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gargantext-graph": {
"flake": false,
"locked": {
"lastModified": 1663259205,
"narHash": "sha256-oPnQrr3I58UDyTqeosN5xLMNIKG8ITSrE/n+0nnaToY=",
"ref": "debugNaN",
"rev": "588e104fe7593210956610cab0041fd16584a4ce",
"revCount": 142,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/gargantext-graph.git"
},
"original": {
"ref": "debugNaN",
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/gargantext-graph.git"
}
},
"gargantext-prelude": {
"flake": false,
"locked": {
"lastModified": 1709015157,
"narHash": "sha256-SNVfj4xGERyOsdccGmZlXWbmotKcjGfukb7NhUiX+us=",
"ref": "303-master-refactoring",
"rev": "d4f9bee483d41bbdf8ab4e09efb5a5a8216edff4",
"revCount": 34,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude.git"
},
"original": {
"ref": "303-master-refactoring",
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude.git"
}
},
"ghc-8.6.5-iohk": {
"flake": false,
"locked": {
"lastModified": 1600920045,
"narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=",
"owner": "input-output-hk",
"repo": "ghc",
"rev": "95713a6ecce4551240da7c96b6176f980af75cae",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "release/8.6.5-iohk",
"repo": "ghc",
"type": "github"
}
},
"ghc98X": {
"flake": false,
"locked": {
"lastModified": 1696643148,
"narHash": "sha256-E02DfgISH7EvvNAu0BHiPvl1E5FGMDi0pWdNZtIBC9I=",
"ref": "ghc-9.8",
"rev": "443e870d977b1ab6fc05f47a9a17bc49296adbd6",
"revCount": 61642,
"submodules": true,
"type": "git",
"url": "https://gitlab.haskell.org/ghc/ghc"
},
"original": {
"ref": "ghc-9.8",
"submodules": true,
"type": "git",
"url": "https://gitlab.haskell.org/ghc/ghc"
}
},
"ghc99": {
"flake": false,
"locked": {
"lastModified": 1701580282,
"narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=",
"ref": "refs/heads/master",
"rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459",
"revCount": 62197,
"submodules": true,
"type": "git",
"url": "https://gitlab.haskell.org/ghc/ghc"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://gitlab.haskell.org/ghc/ghc"
}
},
"hackage": {
"flake": false,
"locked": {
"lastModified": 1710548489,
"narHash": "sha256-XwzVXq9iJIrMHEYLAW3wyIzIB0/YXsXImoVeyXL263s=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "721d94eabfe4b979ae5088df31491e080b35f0e3",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "hackage.nix",
"type": "github"
}
},
"haskell-igraph": {
"flake": false,
"locked": {
"lastModified": 1702294905,
"narHash": "sha256-Pg5L4/MjNtwoeqvbxqOsYFird7tkuFpz/PgQAtswBJI=",
"ref": "refs/heads/master",
"rev": "9f8a2f4a014539826a4eab3215cc70c0813f20cb",
"revCount": 137,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-igraph.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-igraph.git"
}
},
"haskell-nix": {
"inputs": {
"HTTP": "HTTP",
"cabal-32": "cabal-32",
"cabal-34": "cabal-34",
"cabal-36": "cabal-36",
"cardano-shell": "cardano-shell",
"flake-compat": "flake-compat",
"ghc-8.6.5-iohk": "ghc-8.6.5-iohk",
"ghc98X": "ghc98X",
"ghc99": "ghc99",
"hackage": "hackage",
"hls-1.10": "hls-1.10",
"hls-2.0": "hls-2.0",
"hls-2.2": "hls-2.2",
"hls-2.3": "hls-2.3",
"hls-2.4": "hls-2.4",
"hls-2.5": "hls-2.5",
"hls-2.6": "hls-2.6",
"hpc-coveralls": "hpc-coveralls",
"hydra": "hydra",
"iserv-proxy": "iserv-proxy",
"nix-tools-static": "nix-tools-static",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-2003": "nixpkgs-2003",
"nixpkgs-2105": "nixpkgs-2105",
"nixpkgs-2111": "nixpkgs-2111",
"nixpkgs-2205": "nixpkgs-2205",
"nixpkgs-2211": "nixpkgs-2211",
"nixpkgs-2305": "nixpkgs-2305",
"nixpkgs-2311": "nixpkgs-2311",
"nixpkgs-unstable": "nixpkgs-unstable",
"old-ghc-nix": "old-ghc-nix",
"stackage": "stackage"
},
"locked": {
"lastModified": 1710550200,
"narHash": "sha256-p68MDAqdjnOMdyX4xwEXlm3lnNkR7tXq3gbEUAhF/4s=",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "537438a164154753d6a0f3acd303a244876f4ae2",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "haskell.nix",
"type": "github"
}
},
"hlcm": {
"flake": false,
"locked": {
"lastModified": 1510047659,
"narHash": "sha256-/M3h2p27515H9sYXuin6PA1zZRxkQD8haNPbv/kUm3s=",
"ref": "refs/heads/master",
"rev": "6f0595d2421005837d59151a8b26eee83ebb67b5",
"revCount": 3,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/hlcm.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/hlcm.git"
}
},
"hls-1.10": {
"flake": false,
"locked": {
"lastModified": 1680000865,
"narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "1.10.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.0": {
"flake": false,
"locked": {
"lastModified": 1687698105,
"narHash": "sha256-OHXlgRzs/kuJH8q7Sxh507H+0Rb8b7VOiPAjcY9sM1k=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "783905f211ac63edf982dd1889c671653327e441",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.0.0.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.2": {
"flake": false,
"locked": {
"lastModified": 1693064058,
"narHash": "sha256-8DGIyz5GjuCFmohY6Fa79hHA/p1iIqubfJUTGQElbNk=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "b30f4b6cf5822f3112c35d14a0cba51f3fe23b85",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.2.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.3": {
"flake": false,
"locked": {
"lastModified": 1695910642,
"narHash": "sha256-tR58doOs3DncFehHwCLczJgntyG/zlsSd7DgDgMPOkI=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "458ccdb55c9ea22cd5d13ec3051aaefb295321be",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.3.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.4": {
"flake": false,
"locked": {
"lastModified": 1699862708,
"narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.4.0.1",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.5": {
"flake": false,
"locked": {
"lastModified": 1701080174,
"narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "27f8c3d3892e38edaef5bea3870161815c4d014c",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.5.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hls-2.6": {
"flake": false,
"locked": {
"lastModified": 1705325287,
"narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e",
"type": "github"
},
"original": {
"owner": "haskell",
"ref": "2.6.0.0",
"repo": "haskell-language-server",
"type": "github"
}
},
"hmatrix": {
"flake": false,
"locked": {
"lastModified": 1629189886,
"narHash": "sha256-JCRmQP2n//kyyJGF/KUJ0TmayU54JbIfuzSyTSmFsss=",
"owner": "alpmestan",
"repo": "hmatrix",
"rev": "b9fca8beee0f23c17a6b2001ec834d071709e6e7",
"type": "github"
},
"original": {
"owner": "alpmestan",
"ref": "alp/imap-static",
"repo": "hmatrix",
"type": "github"
}
},
"hpc-coveralls": {
"flake": false,
"locked": {
"lastModified": 1607498076,
"narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=",
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
"type": "github"
},
"original": {
"owner": "sevanspowell",
"repo": "hpc-coveralls",
"type": "github"
}
},
"hsinfomap": {
"flake": false,
"locked": {
"lastModified": 1687873591,
"narHash": "sha256-2f64Uj+10+0TxO/upQaqXwdLDN0bIcW/Z/AJSWcSZbo=",
"ref": "refs/heads/main",
"rev": "1370fea1939e2378ce344e512d80671ac700e787",
"revCount": 9,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-infomap.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/haskell-infomap.git"
}
},
"hydra": {
"inputs": {
"nix": "nix",
"nixpkgs": [
"haskell-nix",
"hydra",
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1671755331,
"narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=",
"owner": "NixOS",
"repo": "hydra",
"rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8",
"type": "github"
},
"original": {
"id": "hydra",
"type": "indirect"
}
},
"iserv-proxy": {
"flake": false,
"locked": {
"lastModified": 1691634696,
"narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=",
"ref": "hkm/remote-iserv",
"rev": "43a979272d9addc29fbffc2e8542c5d96e993d73",
"revCount": 14,
"type": "git",
"url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git"
},
"original": {
"ref": "hkm/remote-iserv",
"type": "git",
"url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git"
}
},
"iso639": {
"flake": false,
"locked": {
"lastModified": 1701318218,
"narHash": "sha256-PLfnEV0d09cJlcLzwvlUAyjXXXmxYcgfkMMa4JD1l8U=",
"ref": "refs/heads/master",
"rev": "eab929d106833ded8011a0d6705135e3fc506a9c",
"revCount": 11,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/iso639.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/iso639.git"
}
},
"llvm-hs": {
"flake": false,
"locked": {
"lastModified": 1704355366,
"narHash": "sha256-6iMGwdgUZx+yKhsgvZ1RJAB479l6HmbgHmy/YT7S6as=",
"owner": "adinapoli",
"repo": "llvm-hs",
"rev": "7533a9ccd3bfe77141745f6b61039a26aaf5c83b",
"type": "github"
},
"original": {
"owner": "adinapoli",
"ref": "adinapoli/llvm-12-ghc-947-compat",
"repo": "llvm-hs",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1661606874,
"narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=",
"owner": "NixOS",
"repo": "nix",
"rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "2.11.0",
"repo": "nix",
"type": "github"
}
},
"nix-tools-static": {
"flake": false,
"locked": {
"lastModified": 1706266250,
"narHash": "sha256-9t+GRk3eO9muCtKdNAwBtNBZ5dH1xHcnS17WaQyftwA=",
"owner": "input-output-hk",
"repo": "haskell-nix-example",
"rev": "580cb6db546a7777dad3b9c0fa487a366c045c4e",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "nix",
"repo": "haskell-nix-example",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1657693803,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2003": {
"locked": {
"lastModified": 1620055814,
"narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-20.03-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2105": {
"locked": {
"lastModified": 1659914493,
"narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-21.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2111": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-21.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2205": {
"locked": {
"lastModified": 1685573264,
"narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "380be19fbd2d9079f677978361792cb25e8a3635",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-22.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2211": {
"locked": {
"lastModified": 1688392541,
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-22.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2305": {
"locked": {
"lastModified": 1701362232,
"narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d2332963662edffacfddfad59ff4f709dde80ffe",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-23.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-2311": {
"locked": {
"lastModified": 1701386440,
"narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "293822e55ec1872f715a66d0eda9e592dc14419f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-23.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1694822471,
"narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "47585496bcb13fb72e4a90daeea2f434e2501998",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "47585496bcb13fb72e4a90daeea2f434e2501998",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712310679,
"narHash": "sha256-XgC/a/giEeNkhme/AV1ToipoZ/IVm1MV2ntiK4Tm+pw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "72da83d9515b43550436891f538ff41d68eecc7f",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"old-ghc-nix": {
"flake": false,
"locked": {
"lastModified": 1631092763,
"narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=",
"owner": "angerman",
"repo": "old-ghc-nix",
"rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8",
"type": "github"
},
"original": {
"owner": "angerman",
"ref": "master",
"repo": "old-ghc-nix",
"type": "github"
}
},
"opaleye-textsearch": {
"flake": false,
"locked": {
"allRefs": true,
"lastModified": 1713174507,
"narHash": "sha256-wGuBqAQqN6R/yJS4Km6Xzd2Pd7+Ce8pVes78kJNmMOU=",
"rev": "cb07b604bfb7a22aa21dd8918de5cb65c8a4bdf1",
"revCount": 2,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"
},
"original": {
"allRefs": true,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"
}
},
"openalex": {
"flake": false,
"locked": {
"lastModified": 1709630330,
"narHash": "sha256-TOoyX/jnwpo8wq5gnDG9k5NMERtJAGbBEn3T693zMEM=",
"ref": "refs/heads/main",
"rev": "ceb8f2cebd4890b6d9d151ab01ee14e925bc0499",
"revCount": 18,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/openalex.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/openalex.git"
}
},
"patches-class": {
"flake": false,
"locked": {
"lastModified": 1702291477,
"narHash": "sha256-EfsmhE7aykhR0Pya25HebTIE0/EYpJn1cXl5EE6Luno=",
"ref": "refs/heads/master",
"rev": "3668d28607867a88b2dfc62158139b3cfd629ddb",
"revCount": 29,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/patches-class.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/patches-class.git"
}
},
"patches-map": {
"flake": false,
"locked": {
"lastModified": 1607950982,
"narHash": "sha256-VsQeWXY8LqtgKIQLLhnLXmJEkcgPgMcFeK4A018RjaE=",
"owner": "delanoe",
"repo": "patches-map",
"rev": "76cae88f367976ff091e661ee69a5c3126b94694",
"type": "github"
},
"original": {
"owner": "delanoe",
"repo": "patches-map",
"type": "github"
}
},
"rdf4h": {
"flake": false,
"locked": {
"lastModified": 1548283965,
"narHash": "sha256-Eovni+wzjOzASIbvPSoFVnpcV1xxevlqANH6pKfyRq8=",
"owner": "robstewart57",
"repo": "rdf4h",
"rev": "4fd2edf30c141600ffad6d730cc4c1c08a6dbce4",
"type": "github"
},
"original": {
"owner": "robstewart57",
"repo": "rdf4h",
"type": "github"
}
},
"root": {
"inputs": {
"accelerate": "accelerate",
"accelerate-arithmetic": "accelerate-arithmetic",
"accelerate-llvm": "accelerate-llvm",
"accelerate-utility": "accelerate-utility",
"boolexpr": "boolexpr",
"coreNLP": "coreNLP",
"crawlerArxiv": "crawlerArxiv",
"crawlerHAL": "crawlerHAL",
"crawlerISTEX": "crawlerISTEX",
"crawlerIsidore": "crawlerIsidore",
"crawlerPubMed": "crawlerPubMed",
"data-time-segment": "data-time-segment",
"eigen": "eigen",
"ekg-json": "ekg-json",
"epo-api-client": "epo-api-client",
"flake-utils": "flake-utils",
"gargantext-graph": "gargantext-graph",
"gargantext-prelude": "gargantext-prelude",
"haskell-igraph": "haskell-igraph",
"haskell-nix": "haskell-nix",
"hlcm": "hlcm",
"hmatrix": "hmatrix",
"hsinfomap": "hsinfomap",
"iso639": "iso639",
"llvm-hs": "llvm-hs",
"nixpkgs": "nixpkgs_2",
"opaleye-textsearch": "opaleye-textsearch",
"openalex": "openalex",
"patches-class": "patches-class",
"patches-map": "patches-map",
"rdf4h": "rdf4h",
"servant-job": "servant-job",
"servant-xml-conduit": "servant-xml-conduit",
"sparse-linear": "sparse-linear"
}
},
"servant-job": {
"flake": false,
"locked": {
"lastModified": 1666029181,
"narHash": "sha256-VnXMCYih1CWzxscv7XV0ZvvFqvof8kwYDrXeTHKUTEk=",
"owner": "alpmestan",
"repo": "servant-job",
"rev": "b4182487cfe479777c11ca19f3c0d47840b376f6",
"type": "github"
},
"original": {
"owner": "alpmestan",
"ref": "more-exports",
"repo": "servant-job",
"type": "github"
}
},
"servant-xml-conduit": {
"flake": false,
"locked": {
"lastModified": 1700733935,
"narHash": "sha256-hj93YxvJRS3K5Ub2AWBu4/kidE9lyb0DqGYz3tM0qIw=",
"ref": "refs/heads/master",
"rev": "339fd608341bd2652cf5c0e9e76a3293acffbea6",
"revCount": 6,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/servant-xml-conduit"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/servant-xml-conduit"
}
},
"sparse-linear": {
"flake": false,
"locked": {
"lastModified": 1630602573,
"narHash": "sha256-IcbLkztW5VOpSaL4JwDAgArkB5Y9UdNzag+akN+4pIM=",
"owner": "alpmestan",
"repo": "sparse-linear",
"rev": "bc6ca8058077b0b5702ea4b88bd4189cfcad267a",
"type": "github"
},
"original": {
"owner": "alpmestan",
"ref": "alp/static",
"repo": "sparse-linear",
"type": "github"
}
},
"stackage": {
"flake": false,
"locked": {
"lastModified": 1710461339,
"narHash": "sha256-l2/ekwA4Z4NjiaCZytZrBTag2VaAOBUvsNttsH6kH4E=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "724970b7dc837bf0d813b91f821948c3c5cc719f",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"repo": "stackage.nix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
# SPDX-FileCopyrightText: (C) Gargantext Team <team@gargantext.org>
# SPDX-License-Identifier: CC0-1.0
{
description = "A Nix Flake for Gargantext's Haskell server";
# To use this Nix flake you may need to enable Nix flake support for your user with:
# echo >>~/.config/nix/nix.conf "experimental-features = nix-command flakes"
# WARNING: be sure that `nix --version` is greater or equal to 2.18,
# otherwise nix may not support some attributes used in flake.lock.
# For any input, one can:
# Update to the latest commit:
# nix flake lock --update-input nixpkgs
# Or to a specific commit (eg. a green one on https://status.nixos.org):
# nix flake lock --override-input nixpkgs github:NixOS/nixpkgs/72da83d9515b43550436891f538ff41d68eecc7f
# Or to a commit (in /etc/nix/registry.json) of a NixOS host:
# nix flake lock --override-input nixpkgs flake:nixpkgs
inputs = {
haskell-nix.url = "github:input-output-hk/haskell.nix";
# For trying to hit cache.iog.io one would have
# to follow haskell.nix's nixpkgs pinned version,
# but it may be a few months old, so pin it here instead.
#nixpkgs.follows = "haskell-nix/nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs";
haskell-nix.inputs.nixpkgs.follows = "nixpkgs";
# Convenient Nix Flake utilities, like flake-utils.lib.eachSystem.
flake-utils.url = "github:numtide/flake-utils";
# FIXME: git.iscpif.fr's gitlab's API does not work well,
# hence fallback to the git+https:// scheme.
# WARNING: be sure to use git+https:// and not https://
# otherwise the rev attribute will be missing for the inputMap to work.
# gargantext-prelude.url = "gitlab:gargantext/haskell-gargantext-prelude?host=git.iscpif.fr";
accelerate = { url = "git+https://github.com/AccelerateHS/accelerate.git?submodules=1"; flake = false; };
accelerate-arithmetic = { url = "github:alpmestan/accelerate-arithmetic"; flake = false; };
accelerate-llvm = { url = "github:AccelerateHS/accelerate-llvm"; flake = false; };
# WARNING: using the fix-error branch
accelerate-utility = { url = "git+https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git?ref=fix-error"; flake = false; };
boolexpr = { url = "github:boolexpr/boolexpr"; flake = false; };
coreNLP = { url = "http://nlp.stanford.edu/software/stanford-corenlp-4.5.4.zip"; flake = false; };
crawlerArxiv = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/arxiv-api.git"; flake = false; };
crawlerHAL = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"; flake = false; };
crawlerISTEX = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/istex.git"; flake = false; };
crawlerIsidore = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git"; flake = false; };
crawlerPubMed = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git"; flake = false; };
data-time-segment = { url = "github:delanoe/data-time-segment"; flake = false; };
eigen = { url = "github:chessai/eigen"; flake = false; };
# WARNING: using the wavewave/ghcHEAD branch
ekg-json = { url = "github:MercuryTechnologies/ekg-json/wavewave/ghcHEAD"; flake = false; };
epo-api-client = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git"; flake = false; };
# WARNING: using the debugNaN branch
gargantext-graph = { url = "git+https://gitlab.iscpif.fr/gargantext/gargantext-graph.git?ref=debugNaN"; flake = false; };
# WARNING: unmerged commit
# See https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude/merge_requests/13
gargantext-prelude = { url = "git+https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude.git?ref=303-master-refactoring"; flake = false; };
haskell-igraph = { url = "git+https://gitlab.iscpif.fr/gargantext/haskell-igraph.git"; flake = false; };
hlcm = { url = "git+https://gitlab.iscpif.fr/gargantext/hlcm.git"; flake = false; };
# WARNING: using the alp/imap-static branch
hmatrix = { url = "github:alpmestan/hmatrix/alp/imap-static"; flake = false; };
hsinfomap = { url = "git+https://gitlab.iscpif.fr/gargantext/haskell-infomap.git"; flake = false; };
iso639 = { url = "git+https://gitlab.iscpif.fr/gargantext/iso639.git"; flake = false; };
# WARNING: fork of https://github.com/llvm-hs/llvm-hs
# using adinapoli/llvm-12-ghc-947-compat branch
# Tracked in: https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/318
llvm-hs = { url = "github:adinapoli/llvm-hs/adinapoli/llvm-12-ghc-947-compat"; flake = false; };
opaleye-textsearch = { url = "git+https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git?allRefs=1"; flake = false; };
openalex = { url = "git+https://gitlab.iscpif.fr/gargantext/crawlers/openalex.git"; flake = false; };
patches-class = { url = "git+https://gitlab.iscpif.fr/gargantext/patches-class.git"; flake = false; };
patches-map = { url = "github:delanoe/patches-map"; flake = false; };
rdf4h = { url = "github:robstewart57/rdf4h"; flake = false; };
# WARNING: using the more-exports branch
servant-job = { url = "github:alpmestan/servant-job/more-exports"; flake = false; };
servant-xml-conduit = { url = "git+https://gitlab.iscpif.fr/gargantext/servant-xml-conduit"; flake = false; };
# WARNING: using the alp/static branch
sparse-linear = { url = "github:alpmestan/sparse-linear/alp/static"; flake = false; };
};
# For printing the available outputs:
# $ nix -L flake show --allow-import-from-derivation
# Note that multiple-systems are enabled hence it can only work
# without IFD because of https://github.com/NixOS/nix/issues/4265,
# ie. with a non-null materialized=
outputs = { self, ... }@inputs:
let
supportedSystems = with inputs.flake-utils.lib.system; [
x86_64-linux
x86_64-darwin
aarch64-linux
aarch64-darwin
];
in
inputs.flake-utils.lib.eachSystem supportedSystems (system:
let
pkgs = import inputs.nixpkgs {
inherit system;
config = inputs.haskell-nix.config;
overlays = [
inputs.haskell-nix.overlay
(import nix/overlays/nixpkgs/graphviz.nix)
(import nix/overlays/nixpkgs/igraph.nix)
(import nix/overlays/nixpkgs/openblas.nix)
];
};
# A standard library of Nix expressions.
lib = inputs.nixpkgs.lib;
# A library of Nix expressions internal to haskell.nix.
inherit (pkgs.haskell-nix) haskellLib;
rawCabalProject = lib.readFile ./cabal.project;
# haskell.nix's main entry point
project = pkgs.haskell-nix.cabalProject' [
({ config, pkgs, ... }: {
name = "gargantext";
# Filter-in input files to avoid unnecessary rebuilds
# after changing any file tracked in Git that is not actually used by cabalProject.
src = with lib.fileset; toSource {
root = ./.;
fileset = unions [
./.clippy.dhall
./LICENSE
./bench-data
./cabal.project
./cabal.project.freeze
./devops
./ekg-assets
./gargantext-cors-settings.toml
./gargantext.cabal
./test-data
(fileFilter (file: lib.any file.hasExt [ "hs" ]) ./bench)
(fileFilter (file: lib.any file.hasExt [ "hs" ]) ./bin)
(fileFilter (file: lib.any file.hasExt [ "hs" ]) ./src)
(fileFilter (file: lib.any file.hasExt [ "hs" ]) ./test)
];
};
# By default plan evaluation is done on the build system.
#evalSystem = "x86_64-linux";
# Retrieve compiler-nix-name from cabal.project's with-compiler field.
# Eg. `with-compiler: ghc-9.4.7` becomes "ghc947"
compiler-nix-name =
lib.replaceStrings ["-" "."] ["" ""]
(lib.head (lib.concatLists (lib.filter (l: l != null)
(builtins.map (l: builtins.match "^with-compiler: *(.*)" l)
(lib.splitString "\n" rawCabalProject)))));
# Download GHC from Nixpkgs' binary cache instead of IOHK's
# which would be done by using: pkgs.haskell-nix.compiler
# Beware that if any dependency has `build-depends: ghc`
# then` reinstallableLibGhc = false` is required
# to avoid missing `genprimopcode`.
# See https://github.com/input-output-hk/haskell.nix/issues/1809#issuecomment-1358469589
compilerSelection = pkgs: pkgs.haskell.compiler;
# Pinning the index-state of Hackage,
# instead of using the latest known by haskell.nix,
# removes haskell.nix from interfering too much into the reproducibility.
# It also enables to materialize the plan-nix.
index-state = haskellLib.parseIndexState rawCabalProject;
# Materializing a project means caching the nix files
# generated from the *.cabal/stack.yaml/package.yaml files.
# To update:
# $ nix run .#update-nix-cache-haskell-nix-materialized
# It's only checked in ciJobs.
materialized = if builtins.pathExists nix/cache/haskell-nix/materialized then nix/cache/haskell-nix/materialized else null;
# Using inputMap for each source-repository-package of cabal.project
# leverages Nix Flake's inputs to automatically get their rev and sha256 hashes
# and to check upstreams for updates (using `nix flake update`
# or `nix flake lock --update-input <input>`).
inputMap =
let
# findCabalFiles (in nix-tools/nix-tools/cabal2nix/Main.hs)
# always prefers package.yaml over *.cabal,
# but when the resulting *.cabal file is different
# than a previously existing one,
# the build fails with an error like this one:
# crawlerIsidore.cabal was modified manually, please use --force to overwrite.
# Hence just remove this out-of-sync package.yaml.
removePackageYaml = src: pkgs.symlinkJoin {
name = "removePackageYaml-patched";
paths = [ src ];
postBuild = "rm $out/package.yaml";
# Preserve rev for the inputMap
passthru.rev = src.rev;
};
applyPatches = inputName: patches: pkgs.buildPackages.applyPatches {
name = "${inputName}-patched";
src = inputs.${inputName};
inherit patches;
} // { inherit (inputs.${inputName}) rev; };
in {
"https://github.com/AccelerateHS/accelerate-llvm.git" = inputs.accelerate-llvm;
"https://github.com/AccelerateHS/accelerate.git" = inputs.accelerate;
"https://github.com/MercuryTechnologies/ekg-json.git" = inputs.ekg-json;
"https://github.com/boolexpr/boolexpr.git" = inputs.boolexpr;
"https://github.com/adinapoli/llvm-hs.git" = inputs.llvm-hs;
"https://github.com/alpmestan/accelerate-arithmetic.git" = applyPatches "accelerate-arithmetic" [
nix/patches/accelerate-arithmetic/0001-remove-test-using-removed-realBandedGramian.patch
];
"https://github.com/alpmestan/hmatrix.git" = inputs.hmatrix;
"https://github.com/alpmestan/servant-job.git" = inputs.servant-job;
"https://github.com/alpmestan/sparse-linear.git" = inputs.sparse-linear;
"https://github.com/chessai/eigen.git" = inputs.eigen;
"https://github.com/delanoe/data-time-segment.git" = inputs.data-time-segment;
"https://github.com/delanoe/patches-map" = inputs.patches-map;
"https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git" = inputs.opaleye-textsearch;
"https://github.com/robstewart57/rdf4h.git" = inputs.rdf4h;
"https://gitlab.iscpif.fr/amestanogullari/accelerate-utility.git" = inputs.accelerate-utility;
"https://gitlab.iscpif.fr/gargantext/crawlers/arxiv-api.git" = inputs.crawlerArxiv;
"https://gitlab.iscpif.fr/gargantext/crawlers/epo-proxy-api.git" = inputs.epo-api-client;
"https://gitlab.iscpif.fr/gargantext/crawlers/hal.git" = inputs.crawlerHAL;
"https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git" = removePackageYaml inputs.crawlerIsidore;
"https://gitlab.iscpif.fr/gargantext/crawlers/istex.git" = removePackageYaml inputs.crawlerISTEX;
"https://gitlab.iscpif.fr/gargantext/crawlers/openalex.git" = inputs.openalex;
"https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git" = inputs.crawlerPubMed;
"https://gitlab.iscpif.fr/gargantext/gargantext-graph.git" = inputs.gargantext-graph;
"https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude" = removePackageYaml inputs.gargantext-prelude;
"https://gitlab.iscpif.fr/gargantext/haskell-igraph.git" = inputs.haskell-igraph;
"https://gitlab.iscpif.fr/gargantext/haskell-infomap.git" = inputs.hsinfomap;
"https://gitlab.iscpif.fr/gargantext/hlcm.git" = inputs.hlcm;
"https://gitlab.iscpif.fr/gargantext/iso639.git" = inputs.iso639;
"https://gitlab.iscpif.fr/gargantext/patches-class.git" = inputs.patches-class;
"https://gitlab.iscpif.fr/gargantext/servant-xml-conduit.git" = inputs.servant-xml-conduit;
};
# Default project configuration.
modules = [
( { pkgs, ...}: {
# Make the closure dependency significantly larger
# but avoid missing genprimopcode with compilerSelection = p: pkgs.haskell.compiler
reinstallableLibGhc = false;
packages.haskell-igraph.components.library = {
# The generated plan includes pkgs.igraph, giving access to libigraph.so,
# but pkgs.igraph.dev is also needed for igraph.h
libs = [ pkgs.igraph.dev ];
# Extra include needed because haskell-igraph's cbits
# use: #include <igraph.h>
# not: #include <igraph/igraph.h>
configureFlags = [ "--extra-include-dirs=${pkgs.igraph.dev}/include/igraph" ];
};
# Link with OpenBLAS optimized libraries.
# WARNING: OpenBLAS must only be used by trusted code
# it is inherently unsuitable for security-conscious applications.
# See nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix
packages.hmatrix.flags.openblas = true;
# Not really necessary because nix builds in a sandbox by default anyway.
packages.hmatrix.flags.disable-default-paths = true;
})
];
# Shell configuration shared by the default shell
# and all shells from the flake.variants.
shell = {
# By default haskell.nix does not force cabal-install (by setting CABAL_CONFIG=)
# to use the packages selected by project.plan-nix and available in `ghc-pkg list`,
# leaving cabal-install in charge of provisioning Haskell packages,
# which gives more flexibility when developing.
#exactDeps = false;
#allToolDeps = true;
# haskell.nix provisions (in `ghc-pkg list`)
# the **dependencies** of the packages selected here,
# which are also **not** selected here.
#
# By default haskell.nix selects all _local_ packages here
# (packages from both the `packages` and the `source-repository-package` stanzas)
# which therefore excludes `source-repository-package`s from being provisioned,
#
# Note that it means `cabal update` must be run to get an index-state.
# and be able to download and build missing dependencies
# that depend on `source-repository-package`s.
# Eg. gargantext's dependency `hstatistics` depends on `hmatrix`,
# but hmatrix is a `source-repository-package`
# hence `hstatistics` is not provisioned by haskell.nix.
#packages = ps: lib.attrValues (haskellLib.selectLocalPackages ps);
# Add in this list any development tool needed
# that is not expected to come from the developers' own system.
nativeBuildInputs = [
pkgs.graphviz # for `dot`
pkgs.haskell.packages.${config.compiler-nix-name}.cabal-install
pkgs.haskell.packages.${config.compiler-nix-name}.ghcid
pkgs.haskell.packages.${config.compiler-nix-name}.haskell-language-server
pkgs.haskell.packages.${config.compiler-nix-name}.hlint
];
shellHook = ''
export GARGANTEXT_CORENLP_SERVER="nix -L run .#coreNLP"
cp -f ${pkgs.buildPackages.writeText "cabal.project.local" ''
-- Same fix as in haskell.nix's packages.haskell-igraph.components.library,
-- but for cabal-install
package haskell-igraph
extra-include-dirs: ${pkgs.igraph.dev}/include/igraph
extra-lib-dirs: ${lib.concatMapStringsSep " " (p: "${lib.getLib p}/lib") [
pkgs.igraph
pkgs.openblas
]}
-- Enable openblas
constraints: hmatrix +openblas
package hmatrix
flags: +openblas
extra-lib-dirs: ${lib.concatMapStringsSep " " (p: "${lib.getLib p}/lib") [ pkgs.openblas ]}
''} cabal.project.local
cat >&2 ${pkgs.buildPackages.writeText "shellEnterMessage.txt" ''
**Warning**
This Nix development shell is not configured to provision
`cabal.project`'s `source-repository-package`s and their reverse dependencies,
therefore `cabal update` has to be run manually to fetch an `index-state`
before `cabal build`.
''}
'';
# When true, builds a Hoogle documentation index of all dependencies,
# and provides a "hoogle" command to search the index.
withHoogle = true;
};
# Variants to the default project configuration above.
# They're accessed in the flake's outputs with their name prefixed.
# $ nix -L build .#haskell-nix-ghc:gargantext:exe:gargantext-phylo-profile
# Or via `legacyPackages.${system}.project.projectVariants`:
# $ nix -L build .#project.projectVariants.haskell-nix-ghc.components.executables.gargantext-phylo-profile
flake.variants = {
# For using profiling versions of Haskell packages:
# $ nix develop .#profiling
profiling = {
modules = [
{
# Applies to all packages of the Haskell closure. For instance:
# $ nix eval .#project.hsPkgs.containers.components.library.config.enableProfiling
# false
# $ nix eval .#project.projectVariants.profiling.hsPkgs.containers.components.library.config.enableProfiling
# true
enableProfiling = true;
enableLibraryProfiling = true;
}
];
};
# For using haskell.nix's GHC:
# $ nix -L develop .#haskell-nix-ghc
# $ nix -L build .#haskell-nix-ghc:gargantext:exe:gargantext-phylo-profile
haskell-nix-ghc = {
compilerSelection = lib.mkForce (pkgs: pkgs.haskell-nix.compiler);
materialized = lib.mkForce null;
modules = [
{
# Revert to the default
reinstallableLibGhc = lib.mkForce true;
}
];
};
};
# Enable coverage report in `ciJobs` and `hydraJobs` flake outputs.
# For building the coverages:
# $ nix -L build .#ciJobs.x86_64-linux.coverage.gargantext
# Alas, coverage fails to find hpc when using Nixpkgs' GHC:
# gargantext> no such hpc command
# So for now the haskell-nix-ghc variant has to be used:
# $ nix -L build .#project.projectVariants.haskell-nix-ghc.flake"'".ciJobs.coverage.gargantext
# $ firefox result/share/hpc/vanilla/html/
flake.doCoverage = true;
# Defaults to haskellLib.selectProjectPackages which select cabal.project's `packages`
# but rather make all `source-repository-package`s also available in `ciJobs.coverage.*`
flake.packages = haskellLib.selectLocalPackages;
# FIXME: haskell.nix uses a `doCoverage = lib.mkDefault true` which causes conflicts.
flake.coverageProjectModule = {
modules = [
{
packages =
let packageNames = project: builtins.attrNames (config.flake.packages project.hsPkgs); in
lib.genAttrs (packageNames config) (_: { doCoverage = true; });
}
];
};
# Dead-code analysis
# $ nix -L build .#weeder-project-analysis
# $ bat result
# Note that there may be false positives
# and that some file location may be wrong.
weeder = {
packages = ps:
haskellLib.selectProjectPackages ps //
lib.getAttrs [
"crawlerArxiv"
"crawlerHAL"
"crawlerIsidore"
"crawlerPubMed"
"epo-api-client"
"gargantext-graph"
"gargantext-prelude"
] ps;
# See https://github.com/ocharles/weeder?tab=readme-ov-file#configuration-options
settings = {
roots = [
"^Main.main$"
# Automatically generated by Cabal
"^Paths_.*"
];
root-instances = [
];
# Consider all instances of type classes as roots.
type-class-roots = true;
unused-types = true;
};
};
# Make some variables available to all project modules
_module.specialArgs = {
# Use specialArgs to avoid avoid infinite recursion
# when `inputs` is used in `imports`.
inherit inputs;
};
_module.args = {
inherit system;
inherit (pkgs.haskell-nix) haskellLib;
};
})
# project modules
(import nix/overlays/haskell-nix/gargantext.nix)
(import nix/overlays/haskell-nix/weeder.nix)
];
projectFlake = project.flake { };
in {
legacyPackages = pkgs // {
# For exploring the project:
# $ nix --extra-experimental-features 'flakes repl-flake' repl .
# nix-repl> :lf .
# nix-repl> legacyPackages.x86_64-linux.project.<TAB>
inherit project;
};
# For building a component of this project:
# $ nix -L build .#gargantext:exe:gargantext-phylo-profile
packages = projectFlake.packages // {
weeder-analysis = project.args.weeder.analysis;
};
# For entering the default development shell:
# $ nix -L develop
# $ cabal build --disable-optimization
#
# For entering the development shell variant `profiling`:
# $ nix -L develop .#profiling
# $ cabal run --enable-profiling gargantext-phylo-profile
devShells = projectFlake.devShells;
apps = projectFlake.apps // {
# For updating nix/cache/haskell-nix/materialized:
# $ nix run .#update-nix-cache-haskell-nix-materialized
# It needs to be updated when cabal.freeze or any other input to the plan-nix changes.
# It's only OK to use it when the plan-nix does not depend on `system`.
# See https://github.com/input-output-hk/haskell.nix/blob/master/docs/tutorials/materialization.md#when-is-it-ok-to-materialize
update-nix-cache-haskell-nix-materialized = inputs.flake-utils.lib.mkApp {
drv = pkgs.writeShellApplication {
name = "update-nix-cache-haskell-nix-materialized";
text = ''
set -eux
git diff --exit-code
${(project.appendModule { materialized = lib.mkForce null; }).plan-nix.passthru.generateMaterialized} nix/cache/haskell-nix/materialized
git add --all nix/cache/haskell-nix/materialized
git commit -m "nix: update nix/cache/haskell-nix/materialized"
'';
};
};
# Register the default project's toolchain,
# to prevent nix-collect-garbage from removing them from the Nix store.
# Note that it does not register the roots of the `projectVariants`.
update-nix-cache-haskell-nix-gc-roots = inputs.flake-utils.lib.mkApp {
drv = pkgs.writeShellApplication {
name = "update-nix-cache-haskell-nix-gc-roots";
text = ''
set -eux
rm -rf nix/cache/haskell-nix/gc-roots
nix-store --add-root nix/cache/haskell-nix/gc-roots/default --indirect --realise ${project.roots}
nix-store --add-root nix/cache/haskell-nix/gc-roots/coreNLP --indirect --realise ${self.apps.${system}.coreNLP.program}
'';
};
};
# For garg-test-hspec
coreNLP =
# Avoid recompiling openjdk due to any overlay used in the common pkgs.
let pkgs = import inputs.nixpkgs { inherit system; }; in
inputs.flake-utils.lib.mkApp {
drv = pkgs.writeShellApplication {
name = "coreNLP";
text = ''
set -x
exec ${pkgs.openjdk}/bin/java -mx4g -cp '${inputs.coreNLP}/*' edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
'';
};
};
};
# For running all checks (very slow):
# $ nix -L flake check
#
# For building a specific check of the project:
# $ nix -L build .#project.hsPkgs.gargantext.components.tests.garg-test-tasty
# $ result/bin/garg-test-tasty
#
# Alternatively, but slower:
# $ nix -L build .#checks.x86_64-linux.gargantext:test:garg-test-tasty
# $ bat result/test-stdout
#
# See names from:
# $ nix -L flake show --allow-import-from-derivation
# Alas, currently coverage reports do not work (can't find hpc)
# with nixpkgs.haskellPackages' GHC, so haskell.nix's GHC has to be used:
# $ # nix -L build .#project.projectCoverageReport
# $ nix -L build .#project.projectVariants.haskell-nix-ghc.projectCoverageReport
# $ firefox result/share/hpc/vanilla/html/index.html
checks = projectFlake.checks;
# Jobs for the Nix-based continuous integration system: Hydra
# https://nixos.wiki/wiki/Hydra
# Note that haskell.nix always set `checkMaterialization = true` in `hydraJobs`.
#hydraJobs = projectFlake.hydraJobs;
# `ciJobs` is like `hydraJobs` but with `${system}` first
# so that the IFDs will not have to run for systems
# we are not testing (placement of `${system}` is done by `flake-utils.eachSystem`
# and it treats `hydraJobs` differently from the other flake.
# Note that haskell.nix always set `checkMaterialization = true` in `ciJobs`.
ciJobs = projectFlake.ciJobs;
}
);
# Ask users to set Nix config entries in ~/.local/share/nix/trusted-settings.json.
nixConfig = {
# This sets the flake to use the IOG nix cache.
# Only useful when using the haskell-nix-ghc variant.
extra-substituters = [
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
# haskell.nix translates to Nix expressions:
# - the build plan usually generated in `dist-newstyle/cache/plan.json` by `cabal configure`
# - and the `.cabal`/`stack.yaml`/`package.yaml` files of projects.
#
# haskell.nix can either generate those Nix expressions on-demand
# by calling its nix-tools' make-install-plan and cabal-to-nix,
# hence importing them from a derivation (IFD).
# Or import pre-generated files whenever project's materialized= attribute is not null,
# and then no longer needs to allow IFD.
allow-import-from-derivation = "true";
};
}
{ lib, ... }:
{
modules = [
({ pkgs, ... }: {
# Start StanfordCoreNLPServer to pass the Hspec tests
# Use `nix run` instead of `inputs.coreNLP` directly
# to avoid downloading it if not running garg-test-hspec
packages.gargantext.components.tests.garg-test-hspec.preCheck = ''
export GARGANTEXT_CORENLP_SERVER="${pkgs.nixFlakes}/bin/nix run .#coreNLP"
'';
packages.gargantext.components.tests.garg-test-hspec.testFlags = [
# FIXME:
# test/Test/Database/Operations.hs:64:7:
# 1) Database.Read/Writes, Corpus creation, Can add documents to a Corpus
# uncaught exception: HttpException
# HttpExceptionRequest Request {
# host = "localhost"
# port = 9000
# secure = False
# requestHeaders = [("Accept","application/json")]
# path = "/"
# queryString = "?properties=%7B%22annotators%22:%22tokenize,ssplit,pos,ner%22,%22outputFormat%22:%22json%22%7D"
# method = "POST"
# proxy = Nothing
# rawBody = False
# redirectCount = 10
# responseTimeout = ResponseTimeoutDefault
# requestVersion = HTTP/1.1
# proxySecureMode = ProxySecureWithConnect
# }
# (ConnectionFailure Network.Socket.connect: <socket: 18>: does not exist (Connection refused))
"--match" "'!/Database/Read/Writes/Corpus creation/Can add documents to a Corpus/'"
];
# Beware those failures are non-deterministic.
# For reproducing it may help to use a project's variant like "coverage":
# $ nix -L build .#project.projectVariants.coverage.hsPkgs.gargantext.components.tests.garg-test-tasty
# $ for i in {1..100}; do result/bin/garg-test-tasty --hide-successes || break; done
# Note that testFlags are only applied on checks.*, not on tests.*
packages.gargantext.components.tests.garg-test-tasty = {
build-tools = [
pkgs.graphviz
];
testFlags = [
"--pattern"
("'" + lib.concatStringsSep " && " [
# FAIL: (non-deterministic)
# Graph Clustering
# Cross
# Partition test: FAIL (0.14s)
# uncaught exception: ErrorCall
# *** Internal error in package accelerate ***
# *** Please submit a bug report at https://github.com/AccelerateHS/accelerate/issues
# Encountered a duplicate 'Tag'
# 81: Tag 1, 77: Tag 1, 79: Tag 1, 84: Tag 1
# CallStack (from HasCallStack):
# internalError: Data.Array.Accelerate.Trafo.Sharing:2274:19
# buildInitialEnvExp: Data.Array.Accelerate.Trafo.Sharing:2702:17
# determineScopesExp: Data.Array.Accelerate.Trafo.Sharing:2608:17
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2636:26
# scopesFun1: Data.Array.Accelerate.Trafo.Sharing:2429:60
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2490:33
# travF2MEA: Data.Array.Accelerate.Trafo.Sharing:2406:38
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2464:33
# travEA: Data.Array.Accelerate.Trafo.Sharing:2397:38
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2509:34
# travF2A2: Data.Array.Accelerate.Trafo.Sharing:2405:38
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2490:33
# travF2MEA: Data.Array.Accelerate.Trafo.Sharing:2406:38
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2490:33
# travF2MEA: Data.Array.Accelerate.Trafo.Sharing:2406:38
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2331:46
# determineScopesSharingAcc: Data.Array.Accelerate.Trafo.Sharing:2718:17
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2818:33
# travAE: Data.Array.Accelerate.Trafo.Sharing:2767:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2790:32
# travE2: Data.Array.Accelerate.Trafo.Sharing:2749:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2780:30
# travE1: Data.Array.Accelerate.Trafo.Sharing:2766:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2789:32
# travE2: Data.Array.Accelerate.Trafo.Sharing:2749:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2780:30
# travE1: Data.Array.Accelerate.Trafo.Sharing:2751:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2800:32
# travE3: Data.Array.Accelerate.Trafo.Sharing:2760:36
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2712:56
# determineScopesSharingExp: Data.Array.Accelerate.Trafo.Sharing:2696:60
# determineScopesExp: Data.Array.Accelerate.Trafo.Sharing:2608:17
# scopesExp: Data.Array.Accelerate.Trafo.Sharing:2636:26
# scopesFun1: Data.Array.Accelerate.Trafo.Sharing:2400:60
# scopesAcc: Data.Array.Accelerate.Trafo.Sharing:2331:46
# determineScopesSharingAcc: Data.Array.Accelerate.Trafo.Sharing:2317:37
# determineScopesAcc: Data.Array.Accelerate.Trafo.Sharing:3101:5
# recoverSharingAcc: Data.Array.Accelerate.Trafo.Sharing:240:34
# convertOpenAcc: Data.Array.Accelerate.Trafo.Sharing:162:35
# convertAccWith: Data.Array.Accelerate.Trafo:71:37
"!/Partition test/"
# FIXME: FAIL (non-deterministic)
# Starting 1 job runners.
# Starting 1 job runners.
# expected: [Nothing,Just 10,Just 5]
# but got: [Nothing,Nothing,Nothing]
"!/can fetch the latest job status/"
# FIXME: FAIL (non-deterministic)
# expected: [Just 100]
# but got: [Nothing]
# expected: [Just 50]
# but got: [Nothing]
"!/can spin two separate jobs and track their status separately/"
# FIXME: FAIL
# -- | Build the coocurency matrix for 62 unit of time
# -- | Group 22 docs by 62 unit of time
# Exception:
# *** Internal error in package accelerate ***
# *** Please submit a bug report at https://github.com/AccelerateHS/accelerate/issues
# Encountered a duplicate 'Tag'
# 208: Tag 1, 212: Tag 1, 210: Tag 1, 205: Tag 1
"!/phyloCleopatre returns expected data/"
# FIXME: FAIL
# huge error diff
"!/phylo2dot2json.is deterministic/"
# FIXME: FAIL
# Exception: /nix/store/yx2cnkj4hq6zk867nkvpffvyd9qy2slp-gargantext-test-garg-test-tasty-0.0.7.1.1-data/share/ghc-9.4.7/x86_64-linux-ghc-9.4.7/gargantext-0.0.7.1.1/test-data/phylo/GarganText_NgramsList-187482.csv: openBinaryFile: does not exist (No such file or directory)
#"!/toPhylo.is deterministic/"
# FIXME: recursively call cabal
"!/test vector works/"
# FIXME: FAIL (deterministic when coverage is enabled):
# nix -L build .#project.projectVariants.haskell-nix-ghc.flake"'".ciJobs.coverage.gargantext
#
# check if similarities optimizations are well implemented
# uncaught exception: ErrorCall
# *** Internal error in package accelerate ***
# *** Please submit a bug report at https://github.com/AccelerateHS/accelerate/issues
# Encountered a duplicate 'Tag'
# 259: Tag 1, 261: Tag 1
"!/Conditional/"
] + "'")
];
};
})
];
}
{ config, pkgs, lib, haskellLib, ... }:
let
cfg = config.weeder;
toml = pkgs.formats.toml {};
in
{
options.weeder = {
analysis = lib.mkOption {
type = lib.types.package;
default = null;
internal = true;
};
packages = lib.mkOption {
type = lib.types.unspecified;
default = haskellLib.selectProjectPackages;
};
settings = lib.mkOption {
type = toml.type;
default = {};
};
};
config = {
modules = [
{
# Enable writeHieFiles by default.
# See https://github.com/input-output-hk/haskell.nix/issues/298#issuecomment-767936405
# for what's going on in this trick.
options.packages = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ config, ... }: {
config = lib.mkIf
( (cfg.packages { ${config.package.identifier.name} = config.package; })
? ${config.package.identifier.name} ) {
writeHieFiles = lib.mkForce true;
};
}
)
);
};
}
];
weeder.analysis =
pkgs.runCommand "weeder-${config.name}" {
buildInputs = [
pkgs.glibcLocales
pkgs.haskell.packages.${config.compiler-nix-name}.weeder
];
allHieFiles = pkgs.linkFarm "allHieFiles" (
lib.concatMap (package:
let
lib-hies = lib.optional (package.components ? library) {
name = "${package.identifier.name}-library";
path = package.components.library.hie;
};
exe-hies = lib.concatMap (exe:
lib.optional (package.components.exes.${exe} ? hie) {
name = "${package.identifier.name}-exe-${exe}";
path = package.components.exes.${exe}.hie;
})
(lib.attrNames package.components.exes);
test-hies = lib.concatMap (test-name:
let
test = package.components.tests.${test-name};
is-doctest =
# doctest tests build _all_ components of a package.
# The GHC id of these packages will be different,
# which means that when we run weeder, all this code
# will be uncalled. These are false positives, so
# we don't include hie files from anything that
# depends on `doctest`.
lib.any (x: x.identifier.name or "" == "doctest") test.config.depends;
in
lib.optional (!is-doctest) {
name = "${package.identifier.name}-test-${test-name}";
path = test.hie;
})
(lib.attrNames package.components.tests);
in
lib-hies ++ exe-hies ++ test-hies
)
(builtins.attrValues (cfg.packages config.hsPkgs))
);
} ''
export LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
cd $allHieFiles
weeder >$out --no-default-fields --config ${toml.generate "weeder.toml" cfg.settings} ||
test $? = 228 # One or more weeds found
'';
};
}
finalPkgs: previousPkgs: {
# FIXME: update to a version >= 10.0.1
# to include 2a265497 from https://gitlab.com/graphviz/graphviz/-/merge_requests/3487
graphviz = previousPkgs.graphviz.overrideAttrs (finalAttrs: previousAttrs: {
patches = (previousAttrs.patches or [ ]) ++ [
# Increase the YY_BUF_SIZE
# See https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/290#note_9015
graphviz/graphviz-yy-buf-size.diff
];
});
}
--- a/lib/cgraph/scan.l
+++ b/lib/cgraph/scan.l
@@ -32,7 +32,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
-// #define YY_BUF_SIZE 128000
+#define YY_BUF_SIZE 128000
#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */
/* this is a workaround for linux flex */
static int line_num = 1;
\ No newline at end of file
finalPkgs: previousPkgs: {
# WARNING: the nixpkgs pinned brings igraph-0.10.7 not igraph-0.10.4
# as expected by haskell-igraph-0.10.4
# Note that igraph uses the lapack and blas alternative selector packages
# which default to using openblas.
igraph = (previousPkgs.igraph.override {
# fop pulls openjdk, scipy, blas… just to build PDF docs,
fop = null;
}).overrideAttrs (previousAttrs: {
cmakeFlags = previousAttrs.cmakeFlags ++ [
# Disable Open Multi-Processing, to let GHC handle the kernel threads.
"-DIGRAPH_OPENMP_SUPPORT=OFF"
];
});
# Dependency of igraph
plfit = previousPkgs.plfit.overrideAttrs (previousAttrs: {
cmakeFlags = previousAttrs.cmakeFlags ++ [
# Disable Open Multi-Processing, to let GHC handle the kernel threads.
"-DPLFIT_USE_OPENMP=OFF"
];
});
}
finalPkgs: previousPkgs: {
# Dependency of igraph and hmatrix
openblas = previousPkgs.openblas.override {
# Let GHC handle the kernel threads.
# See also https://github.com/OpenMathLib/OpenBLAS/issues/2543
singleThreaded = true;
};
}
From 64cd06549f19ad447f18a45d872b59b2b2db9135 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+gargantext@sourcephile.fr>
Date: Wed, 28 Jun 2023 23:07:32 +0200
Subject: [PATCH] remove test using removed `realBandedGramian`
---
test/Test.hs | 1 -
test/Test/Data/Array/Accelerate/Arithmetic/Sparse.hs | 7 -------
2 files changed, 8 deletions(-)
diff --git a/test/Test.hs b/test/Test.hs
index ebc140f..ea736ee 100644
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -10,7 +10,6 @@ import Test.QuickCheck (quickCheck)
test :: IO ()
test = mapM_ (\(msg,act) -> putStr (msg++": ") >> act) $
("sparseMatrix", quickCheck (\(Mod.Blind x) -> Sparse.multiplication x)) :
- ("bandedGramian", quickCheck (\(Mod.Blind x) -> Sparse.bandedGramian x)) :
("flattenMatrix", quickCheck (\(Mod.Blind x) -> LinAlg.flattenMatrix x)) :
("restoreMatrix", quickCheck (\(Mod.Blind x) -> LinAlg.restoreMatrix x)) :
("flattenRestoreMatrix", quickCheck (\(Mod.Blind x) -> LinAlg.flattenRestoreMatrix x)) :
diff --git a/test/Test/Data/Array/Accelerate/Arithmetic/Sparse.hs b/test/Test/Data/Array/Accelerate/Arithmetic/Sparse.hs
index da497dd..15e7e51 100644
--- a/test/Test/Data/Array/Accelerate/Arithmetic/Sparse.hs
+++ b/test/Test/Data/Array/Accelerate/Arithmetic/Sparse.hs
@@ -73,10 +73,3 @@ instance (QC.Arbitrary a, A.Elt a) => QC.Arbitrary (BandGramian a) where
return $
BandGramian (A.lift width)
(Sparse.Rows (A.lift cols) (A.use m))
-
-
-bandedGramian :: BandGramian Word32 -> Bool
-bandedGramian (BandGramian width m) =
- Sparse.multiplyColumnsRows (Sparse.transposeRows m) m
- =!=
- BandMatrix.flattenSymmetric (Sparse.realBandedGramian width m)
--
2.40.1
......@@ -7,9 +7,11 @@ import Gargantext.Prelude hiding (isInfixOf)
import Control.Monad
import Data.Text (isInfixOf)
import Shelly hiding (FilePath)
import System.Environment (lookupEnv)
import System.IO
import System.Process
import Test.Hspec
import qualified Data.List as List
import qualified Data.Text as T
import qualified Test.API as API
import qualified Test.Database.Operations as DB
......@@ -18,15 +20,20 @@ import qualified Test.Database.Operations as DB
startCoreNLPServer :: IO ProcessHandle
startCoreNLPServer = do
devNull <- openFile "/dev/null" WriteMode
let p = proc "./startServer.sh" []
(_, _, _, hdl) <- (createProcess $ p { cwd = Just "devops/coreNLP/stanford-corenlp-current"
-- Make the CoreNLP server configurable by an envvar, eg. set by nix develop
coreNLPEnv <- lookupEnv "GARGANTEXT_CORENLP_SERVER"
let (procName, procArgs) = case coreNLPEnv of
Just str | name:args <- List.words str -> (name,args)
_ -> ("./startServer.sh", [])
let p = proc procName procArgs
(_, _, _, hdl) <- (createProcess $ p { cwd = maybe (Just "devops/coreNLP/stanford-corenlp-current") (const Nothing) coreNLPEnv
, delegate_ctlc = True
, create_group = True
, std_out = UseHandle devNull
, std_err = UseHandle devNull
}) `catch` \e -> case e of
_ | True <- "does not exist" `isInfixOf` (T.pack . show @SomeException $ e)
-> fail $ "Cannot execute the 'startServer.sh' script. If this is the " <>
-> fail $ "Cannot execute "<>procName<>". If this is the " <>
"first time you are running the tests, you have to run " <>
"cd devops/coreNLP && ./build.sh first. You have to run it only once, " <>
"and then you are good to go for the time being."
......
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