Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
haskell-gargantext
Commits
e7f9cf26
Commit
e7f9cf26
authored
Mar 06, 2024
by
Julien Moutinho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: add support for `haskell.nix`
parent
71548e0b
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2390 additions
and
2 deletions
+2390
-2
.gitignore
.gitignore
+5
-0
flake.lock
flake.lock
+1238
-0
flake.nix
flake.nix
+1059
-0
0001-remove-test-using-removed-realBandedGramian.patch
...ic/0001-remove-test-using-removed-realBandedGramian.patch
+40
-0
0001-fix-GHC-path-to-support-cross-compiling.patch
...s/c2hs/0001-fix-GHC-path-to-support-cross-compiling.patch
+33
-0
graphviz-yy-buf-size.diff
patches/graphviz/graphviz-yy-buf-size.diff
+11
-0
Main.hs
test/drivers/hspec/Main.hs
+4
-2
No files found.
.gitignore
View file @
e7f9cf26
...
@@ -45,3 +45,8 @@ devops/docker/js-cache
...
@@ -45,3 +45,8 @@ devops/docker/js-cache
cabal.project.local
cabal.project.local
gargantext_profile_out.dot
gargantext_profile_out.dot
# Nix
!flake.lock
cabal.project.flake
nix/cache/roots
flake.lock
0 → 100644
View file @
e7f9cf26
This diff is collapsed.
Click to expand it.
flake.nix
0 → 100644
View file @
e7f9cf26
This diff is collapsed.
Click to expand it.
patches/accelerate-arithmetic/0001-remove-test-using-removed-realBandedGramian.patch
0 → 100644
View file @
e7f9cf26
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
patches/c2hs/0001-fix-GHC-path-to-support-cross-compiling.patch
0 → 100644
View file @
e7f9cf26
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
patches/graphviz/graphviz-yy-buf-size.diff
0 → 100644
View file @
e7f9cf26
--- 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
test/drivers/hspec/Main.hs
View file @
e7f9cf26
...
@@ -18,8 +18,10 @@ import qualified Test.Database.Operations as DB
...
@@ -18,8 +18,10 @@ import qualified Test.Database.Operations as DB
startCoreNLPServer
::
IO
ProcessHandle
startCoreNLPServer
::
IO
ProcessHandle
startCoreNLPServer
=
do
startCoreNLPServer
=
do
devNull
<-
openFile
"/dev/null"
WriteMode
devNull
<-
openFile
"/dev/null"
WriteMode
let
p
=
proc
"./startServer.sh"
[]
-- Make the CoreNLP server configurable by an envvar, eg. set by nix develop
(
_
,
_
,
_
,
hdl
)
<-
(
createProcess
$
p
{
cwd
=
Just
"devops/coreNLP/stanford-corenlp-current"
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
,
delegate_ctlc
=
True
,
create_group
=
True
,
create_group
=
True
,
std_out
=
UseHandle
devNull
,
std_out
=
UseHandle
devNull
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment