[nix] flake.nix julm branch merge with dev 0.0.7

parent 1b3b917c
......@@ -29,7 +29,7 @@ source-repository-package
source-repository-package
type: git
location: https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git
tag: cb07b604bfb7a22aa21dd8918de5cb65c8a4bdf1
tag: 2ca9f8a80881275dbf7f8816df592f4418797d59
source-repository-package
type: git
......@@ -124,7 +124,7 @@ source-repository-package
type: git
location: https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude
-- tag: 618f711a530df56caefbb1577c4bf3d5ff45e214
tag: d4f9bee483d41bbdf8ab4e09efb5a5a8216edff4
tag: 618f711a530df56caefbb1577c4bf3d5ff45e214
source-repository-package
type: git
......
......@@ -86,16 +86,15 @@
"boolexpr": {
"flake": false,
"locked": {
"lastModified": 1694500292,
"lastModified": 1697119510,
"narHash": "sha256-0Ut4QJVD2ocsUxMVDm9uCp/O3ICPdxVrIrjFcdvOtJ4=",
"owner": "adinapoli",
"owner": "boolexpr",
"repo": "boolexpr",
"rev": "91928b5d7f9342e9865dde0d94862792d2b88779",
"rev": "bcd7cb20a1b1bc3b58c4ba1b6ae1bccfe62f67ae",
"type": "github"
},
"original": {
"owner": "adinapoli",
"ref": "adinapoli/term-parsing",
"owner": "boolexpr",
"repo": "boolexpr",
"type": "github"
}
......@@ -186,11 +185,11 @@
"crawlerHAL": {
"flake": false,
"locked": {
"lastModified": 1702295464,
"narHash": "sha256-VTMSkMPuw4023k4RZtXU9EsV64mKWiXC3qPUUTj/eXE=",
"lastModified": 1710761107,
"narHash": "sha256-gV2aWfbUcI2mWSVWtbo9SBMXCkkVQQ9ezn4yw0Qv3uw=",
"ref": "refs/heads/master",
"rev": "bfa9069b4ff70f341ca3244e8aff9e83eb4b8b73",
"revCount": 59,
"rev": "b99b9e568c8bdc73af2b8016ed03ba5ee83c2030",
"revCount": 61,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/hal.git"
},
......@@ -498,23 +497,6 @@
"url": "https://gitlab.iscpif.fr/gargantext/haskell-infomap.git"
}
},
"haskell-opaleye": {
"flake": false,
"locked": {
"lastModified": 1707909910,
"narHash": "sha256-H79yYmdw9+z2ZkTS7pkjHNgjSQm0MCnPBHhqw65rAaA=",
"owner": "garganscript",
"repo": "haskell-opaleye",
"rev": "6cf1bcfe215143efac17919cfd0abdd60e0f717c",
"type": "github"
},
"original": {
"owner": "garganscript",
"ref": "tsquery-fixes",
"repo": "haskell-opaleye",
"type": "github"
}
},
"haskellNix": {
"inputs": {
"HTTP": "HTTP",
......@@ -1039,15 +1021,32 @@
"type": "github"
}
},
"opaleye-textsearch": {
"flake": false,
"locked": {
"lastModified": 1713353625,
"narHash": "sha256-WRfcdclyoulri+q+bjQEBeWV75CLCrWNafUeRx0NyxY=",
"ref": "refs/heads/main",
"rev": "2ca9f8a80881275dbf7f8816df592f4418797d59",
"revCount": 5,
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"
},
"original": {
"type": "git",
"url": "https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"
}
},
"openalex": {
"flake": false,
"locked": {
"lastModified": 1707164593,
"narHash": "sha256-muuSirbnKslm9UoDtz1EICjLDLHG/YmNZ/vrwa5xGf4=",
"rev": "cd179f6dda15d77a085c0176284c921b7bc50c46",
"revCount": 14,
"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/"
"url": "https://gitlab.iscpif.fr/gargantext/crawlers/openalex.git"
},
"original": {
"type": "git",
......@@ -1124,7 +1123,6 @@
"gargantext-prelude": "gargantext-prelude",
"haskell-igraph": "haskell-igraph",
"haskell-infomap": "haskell-infomap",
"haskell-opaleye": "haskell-opaleye",
"haskellNix": "haskellNix",
"hlcm": "hlcm",
"hmatrix": "hmatrix",
......@@ -1134,6 +1132,7 @@
"haskellNix",
"nixpkgs-unstable"
],
"opaleye-textsearch": "opaleye-textsearch",
"openalex": "openalex",
"patches-class": "patches-class",
"patches-map": "patches-map",
......
......@@ -3,6 +3,9 @@
# 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"
# To update individual package, look up flake.lock, also you can run:
# nix flake lock --update-input haskell-gargantext-prelude
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
......@@ -60,11 +63,15 @@
# WARNING: fork of https://github.com/boolexpr/boolexpr
# WARNING: was merged upstream
boolexpr = { url = "github:adinapoli/boolexpr/adinapoli/term-parsing"; flake = false; };
#boolexpr = { url = "github:adinapoli/boolexpr/adinapoli/term-parsing"; flake = false; };
boolexpr = { url = "github:boolexpr/boolexpr"; flake = false; };
# WARNING: fork of https://github.com/tomjaguarpaw/haskell-opaleye
# Tracked in: https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/317
haskell-opaleye = { url = "github:garganscript/haskell-opaleye/tsquery-fixes"; flake = false; };
#haskell-opaleye = { url = "github:garganscript/haskell-opaleye/tsquery-fixes"; flake = false; };
#haskell-opaleye = { url = "github:tomjaguarpaw/haskell-opaleye?ref=version_0.9.6.1"; flake = false; };
opaleye-textsearch = { url = "git+https://gitlab.iscpif.fr/gargantext/opaleye-textsearch.git"; flake = false; };
# WARNING: using the more-exports branch
servant-job = { url = "github:alpmestan/servant-job/more-exports"; flake = false; };
......@@ -175,7 +182,8 @@
"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/adinapoli/boolexpr.git" = inputs.boolexpr;
#"https://github.com/adinapoli/boolexpr.git" = inputs.boolexpr;
"https://github.com/boolexpr/boolexpr.git" = inputs.boolexpr;
"https://github.com/adinapoli/duckling.git" = inputs.duckling;
"https://github.com/adinapoli/llvm-hs.git" = inputs.llvm-hs;
"https://github.com/adinapoli/text16-compat.git" = inputs.text16-compat;
......@@ -187,7 +195,8 @@
"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://github.com/garganscript/haskell-opaleye.git" = inputs.haskell-opaleye;
#"https://github.com/garganscript/haskell-opaleye.git" = inputs.haskell-opaleye;
"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;
......@@ -210,7 +219,7 @@
# ===================================
"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/haskell-gargantext-prelude/d4f9bee483d41bbdf8ab4e09efb5a5a8216edff4" = removePackageYaml inputs.gargantext-prelude;
"https://gitlab.iscpif.fr/gargantext/crawlers/istex.git/c0a08d62c40a169b7934ceb7cb12c39952160e7a" = removePackageYaml inputs.crawlerISTEX;
"https://github.com/alpmestan/accelerate-arithmetic.git/a110807651036ca2228a76507ee35bbf7aedf87a" = pkgs.applyPatches {
name = "accelerate-arithmetic-patched";
......@@ -334,7 +343,9 @@
# 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" {
(
let
cabal-install = project.tool "cabal" {
version = "latest";
#inherit index-state;
modules = [
......@@ -361,7 +372,8 @@
"$out"/bin/cabal \
--add-flags --project-file=cabal.project.flake
'';
})
}
)
# Provide HLS because it is tighly coupled to the GHC version in use.
# TODO: uncomment when in public binary caches.
......@@ -392,7 +404,8 @@
};
projectFlake = project.flake { };
in {
in
{
legacyPackages = pkgs // {
# For exploring the project:
# $ nix --extra-experimental-features 'flakes repl-flake' repl .
......@@ -461,9 +474,10 @@
projectClosure = project.appendModule {
# haskell.nix's applyComponents filters-out non-planned components.
# Hence enable planned for all components of the project's Haskell closure.
modules = [ { planned = true; } ];
modules = [{ planned = true; }];
};
testPackages = lib.mapAttrs (name: package:
testPackages = lib.mapAttrs
(name: package:
let
# Packages for which a plan cannot be computed
# even with jailbreaking .cabal's constraints.
......@@ -527,7 +541,8 @@
# and source-repository-package.
if projectClosure.hsPkgs.${name}.isLocal
then projectClosure.hsPkgs.${name}
else pkgs.haskell-nix.hackage-package {
else
pkgs.haskell-nix.hackage-package {
name = package.identifier.name;
version = package.identifier.version;
revision = package.identifier.revision or "default";
......@@ -552,10 +567,13 @@
inherit (rev) sha256;
};
revSuffix = lib.optionalString (rev.revNum > 0) "-r${toString rev.revNum}";
in lib.mkOverride 1000 (pkgs.runCommand "${name}-${version}${revSuffix}-src" {
in
lib.mkOverride 1000 (pkgs.runCommand "${name}-${version}${revSuffix}-src"
{
# Avoid readDir and readFile IFD functions looking for these project files in the hackage source
passthru.lookForCabalProject = false;
} (''
}
(''
tmp=$(mktemp -d)
cd $tmp
tar xzf ${tarball}
......@@ -574,7 +592,8 @@
);
}
else null
) projectClosure.hsPkgs;
)
projectClosure.hsPkgs;
in
haskellLib.mkFlakeChecks (haskellLib.collectChecks' testPackages)
);
......
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