Commit e7f9cf26 authored by Julien Moutinho's avatar Julien Moutinho

build: add support for `haskell.nix`

parent 71548e0b
......@@ -45,3 +45,8 @@ devops/docker/js-cache
cabal.project.local
gargantext_profile_out.dot
# Nix
!flake.lock
cabal.project.flake
nix/cache/roots
{
"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": {
"lastModified": 1678927224,
"narHash": "sha256-jFgSUKOSrxqkySet2kSZ6hMf5kbyuBT2uXou5ia3oh4=",
"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 an 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 host NixOS:
# 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.
# 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 it is very slow the first time,
# because this Flake's `checks` output, generate a build plan
# for each Cabal test-suite of the project' closure.
outputs = { self, ... }@inputs:
let
# FIXME: darwin support is untested.
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
(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
patches/graphviz/graphviz-yy-buf-size.diff
];
});
})
(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;
};
# 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: {
# Note that blas and lapack in previousAttrs.buildInputs
# both default to wrapping openblas.
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: {
pkgsCross = previousPkgs.pkgsCross // {
musl64 = previousPkgs.pkgsCross.musl64.extend (finalMusl64: previousMusl64: {
igraph = previousMusl64.igraph.overrideAttrs (previousAttrs: {
buildInputs = with finalMusl64; [
# Remove dependency on arpack (and eigen transitively)
blas # wraps openblas
glpk
gmp
lapack # wraps openblas
plfit
];
cmakeFlags = previousAttrs.cmakeFlags ++ [
# Enable static build.
"-DBUILD_SHARED_LIBS=OFF"
# Using an external ARPACK does not work
# later on when linking haskell-igraph-test-test
# due to undefined references (eg. to dsortr_).
# Even when arpack is built with -DBUILD_SHARED_LIBS=OFF,
# is some other dependency not statically built? gfortran?
"-DIGRAPH_USE_INTERNAL_ARPACK=ON"
# Disable Link Time Optimization, because it fails with a lot of undefined references
# when linking statically here.
"-DIGRAPH_ENABLE_LTO=OFF"
# Disable Thread Local Storage, because it fails when linking gargantext-graph with:
# ghc-iserv: /nix/store/fpksda4yrj6khk20vkll403agicmnh5p-igraph-x86_64-unknown-linux-musl-0.10.7/lib/libigraph.a: unsupported internal ELF TLSGD relocation for symbol `igraph_i_finally_stack_size'
"-DIGRAPH_ENABLE_TLS=OFF"
#"-DIGRAPH_VERIFY_FINALLY_STACK=ON"
#"-DCMAKE_CXX_FLAGS=-fPIC"
#"-DCMAKE_C_FLAGS=-fPIC"
];
});
openblas = previousMusl64.openblas.override {
# See https://github.com/input-output-hk/haskell.nix/issues/914#issuecomment-2021507590
enableStatic = true;
# Necessary to overcome lapack and blas packaging.
# And avoid ghc-iserv to fail finding the shared libs.
enableShared = true;
};
# Not enough anyway to avoid:
# unknown symbol `ZSTD_trace_compress_begin' in zstd Haskell package.
#zstd = previousMusl64.zstd.override {
# static = true;
#};
});
};
})
];
};
# A standard library of Nix expressions.
lib = inputs.nixpkgs.lib;
# A library of Nix expressions internal to haskell.nix.
inherit (pkgs.haskell-nix) haskellLib;
# 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 (lib.readFile ./cabal.project);
compiler-nix-name = "ghc947";
# Download GHC from Nixpkgs' binary cache instead of IOHK's
# which would be done by using: p.haskell-nix.compiler
# Fails with:
# ghc-lib-ghc> Configuring library for ghc-9.4.7..
# ghc-lib-ghc> genprimopcode: readCreateProcess: posix_spawnp: does not exist (No such file or directory)
#compilerSelection = p: p.haskell.compiler;
compilerSelection = p: p.haskell-nix.compiler;
# 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";
# Needed to retrive src.rev in local dependencyPackages
passthru.src = src;
};
# Dependencies for which to produce a coverage report.
coveredDependencies = pkgs: with pkgs; [
accelerate
accelerate-arithmetic
accelerate-llvm
accelerate-utility
boolexpr
crawlerArxiv
crawlerHAL
crawlerISTEX
crawlerIsidore
crawlerPubMed
data-time-segment
eigen
ekg-json
epo-api-client
gargantext-graph
gargantext-prelude
# Alas, haskell-igraph uses .chs files that hpc does not consider.
# Are there in some dist-newstyle somewhere that could be passed as --srcdir?
#haskell-igraph
hlcm
hmatrix
hsinfomap
iso639
llvm-hs
opaleye
openalex
patches-class
patches-map
rdf4h
servant-job
servant-xml-conduit
sparse-linear
];
# Unfortunately project.hsPkgs.${pkgName}.components.library.srcSubDirPath
# is not (cannot be?) set to the relevant srcSubDir
# by haskell.nix/lib/import-and-filter-project.nix
# for non-project packages.
# Hence do it manually…
srcSubDir = pkgName: {
accelerate-llvm-native = "/${pkgName}";
accelerate-llvm = "/${pkgName}";
llvm-hs = "/${pkgName}";
llvm-hs-pure = "/${pkgName}";
hmatrix = "/packages/base";
sparse-linear = "/${pkgName}";
}.${pkgName} or "";
# haskell.nix's main entry point
project = pkgs.haskell-nix.cabalProject' {
name = "gargantext";
src = ./.;
# By default plan evaluation is done on the build system.
#evalSystem = "x86_64-linux";
inherit compiler-nix-name;
inherit compilerSelection;
inherit index-state;
# Materializing a project means caching
# the nix files generated from the *.cabal/stack.yaml/package.yaml files.
# To update:
# $ nix run .#update-nix-cache-plan
# TODO: actually use it (and commit it in the git repo)
# once every Gargantext developer understands it needs to be updated
# when cabal.freeze changes.
#materialized = nix/cache/plan;
# Using inputMap for each source-repository-package of cabal.project
# leverages Nix Flake's inputs to automatically get their sha256 hashes
# and to check upstreams for updates (using `nix flake update`
# or `nix flake lock --update-input <input>`).
inputMap = {
"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" = inputs.accelerate-arithmetic;
"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" = inputs.crawlerIsidore;
"https://gitlab.iscpif.fr/gargantext/crawlers/istex.git" = 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" = 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;
# Fixes needed for specific revisions
# ===================================
"https://github.com/alpmestan/accelerate-arithmetic.git/a110807651036ca2228a76507ee35bbf7aedf87a" = pkgs.applyPatches {
name = "accelerate-arithmetic-patched";
src = inputs.accelerate-arithmetic;
patches = [ patches/accelerate-arithmetic/0001-remove-test-using-removed-realBandedGramian.patch ];
};
"https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git/e9b594a4718acc06db037f6d3f429a90db76c267" = removePackageYaml inputs.crawlerIsidore;
"https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude/618f711a530df56caefbb1577c4bf3d5ff45e214" = removePackageYaml inputs.gargantext-prelude;
"https://gitlab.iscpif.fr/gargantext/crawlers/istex.git/c0a08d62c40a169b7934ceb7cb12c39952160e7a" = removePackageYaml inputs.crawlerISTEX;
};
# Default project configuration.
modules = [
( { pkgs, ...}: {
packages.haskell-igraph.components.library = {
# The generated plan includes pkgs.igraph
# 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;
# Start StanfordCoreNLPServer to pass the Hspec tests
# This has the side effect of adding ~500MB to the build closure of gargantext…
packages.gargantext.components.tests.garg-test-hspec.postPatch = ''
substituteInPlace test/drivers/hspec/Main.hs \
--replace 'proc (fromMaybe "./startServer.sh" <$> startServer) []' \
'proc "${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 project's variants 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.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/'"
])
];
})
];
# Variants to the default project configuration above.
# They're accessed in the flake's outputs with their name prefixed.
# $ nix -L build .#static-x86_64-unknown-linux-musl:gargantext:exe:gargantext-phylo-profile
# Or via project.projectVariants:
# $ nix -L build .#project.projectVariants.static.projectCross.musl64.hsPkgs.postgresql-libpq.components.library
flake.variants = {
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 building static executables:
# $ nix -L build .#static-x86_64-unknown-linux-musl:gargantext:exe:gargantext-phylo-profile
#
# Note the use of the Musl cross compiling platform
# to replace glibc which does not fully support static linking.
#
# For debugging static executables (Musl is not bug-to-bug compatible with glibc):
# $ nix -L develop .#legacyPackages.x86_64-linux.project.projectVariants.static.projectCross.musl64.hsPkgs.gargantext-graph.components.library
# devShell> $ rm -rf source outputs
# devShell> $ unpackPhase
# devShell> $ cd source
# devShell> $ patchPhase
# devShell> $ eval "$configurePhase"
# devShell> $ eval "$buildPhase"
# devShell> $ (unset LD_LIBRARY_PATH; $EDITOR **/*.hs) # hack hack hack
# devShell> $ eval "$buildPhase"
# devShell> $ eval "$installPhase"
#
# FIXME: this static compiling currently fails.
# A problem to look for is pkgsCross.musl64
# still having some libraries not built statically.
static = {
modules = [
({ config, pkgs, ... }: {
enableStatic = true;
# Fails with:
# cmdargs-lib-cmdargs-x86_64-unknown-linux-musl> Bad interface file: /nix/store/n0iwpy7240kw1mkmryzcgj9s9vvbfslb-transformers-lib-transformers-x86_64-unknown-linux-musl-0.5.6.2/lib/x86_64-linux-ghc-9.4.7/transformers-0.5.6.2-7uipldXxD6oGHq4y3fP618/Control/Monad/Trans/State.dyn_hi
#
# Besides it does not apply DYNAMIC_GHC_PROGRAMS=NO to GHC.
#enableShared = false;
# Musl does not provide the thread-safe random_r()/initstate_r()
# so make randomVector fallback to a **non** thread-safe alternative, nrand48()
# See https://github.com/haskell-numerics/hmatrix/issues/279
#
# As a consequence, random numbers may not be random between threads
# as they now share a common state.
# See http://www.evanjones.ca/random-thread-safe.html
# > the best solution for truly portable applications
# > is to include your own random number generator implementation,
# > and not rely on the system's C library.
# See https://github.com/haskell-numerics/hmatrix/issues/307
packages.hmatrix.flags.no-random_r = true;
# Use pkg-config instead of pg_config to avoid:
# $ nix -L build .#legacyPackages.x86_64-linux.project.projectVariants.static.projectCross.musl64.hsPkgs.postgresql-libpq.components.library
# > Error: Setup: The program 'pg_config' is required but it could not be found
packages.postgresql-libpq.flags.use-pkg-config = true;
# Fix c2hs failing to run ghc
# because when cross-compiling it's prefixed, eg. x86_64-unknown-linux-musl-ghc
# TODO: remove when https://github.com/haskell/c2hs/pull/293 has been merged
packages.c2hs.components.exes.c2hs.depends = [
config.hsPkgs.ghc-paths
];
packages.c2hs.patches = [
patches/c2hs/0001-fix-GHC-path-to-support-cross-compiling.patch
];
# Alas, line-ending mess on c2hs.cabal prevents to use a patch.
# And patchFlags=["--binary"] is not passed to mkDerivation by haskell.nix
# Hence use substituteInPlace to add ghc-paths to the build-depends.
packages.c2hs.postPatch = ''
substituteInPlace c2hs.cabal \
--replace "base >= 2 && < 5," "base >= 2 && < 5, ghc-paths,"
'';
# Musl does not support dlopen().
# But GHC's RTS supports internal_dlopen() when -fexternal-dynamic-refs is used,
# as enabled in haskell.nix/compiler/ghc/default.nix
# however it may fail to do so (with a SIGSEGV)
# when splicing some TemplateHaskell code.
# See https://gitlab.haskell.org/ghc/ghc/-/issues/20628#note_393505
#
# Another alternative is to use -fexternal-interpreter which spawns a ghc-iserv,
# sadly it slows down the compiling by a huge factor…
packages.accelerate-llvm.ghcOptions = [ "-fexternal-interpreter" ];
packages.accelerate-llvm-native.ghcOptions = [ "-fexternal-interpreter" ];
# gargantext-graph uses TemplateHaskell.
packages.gargantext-graph.ghcOptions = [ "-fexternal-interpreter" ];
# Due to unknown symbol __cpu_model in bitvec-1.1.5.0
# when using -fexternal-interpreter,
# the SIMD optimization has to be disabled.
# See https://github.com/input-output-hk/haskell.nix/issues/2047
packages.bitvec.flags.simd = false;
# FIXME:
# ghc-iserv: /nix/store/nrycyind0m4lfn34b13h68bq2scj9vrk-zstd-lib-zstd-x86_64-unknown-linux-musl-0.1.3.0/lib/x86_64-linux-ghc-9.4.7/zstd-0.1.3.0-19JqsNNxPIf7nO0TGXWXpF/HSzstd-0.1.3.0-19JqsNNxPIf7nO0TGXWXpF.o: unknown symbol `ZSTD_trace_compress_begin'
# ghc-iserv: Could not load Object Code /nix/store/nrycyind0m4lfn34b13h68bq2scj9vrk-zstd-lib-zstd-x86_64-unknown-linux-musl-0.1.3.0/lib/x86_64-linux-ghc-9.4.7/zstd-0.1.3.0-19JqsNNxPIf7nO0TGXWXpF/HSzstd-0.1.3.0-19JqsNNxPIf7nO0TGXWXpF.o.
# <no location info>: error: unable to load unit `zstd-0.1.3.0'
# <no location info>: error: unable to load unit `ghc-prim-0.9.1'
packages.gargantext.ghcOptions = [
"-fexternal-interpreter"
#"-optl=-L${lib.getLib pkgs.zstd}/lib"
#"-optl=-lzstd"
];
packages.gargantext.components.library.libs = [
#(lib.getLib pkgs.zstd)
];
})
];
flake.crossPlatforms = platforms:
pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 (
# For building static executables.
pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
platforms.musl64
]
# For cross compiling to Windows.
# ++ [ platforms.mingwW64 ]
);
};
coverage = {
modules = [
({ pkgs, ... }: {
# For generating the project coverage report:
# $ nix -L build .#coverageReport
# $ firefox result/share/hpc/vanilla/html/index.html
packages.gargantext.components.library.doCoverage = true;
# haskell-igraph uses .chs files that hpc does not find…
packages.haskell-igraph.components.library.doCoverage = lib.mkForce false;
})
{
packages = lib.genAttrs
(map (pkg: pkg.identifier.name) (coveredDependencies project.hsPkgs))
(_: { doCoverage = true; });
}
];
};
};
# Shell configuration shared by the default shell
# and all shells from the flake.variants.
shell = {
# Force (by setting CABAL_CONFIG=) cabal-install to use the packages
# selected by project.plan-nix.
exactDeps = true;
# Provision (in `ghc-pkg list`) the **dependencies** of the packages selected here,
# which are not also 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-packages from being provisioned.
# Hence select only the _project_ packages (packages from the `packages` stanza).
packages = ps: lib.attrValues (haskellLib.selectProjectPackages ps);
# Add in this list any development tool needed
# that is not expected to come from the developers' own system.
nativeBuildInputs = [
# Wraps cabal-install to remove source-repository-package stanzas,
# otherwise it would download an use them,
# likely because it does not know that those packages provisioned
# in `ghc-pkg list` must be used in priority.
(let cabal-install = project.tool "cabal" {
version = "latest";
#inherit index-state;
modules = [
{
# Preserve Bash completion for cabal.
packages.cabal-install.components.exes.cabal.postInstall = ''
mkdir -p $out/share/bash-completion
mv bash-completion $out/share/bash-completion/completions
'';
}
];
};
in
# symlinkJoin cabal-install to preserve share/bash-completion/
pkgs.symlinkJoin {
name = "cabal-install";
paths = [ cabal-install ];
nativeBuildInputs = [ pkgs.makeWrapper ];
# Wrap cabal-install to make it use the local cabal.project.flake.
postBuild = ''
rm "$out"/bin/cabal
makeWrapper \
${cabal-install}/bin/cabal \
"$out"/bin/cabal \
--add-flags --project-file=cabal.project.flake
'';
})
(project.tool "ghcid" { version = "latest"; })
# Provide HLS because it is tighly coupled to the GHC version in use.
# TODO: uncomment when in public binary caches.
#(project.tool "haskell-language-server" { version = "latest"; })
(project.tool "hlint" { version = "latest"; })
];
# cabal.project.flake must be in the same directory than the original cabal.project
# for the relative paths in the packages stanza to point to the correct subdirs.
shellHook = ''
export GARGANTEXT_START_CORENLP="nix run .#coreNLP"
ln -sf ${pkgs.runCommandLocal "cabal.project" {
nativeBuildInputs = with pkgs; [ gawk ];
}
# Strips source-repository-package stanzas from cabal.project.
''
awk '/^[^ ]/{f=/^source-repository-package/} !f' >$out ${./cabal.project}
''
} cabal.project.flake
'';
# When true, builds a Hoogle documentation index of all dependencies,
# and provides a "hoogle" command to search the index.
withHoogle = true;
};
};
# Packages for which a build plan cannot be computed by cabal-install.
brokenPlans = [
# error: The option `packages.GLFW-b.package.identifier.name' is used but not defined.
"GLFW-b"
# error: The option `packages.Sit.package.identifier.name' is used but not defined.
"Sit"
# error: The option `packages.X11.package.identifier.name' is used but not defined.
"X11"
# error: The option `packages.Win32.package.identifier.name' is used but not defined.
"Win32"
# fail (backjumping, conflict set: binary, hashable, text, unordered-containers)
"binary"
# error: The option `packages.bindings-GLFW.package.identifier.name' is used but not defined.
"bindings-GLFW"
# [__3] rejecting: random-1.2.1 (cyclic dependencies; conflict set: bytestring, random, tasty-quickcheck)
"bytestring"
# [__3] rejecting: ansi-terminal-0.11.5 (cyclic dependencies; conflict set: ansi-terminal, colour, test-framework)
"colour"
# error: The option `packages.discount.package.identifier.name' is used but not defined.
"discount"
# [__3] rejecting: these-1.2 (cyclic dependencies; conflict set: foldable1-classes-compat, quickcheck-instances, these)
"foldable1-classes-compat"
# Could not resolve dependencies: [__0] next goal: ghc (user goal)
"ghc"
"ghc-boot"
"ghc-heap"
"ghc-lib-parser"
"ghc-syntax-highlighter"
"ghci"
# error: The option `packages.gi-gtk.package.identifier.name'
"gi-gtk"
# conflict set: http-api-data, http-api-data:hspec-discover:exe.hspec-discover, http-api-data:test
"http-api-data"
"libiserv"
# error: The option `packages.mintty.package.identifier.name'
"mintty"
# error: The option `packages.odbc.package.identifier.name' is used but not defined.
"odbc"
# error: The option `packages.pcap.package.identifier.name' is used but not defined.
"pcap"
# fail (backjumping, conflict set: ghc, tasty-inspection-testing, time)
"random"
# fail (backjumping, conflict set: base, cassava, scientific)
"scientific"
# [__2] fail (backjumping, conflict set: servant-client, servant-client:hspec-discover:exe.hspec-discover, servant-client:test)
"servant-client"
# fail (backjumping, conflict set: base, ekg, servant-ekg)
"servant-ekg"
# [__2] fail (backjumping, conflict set: servant-foreign, servant-foreign:hspec-discover:exe.hspec-discover, servant-foreign:test)
"servant-foreign"
# [__2] fail (backjumping, conflict set: servant-swagger, servant-swagger:hspec-discover:exe.hspec-discover, servant-swagger:test)
"servant-swagger"
# fail (backjumping, conflict set: QuickCheck, aeson, criterion, criterion-measurement, splitmix)
"splitmix"
# [__2] fail (backjumping, conflict set: swagger2, swagger2:hspec-discover:exe.hspec-discover, swagger2:test)
"swagger2"
# fail (backjumping, conflict set: criterion, time, time:bench)
"time"
# fail (backjumping, conflict set: optparse-applicative, process, tasty, tasty-hunit, template-haskell, unix, optparse-applicative:process)
"unix"
];
# Package for each dependency of the given config of the project.
dependencyPackages = config: lib.mapAttrs (packageName: package:
if package != null
&& (package.isHaskell or false)
# Already provided by projectFlake.checks
&& !(package.isProject or false)
# Some packages cannot be used:
# error: The option `packages.BNFC.package.identifier.name' is used but not defined.
&& (package.components ? "library")
&& !(lib.elem packageName brokenPlans)
then
# This only includes the source-repository-packages
# since the project packages have been filtered-out above.
if config.hsPkgs.${packageName}.isLocal
then ((pkgs.haskell-nix.cabalProject' (config.projectModule // {
name = packageName;
# Some source-repository-packages have a subdir stanza.
src = config.hsPkgs.${packageName}.src + srcSubDir packageName;
configureArgs = "--disable-benchmarks --minimize-conflict-set";
# Reuse the exact same dependency versions as the project,
# for the dependencies they share.
cabalProjectFreeze = lib.readFile ./cabal.project.freeze;
cabalProject = let
source-repository-packages = haskellLib.parseSourceRepositoryPackages "cabal.project" {} {} (lib.readFile ./cabal.project);
in ''
packages: ./
allow-newer: *
allow-older: *
''
# Add cabal.project's source-repository-packages
# except the one for this package.
+ lib.concatMapStringsSep "\n" (pkg:
let pkgSourceRepo = (lib.head (lib.filter
# Using pkg.src.src.rev is to handle the case when
# applyPatches or symlinkJoin has been used on an input.
(block: block.sourceRepo.rev == pkg.src.src.rev or pkg.src.rev)
source-repository-packages.sourceRepos)).sourceRepo; in
''
source-repository-package
type: git
location: ${pkgSourceRepo.url}
subdir: ${lib.concatStringsSep " " pkgSourceRepo.subdirs}
tag: ${pkgSourceRepo.rev}
''
) (lib.attrValues (lib.filterAttrs
(pkgName: pkg:
!(pkg.isProject or false) &&
(pkg.isLocal or false) &&
# This whole parsing of source-repository-packages
# is to remove pkgName from the source-repository-packages,
# otherwise it confuses cabal-install.
pkgName != packageName)
config.hsPkgs))
;
/* Unfortunately, this does not work as well as the above, it fails for:
nix -L build .#dependencyPackages.accelerate-arithmetic.components.tests.test
pkg-def-extras =
lib.attrValues (lib.filterAttrs (pkgName: pkg:
(hsPkgs.${pkgName}.isLocal or false) && pkgName != packageName)
project.pkg-set.config.packages);
*/
})).appendModule {
modules = [
{
# haskell.nix's applyComponents filters-out non-planned components,
# causing tests to be filtered-out.
planned = true;
}
];
}).getPackage packageName
# Other dependencies are fetched from Hackage.
else pkgs.haskell-nix.hackage-package {
name = package.identifier.name;
version = package.identifier.version;
revision = package.identifier.revision or "default";
inherit compiler-nix-name;
inherit compilerSelection;
inherit index-state;
# By default haskell.nix uses --enable-tests and --enable-benchmarks
configureArgs = "--disable-benchmarks --minimize-conflict-set";
cabalProjectFreeze = lib.readFile ./cabal.project.freeze;
cabalProject = ''
packages: ./
allow-newer: *
allow-older: *
'';
}
else null
) config.hsPkgs;
coverageReport =
let proj = project.projectVariants.coverage; in
# project.components.library and coveredDependencies coverage by gargantext's test-suites.
(haskellLib.projectCoverageReport proj
(map
(pkg:
haskellLib.coverageReport ({
name = pkg.identifier.name + "-" + pkg.identifier.version;
ghc = proj.pkg-set.config.ghc.package;
# Focus only on the coverage of the library of pkg.
mixLibraries = [ (pkg.components.library // {
srcSubDirPath = pkg.components.library.srcSubDirPath + srcSubDir pkg.identifier.name;
}) ];
# Using the test-suites of gargantext instead of the test-suites of pkg.
checks = lib.concatMap
# Prefix check names with pkg.identifier.name to avoid name conflicts
# since the same checks will be run for each package.
(check: lib.optional (lib.isDerivation check)
(check // { name = "${pkg.identifier.name}/${check.name}"; }))
(lib.attrValues proj.hsPkgs.gargantext.checks);
}))
(coveredDependencies proj.hsPkgs))
).overrideAttrs (previousAttrs: {
buildCommand = previousAttrs.buildCommand + ''
substituteInPlace $out/share/hpc/vanilla/html/index.html \
--replace "The following reports show how the tests of each package cover modules in the project:" \
"The following reports show how the tests of gargantext cover modules in some dependencies:"
( cd $out/share/hpc/vanilla/html ; zip -rf $out/share/hpc/vanilla/html.zip . )
'';
});
# coveredDependencies coverage by their own test-suites.
# TODO: test
dependenciesOwnCoverageReport =
let depPkgs = dependencyPackages project; in
haskellLib.projectCoverageReport
(project // {
hsPkgs = project.hsPkgs //
lib.genAttrs
(map (pkg: pkg.identifier.name) (coveredDependencies depPkgs))
(name: depPkgs.${name} // { isProject = true; });
})
(map (pkg:
haskellLib.coverageReport ({
name = pkg.identifier.name + "-" + pkg.identifier.version;
ghc = project.pkg-set.config.ghc.package;
# Focus only on the coverage of the library of pkg.
mixLibraries = [ pkg.components.library ];
# Using the test-suites of pkg.
checks = lib.filter lib.isDerivation (lib.attrValues pkg.checks);
}))
(coveredDependencies depPkgs)
);
projectFlake = project.flake { };
in {
legacyPackages = pkgs // {
dependencyPackages = dependencyPackages project;
# 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 //*/ {
# Not including all projectFlake.packages because
# anything querying the package list,
# like using .#project instead of .#legacyPackages.x86_64-linux.project
# or just `nix develop`, would list its attribute names and force to build
# too much of the supported projectCross plaforms, like musl64.
# Besides, not all combinations of projectCross and projectVariants are actually meaningful.
inherit (projectFlake.packages)
"gargantext:bench:garg-bench"
"gargantext:exe:gargantext-admin"
"gargantext:exe:gargantext-cli"
"gargantext:exe:gargantext-db-obfuscation"
"gargantext:exe:gargantext-import"
"gargantext:exe:gargantext-init"
"gargantext:exe:gargantext-invitations"
"gargantext:exe:gargantext-phylo"
"gargantext:exe:gargantext-phylo-profile"
"gargantext:exe:gargantext-server"
"gargantext:exe:gargantext-upgrade"
"gargantext:lib:gargantext"
"gargantext:test:garg-test-hspec"
"gargantext:test:garg-test-tasty"
"static-x86_64-unknown-linux-musl:gargantext:exe:gargantext-phylo-profile";
inherit coverageReport;
};
# 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/plan
# $ nix run .#update-nix-cache-plan
# $ git commit -m "nix: update nix/cache/plan"
update-nix-cache-plan = {
type = "app";
program = (pkgs.writeShellScript "update-nix-cache-plan" ''
set -x
${project.plan-nix.passthru.generateMaterialized} nix/cache/plan
git add --all nix/cache/plan
'').outPath;
};
# Register the project's toolchain for compiler-nix-name
# (but not the Haskell package dependencies of the project)
# to prevent nix-collect-garbage from removing them from the Nix store.
register-roots = {
type = "app";
program = (pkgs.writeShellScript "register-roots" ''
nix-store --add-root nix/cache/roots --indirect --realise ${project.roots}
'').outPath;
};
coreNLP = {
type = "app";
program = (pkgs.writeShellScript "coreNLP" ''
set -x
exec ${pkgs.openjdk}/bin/java -mx4g -cp '${inputs.coreNLP}/*' edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
'').outPath;
};
};
# For running all checks (very slow):
# $ nix -L flake check
# FIXME: actually run them all and disable or fix the broken ones.
#
# For building a specific check of the project:
# $ nix -L build .#project.hsPkgs.gargantext.components.tests.garg-test-tasty
# $ result/bin/garg-test-tasty
#
# For building a specific check of the dependencies:
# $ nix -L build .#dependencyPackages.duckling.components.tests.duckling-test
# $ result/bin/duckling-test
#
# Alternatively, but slower:
# $ nix -L build .#checks.x86_64-linux.duckling:test:duckling-test
# $ bat result/test-stdout
#
# See names from:
# $ nix -L flake show --allow-import-from-derivation
checks = projectFlake.checks // (
# Generate a check for each test-suite
# of each package in the closure of this project.
haskellLib.mkFlakeChecks (haskellLib.collectChecks' (dependencyPackages project))
);
#hydraJobs = projectFlake.hydraJobs;
}
);
# Ask users to set Nix config entries in its local nix.conf.
nixConfig = {
# This sets the flake to use the IOG nix cache.
# nix asks for permission before using it.
# It's not currently needed because compilerSelection uses Nixpkgs' GHC.
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 set,
# andthen no longer needs to allow IFD.
#
# Note that the projects for the checks of the closure in dependencyPackages
# are never materialized, hence checking or showing the checks
# always requires to allow IFD.
allow-import-from-derivation = "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
From d925fe838d4b4ebf7f2f39ddcdd3c4a6c5b0e938 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+c2hs@sourcephile.fr>
Date: Wed, 13 Mar 2024 22:50:59 +0100
Subject: [PATCH 2/2] fix GHC path to support cross-compiling
---
src/C2HS/Gen/Bind.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/C2HS/Gen/Bind.hs b/src/C2HS/Gen/Bind.hs
index fc2a3d0..d97e16f 100644
--- a/src/C2HS/Gen/Bind.hs
+++ b/src/C2HS/Gen/Bind.hs
@@ -134,6 +134,7 @@ import qualified Foreign.Storable as Storable (Storable(alignment),
Storable(sizeOf))
import Foreign (Ptr, FunPtr)
import Foreign.C
+import GHC.Paths (ghc)
-- Language.C / compiler toolkit
import Language.C.Data.Position
@@ -3136,7 +3137,7 @@ cCompiler = unsafePerformIO $ do
case mcc of
Just cc -> return cc
Nothing -> do
- (code, stdout, _) <- readProcessWithExitCode "ghc" ["--info"] ""
+ (code, stdout, _) <- readProcessWithExitCode ghc ["--info"] ""
when (code /= ExitSuccess) $
error "Failed to determine C compiler from 'ghc --info'!"
let vals = read stdout :: [(String, String)]
--
2.42.0
--- 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
......@@ -18,8 +18,10 @@ 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
startServer <- lookupEnv "GARGANTEXT_CORENLP_SERVER"
let p = proc (fromMaybe "./startServer.sh" <$> startServer) []
(_, _, _, hdl) <- (createProcess $ p { cwd = maybe (Just "devops/coreNLP/stanford-corenlp-current") Nothing startServer
, delegate_ctlc = True
, create_group = True
, std_out = UseHandle devNull
......
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