Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
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
gargantext
gargantext-ihaskell
Commits
81a70212
Commit
81a70212
authored
Jul 09, 2017
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nix derivations
parent
fd928bef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
1 deletion
+71
-1
.gitignore
.gitignore
+2
-1
release.nix
release.nix
+69
-0
No files found.
.gitignore
View file @
81a70212
...
...
@@ -22,4 +22,5 @@ cabal.sandbox.config
.tmp1
.tmp2
.tmp3
.stack-work
\ No newline at end of file
.stack-work
result
release.nix
0 → 100644
View file @
81a70212
{
packages
?
(
_
:
[]),
systemPackages
?
(
_
:
[])
}:
let
pkgs
=
import
<
nixpkgs
>
{};
src
=
pkgs
.
lib
.
cleanSource
./.
;
displays
=
self
:
builtins
.
listToAttrs
(
map
(
display
:
{
name
=
display
;
value
=
self
.
callCabal2nix
display
"
${
src
}
/ihaskell-display/
${
display
}
"
{};
})
[
"ihaskell-aeson"
"ihaskell-blaze"
"ihaskell-charts"
"ihaskell-diagrams"
"ihaskell-gnuplot"
"ihaskell-hatex"
"ihaskell-juicypixels"
"ihaskell-magic"
"ihaskell-plot"
"ihaskell-rlangqq"
"ihaskell-static-canvas"
"ihaskell-widgets"
]);
dontCheck
=
pkgs
.
haskell
.
lib
.
dontCheck
;
haskellPackages
=
pkgs
.
haskellPackages
.
override
{
overrides
=
self
:
super
:
{
ihaskell
=
dontCheck
(
self
.
callCabal2nix
"ihaskell"
src
{
bin-package-db
=
null
;
});
ghc-parser
=
self
.
callCabal2nix
"ghc-parser"
"
${
src
}
/ghc-parser"
{};
ipython-kernel
=
self
.
callCabal2nix
"ghc-parser"
"
${
src
}
/ipython-kernel"
{};
}
//
displays
self
;
};
ihaskell
=
haskellPackages
.
ihaskell
;
ihaskellEnv
=
haskellPackages
.
ghcWithPackages
(
self
:
with
self
;
[
ihaskell
ihaskell-aeson
ihaskell-blaze
ihaskell-charts
ihaskell-diagrams
ihaskell-gnuplot
ihaskell-hatex
ihaskell-juicypixels
ihaskell-magic
ihaskell-plot
# ihaskell-rlangqq
ihaskell-static-canvas
# ihaskell-widgets
]
++
packages
self
);
jupyter
=
pkgs
.
python3
.
buildEnv
.
override
{
extraLibs
=
with
pkgs
.
python3Packages
;
[
ipython
ipykernel
jupyter_client
notebook
];
};
ihaskellSh
=
pkgs
.
writeScriptBin
"ihaskell-notebook"
''
#!
${
pkgs
.
stdenv
.
shell
}
export GHC_PACKAGE_PATH="$(echo
${
ihaskellEnv
}
/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
export PATH="
${
pkgs
.
stdenv
.
lib
.
makeBinPath
([
ihaskell
ihaskellEnv
jupyter
]
++
systemPackages
pkgs
)
}
"
${
ihaskell
}
/bin/ihaskell install -l $(
${
ihaskellEnv
}
/bin/ghc --print-libdir) &&
${
jupyter
}
/bin/jupyter notebook
''
;
profile
=
"
${
ihaskell
.
pname
}
-
${
ihaskell
.
version
}
/profile/profile.tar"
;
in
pkgs
.
buildEnv
{
name
=
"ihaskell-with-packages"
;
paths
=
[
ihaskellEnv
jupyter
];
postBuild
=
''
. "
${
pkgs
.
makeWrapper
}
/nix-support/setup-hook"
ln -s
${
ihaskellSh
}
/bin/ihaskell-notebook $out/bin/
for prg in $out/bin"/"*;do
wrapProgram $prg --set PYTHONPATH "$(echo
${
jupyter
}
/lib/*/site-packages)"
done
''
;
}
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