gap: install libgap

There are some starts of a `make install`, but nothing complete yet.
Upstream now ships a `libgap` as a replacement of the custom one used by
sagemath.
This commit is contained in:
Timo Kaufmann 2019-01-16 23:42:15 +01:00
parent 6bbd0596dd
commit bb173ec8e3
2 changed files with 25 additions and 2 deletions

View File

@ -107,7 +107,16 @@ stdenv.mkDerivation rec {
popd
'';
installPhase = ''
installTargets = [
"install-libgap"
"install-headers"
];
# full `make install` is not yet implemented, just for libgap and headers
postInstall = ''
# Install config.h, which is not currently handled by `make install-headers`
cp gen/config.h "$out/include/gap"
mkdir -p "$out/bin" "$out/share/gap/"
mkdir -p "$out/share/gap"

View File

@ -10806,17 +10806,31 @@ in
libgadu = callPackage ../development/libraries/libgadu { };
# Deprecated since gap itself now ships with a library component. This is
# still necessary for sage 8.5 but will be removed once we switch to sage
# 8.6.
gap-libgap-compatible = let
version = "4r8p6";
pkgVer = "2016_11_12-14_25";
in
(gap.override { keepAllPackages = false; }).overrideAttrs (oldAttrs: {
(gap.override { packageSet = "minimal"; }).overrideAttrs (oldAttrs: {
name = "libgap-${oldAttrs.pname}-${version}";
inherit version;
src = fetchurl {
url = "https://www.gap-system.org/pub/gap/gap48/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
sha256 = "19n2p1mdg33s2x9rs51iak7rgndc1cwr56jyqnah0g1ydgg1yh6b";
};
# libgap targets not yet available for 4r8p6
installPhase = ''
mkdir -p "$out/bin" "$out/share/gap/"
mkdir -p "$out/share/gap"
echo "Copying files to target directory"
cp -ar . "$out/share/gap/build-dir"
makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
--set GAP_DIR $out/share/gap/build-dir
'';
patches = [
# don't install any packages by default (needed for interop with libgap, probably obsolete with 4r10
(fetchpatch {