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
97b3e8e3
Commit
97b3e8e3
authored
Oct 22, 2019
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release-8.8.nix: simplify for latest NixOS 19.09 release
parent
c13b973a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
100 deletions
+2
-100
release-8.8.nix
release-8.8.nix
+2
-100
No files found.
release-8.8.nix
View file @
97b3e8e3
let
nixpkgs-src
=
builtins
.
fetchTarball
{
url
=
"https://github.com/NixOS/nixpkgs/tarball/4f31c024d1e40b8e19badc832c8a99ce19143a5b"
;
sha256
=
"0gqkf7spy60y4bycy3f3fg99wv77q7mhkg8c1a4s3gw51nakwvq8"
;
};
in
{
compiler
?
"ghc881"
,
nixpkgs
?
import
nixpkgs-src
{}
,
nixpkgs
?
import
<
nixpkgs
>
{}
,
packages
?
(
_
:
[])
,
pythonPackages
?
(
_
:
[])
,
rtsopts
?
"-M3g -N2"
,
systemPackages
?
(
_
:
[])
}:
let
inherit
(
builtins
)
any
elem
filterSource
listToAttrs
;
lib
=
nixpkgs
.
lib
;
cleanSource
=
name
:
type
:
let
baseName
=
baseNameOf
(
toString
name
);
in
lib
.
cleanSourceFilter
name
type
&&
!
(
(
type
==
"directory"
&&
(
elem
baseName
[
".stack-work"
"dist"
]))
||
any
(
lib
.
flip
lib
.
hasSuffix
baseName
)
[
".hi"
".ipynb"
".nix"
".sock"
".yaml"
".yml"
]
);
ihaskellSourceFilter
=
src
:
name
:
type
:
let
relPath
=
lib
.
removePrefix
(
toString
src
+
"/"
)
(
toString
name
);
in
cleanSource
name
type
&&
(
any
(
lib
.
flip
lib
.
hasPrefix
relPath
)
[
"src"
"main"
"html"
"Setup.hs"
"ihaskell.cabal"
"LICENSE"
]);
ihaskell-src
=
filterSource
(
ihaskellSourceFilter
./.
)
./.
;
ipython-kernel-src
=
filterSource
cleanSource
./ipython-kernel
;
ghc-parser-src
=
filterSource
cleanSource
./ghc-parser
;
ihaskell-display-src
=
filterSource
cleanSource
./ihaskell-display
;
displays
=
self
:
listToAttrs
(
map
(
display
:
{
name
=
"ihaskell-
${
display
}
"
;
value
=
self
.
callCabal2nix
display
"
${
ihaskell-display-src
}
/ihaskell-
${
display
}
"
{};
})
[
"aeson"
"blaze"
"charts"
"diagrams"
"gnuplot"
"graphviz"
"hatex"
"juicypixels"
"magic"
"plot"
"rlangqq"
"static-canvas"
"widgets"
]);
haskellPackages
=
nixpkgs
.
haskell
.
packages
.
"
${
compiler
}
"
.
override
(
old
:
{
overrides
=
nixpkgs
.
lib
.
composeExtensions
(
old
.
overrides
or
(
_
:
_
:
{}))
(
self
:
super
:
{
ihaskell
=
nixpkgs
.
haskell
.
lib
.
overrideCabal
(
self
.
callCabal2nix
"ihaskell"
ihaskell-src
{})
(
_drv
:
{
preCheck
=
''
export HOME=$(
${
nixpkgs
.
pkgs
.
coreutils
}
/bin/mktemp -d)
export PATH=$PWD/dist/build/ihaskell:$PATH
export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH
''
;
configureFlags
=
(
_drv
.
configureFlags
or
[])
++
[
# otherwise the tests are agonisingly slow and the kernel times out
"--enable-executable-dynamic"
];
doHaddock
=
false
;
});
ghc-parser
=
self
.
callCabal2nix
"ghc-parser"
ghc-parser-src
{};
ipython-kernel
=
self
.
callCabal2nix
"ipython-kernel"
ipython-kernel-src
{};
inline-r
=
nixpkgs
.
haskell
.
lib
.
dontCheck
super
.
inline-r
;
static-canvas
=
nixpkgs
.
haskell
.
lib
.
doJailbreak
super
.
static-canvas
;
system-fileio
=
nixpkgs
.
haskell
.
lib
.
doJailbreak
super
.
system-fileio
;
Chart
=
nixpkgs
.
haskell
.
lib
.
doJailbreak
super
.
Chart
;
Chart-cairo
=
nixpkgs
.
haskell
.
lib
.
doJailbreak
super
.
Chart-cairo
;
}
//
displays
self
);
});
ihaskellEnv
=
haskellPackages
.
ghcWithPackages
(
self
:
[
self
.
ihaskell
]
++
packages
self
);
jupyterlab
=
nixpkgs
.
python3
.
withPackages
(
ps
:
[
ps
.
jupyterlab
]
++
pythonPackages
ps
);
ihaskellWrapperSh
=
nixpkgs
.
writeScriptBin
"ihaskell-wrapper"
''
#!
${
nixpkgs
.
stdenv
.
shell
}
export GHC_PACKAGE_PATH="$(echo
${
ihaskellEnv
}
/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
export PATH="
${
nixpkgs
.
stdenv
.
lib
.
makeBinPath
([
ihaskellEnv
jupyterlab
]
++
systemPackages
nixpkgs
)
}
''$
{PATH:+:}$PATH"
exec
${
ihaskellEnv
}
/bin/ihaskell "$@"
''
;
ihaskellJupyterCmdSh
=
cmd
:
extraArgs
:
nixpkgs
.
writeScriptBin
"ihaskell-
${
cmd
}
"
''
#!
${
nixpkgs
.
stdenv
.
shell
}
export GHC_PACKAGE_PATH="$(echo
${
ihaskellEnv
}
/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
export PATH="
${
nixpkgs
.
stdenv
.
lib
.
makeBinPath
([
ihaskellEnv
jupyterlab
]
++
systemPackages
nixpkgs
)
}
''$
{PATH:+:}$PATH"
${
ihaskellEnv
}
/bin/ihaskell install \
-l $(
${
ihaskellEnv
}
/bin/ghc --print-libdir) \
--use-rtsopts="
${
rtsopts
}
" \
&&
${
jupyterlab
}
/bin/jupyter
${
cmd
}
${
extraArgs
}
"$@"
''
;
in
nixpkgs
.
buildEnv
{
name
=
"ihaskell-with-packages"
;
buildInputs
=
[
nixpkgs
.
makeWrapper
];
paths
=
[
ihaskellEnv
jupyterlab
];
postBuild
=
''
ln -s
${
ihaskellJupyterCmdSh
"lab"
""
}
/bin/ihaskell-lab $out/bin/
ln -s
${
ihaskellJupyterCmdSh
"notebook"
""
}
/bin/ihaskell-notebook $out/bin/
ln -s
${
ihaskellJupyterCmdSh
"nbconvert"
""
}
/bin/ihaskell-nbconvert $out/bin/
ln -s
${
ihaskellJupyterCmdSh
"console"
"--kernel=haskell"
}
/bin/ihaskell-console $out/bin/
for prg in $out/bin"/"*;do
if [[ -f $prg && -x $prg ]]; then
wrapProgram $prg --set PYTHONPATH "$(echo
${
jupyterlab
}
/lib/*/site-packages)"
fi
done
''
;
passthru
=
{
inherit
ihaskellEnv
;
inherit
jupyterlab
;
inherit
ihaskellJupyterCmdSh
;
inherit
ihaskellWrapperSh
;
ihaskellJsFile
=
./.
+
"/html/kernel.js"
;
ihaskellLogo64
=
./.
+
"/html/logo-64x64.svg"
;
};
}
import
(
./release.nix
)
{
inherit
compiler
nixpkgs
packages
pythonPackages
rtsopts
systemPackages
;
}
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