Drop obsolete ghcjs-8.4.x code.

The 8.4.x version of ghcjs hasn't compiled successfully
in ages, so I reckon it's unused. The even older code
in pkgs/development/compilers/ghcjs is unused entirely;
it's not even referenced in Nixpkgs.
This commit is contained in:
Peter Simons 2019-09-30 12:48:24 +02:00
parent b443d2cd66
commit 6966609104
7 changed files with 0 additions and 444 deletions

View file

@ -1,9 +0,0 @@
{ haskellLib }:
let inherit (haskellLib) dontCheck doJailbreak;
in self: super: {
haddock-library-ghcjs = doJailbreak (dontCheck super.haddock-library-ghcjs);
haddock-api-ghcjs = doJailbreak super.haddock-api-ghcjs;
template-haskell-ghcjs = doJailbreak super.template-haskell-ghcjs;
}

View file

@ -1,6 +0,0 @@
{
"url": "https://github.com/ghcjs/ghcjs",
"rev": "81bf5f31dabaa711aab234cb119eb9c998ccb129",
"sha256": "1bgnc71kjqicqv2xq8p70nck600yi2p7g4k9r1jclv21ib7i5hmx",
"fetchSubmodules": true
}

View file

@ -1,176 +0,0 @@
{ callPackage, configuredSrc }:
{
ghcjs = callPackage
({ mkDerivation, aeson, array, attoparsec, base, base16-bytestring
, base64-bytestring, binary, bytestring, Cabal, containers
, cryptohash, data-default, deepseq, directory, executable-path
, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths, ghci-ghcjs
, ghcjs-th, haddock-api-ghcjs, hashable, haskell-src-exts
, haskell-src-meta, http-types, HUnit, lens, lifted-base, mtl
, network, optparse-applicative, parallel, parsec, process, random
, regex-posix, safe, shelly, split, stdenv, stringsearch, syb
, system-fileio, system-filepath, tar, template-haskell
, template-haskell-ghcjs, terminfo, test-framework
, test-framework-hunit, text, time, transformers
, transformers-compat, unix, unix-compat, unordered-containers
, vector, wai, wai-app-static, wai-extra, wai-websockets, warp
, webdriver, websockets, wl-pprint-text, yaml
}:
mkDerivation {
pname = "ghcjs";
version = "8.4.0.1";
src = configuredSrc + /.;
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
setupHaskellDepends = [
base Cabal containers directory filepath process template-haskell
transformers
];
libraryHaskellDepends = [
aeson array attoparsec base base16-bytestring base64-bytestring
binary bytestring Cabal containers cryptohash data-default deepseq
directory filepath ghc-api-ghcjs ghc-boot ghc-paths ghci-ghcjs
ghcjs-th hashable haskell-src-exts haskell-src-meta lens mtl
optparse-applicative parallel parsec process regex-posix safe split
stringsearch syb template-haskell template-haskell-ghcjs text time
transformers unordered-containers vector wl-pprint-text yaml
];
executableHaskellDepends = [
aeson base binary bytestring Cabal containers directory
executable-path filepath ghc-api-ghcjs ghc-boot haddock-api-ghcjs
lens mtl optparse-applicative process shelly system-fileio
system-filepath tar terminfo text time transformers
transformers-compat unix unix-compat unordered-containers vector
yaml
];
testHaskellDepends = [
aeson base bytestring data-default deepseq directory http-types
HUnit lens lifted-base network optparse-applicative process random
shelly system-fileio system-filepath test-framework
test-framework-hunit text time transformers unordered-containers
wai wai-app-static wai-extra wai-websockets warp webdriver
websockets yaml
];
description = "Haskell to JavaScript compiler";
license = stdenv.lib.licenses.mit;
}) {};
ghc-api-ghcjs = callPackage
({ mkDerivation, array, base, binary, bytestring, containers
, deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghci-ghcjs
, hpc, process, stdenv, template-haskell-ghcjs, terminfo, time
, transformers, unix
}:
mkDerivation {
pname = "ghc-api-ghcjs";
version = "8.4.0";
src = configuredSrc + /lib/ghc-api-ghcjs;
libraryHaskellDepends = [
array base binary bytestring containers deepseq directory filepath
ghc-boot ghc-boot-th ghci-ghcjs hpc process template-haskell-ghcjs
terminfo time transformers unix
];
homepage = "http://www.haskell.org/ghc/";
description = "The GHC API (customized for GHCJS)";
license = stdenv.lib.licenses.bsd3;
}) {};
ghci-ghcjs = callPackage
({ mkDerivation, array, base, binary, bytestring, containers
, deepseq, filepath, ghc-boot, ghc-boot-th, stdenv
, template-haskell-ghcjs, transformers, unix
}:
mkDerivation {
pname = "ghci-ghcjs";
version = "8.4.0";
src = configuredSrc + /lib/ghci-ghcjs;
libraryHaskellDepends = [
array base binary bytestring containers deepseq filepath ghc-boot
ghc-boot-th template-haskell-ghcjs transformers unix
];
description = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
license = stdenv.lib.licenses.bsd3;
}) {};
ghcjs-th = callPackage
({ mkDerivation, base, binary, bytestring, containers, ghc-prim
, ghci-ghcjs, stdenv, template-haskell-ghcjs
}:
mkDerivation {
pname = "ghcjs-th";
version = "0.1.0.0";
src = configuredSrc + /lib/ghcjs-th;
libraryHaskellDepends = [
base binary bytestring containers ghc-prim ghci-ghcjs
template-haskell-ghcjs
];
homepage = "https://github.com/ghcjs";
license = stdenv.lib.licenses.mit;
}) {};
haddock-api-ghcjs = callPackage
({ mkDerivation, array, base, bytestring, Cabal, containers, deepseq
, directory, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths
, haddock-library-ghcjs, hspec, hspec-discover, QuickCheck, stdenv
, transformers, xhtml
}:
mkDerivation {
pname = "haddock-api-ghcjs";
version = "2.20.0";
src = configuredSrc + /lib/haddock-api-ghcjs;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
array base bytestring Cabal containers deepseq directory filepath
ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs transformers
xhtml
];
testHaskellDepends = [
array base bytestring Cabal containers deepseq directory filepath
ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs hspec
QuickCheck transformers xhtml
];
testToolDepends = [ hspec-discover ];
homepage = "http://www.haskell.org/haddock/";
description = "A documentation-generation tool for Haskell libraries";
license = stdenv.lib.licenses.bsd3;
}) {};
haddock-library-ghcjs = callPackage
({ mkDerivation, base, base-compat, bytestring, containers, deepseq
, directory, filepath, haddock-library, hspec, hspec-discover
, optparse-applicative, QuickCheck, stdenv, transformers, tree-diff
}:
mkDerivation {
pname = "haddock-library-ghcjs";
version = "1.6.0";
src = configuredSrc + /lib/haddock-library-ghcjs;
libraryHaskellDepends = [
base bytestring containers deepseq transformers
];
testHaskellDepends = [
base base-compat bytestring containers deepseq directory filepath
haddock-library hspec optparse-applicative QuickCheck transformers
tree-diff
];
testToolDepends = [ hspec-discover ];
doHaddock = false;
homepage = "http://www.haskell.org/haddock/";
description = "Library exposing some functionality of Haddock";
license = stdenv.lib.licenses.bsd3;
}) {};
template-haskell-ghcjs = callPackage
({ mkDerivation, base, ghc-boot-th, pretty, stdenv }:
mkDerivation {
pname = "template-haskell-ghcjs";
version = "2.13.0.0";
src = configuredSrc + /lib/template-haskell-ghcjs;
libraryHaskellDepends = [ base ghc-boot-th pretty ];
description = "Support library for Template Haskell (customized for GHCJS)";
license = stdenv.lib.licenses.bsd3;
}) {};
}

View file

@ -1,161 +0,0 @@
{ mkDerivation
, lib
, broken ? false
, test-framework
, test-framework-hunit
, data-default
, ghc-paths
, haskell-src-exts
, haskell-src-meta
, optparse-applicative
, system-fileio
, system-filepath
, text-binary
, unordered-containers
, cabal-install
, wl-pprint-text
, base16-bytestring
, executable-path
, transformers-compat
, haddock-api
, regex-posix
, bootPkgs, gmp
, runCommand
, nodejs, stdenv, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
, time
, zlib, aeson, attoparsec, bzlib, hashable
, lens
, parallel, safe, shelly, split, stringsearch, syb
, tar, terminfo
, vector, yaml
, alex, happy, git, gnumake, autoconf, patch
, automake, libtool
, cryptohash
, haddock, hspec, xhtml, pkgs
, coreutils
, libiconv
, version
, ghcjsSrc
, ghcjsBootSrc
, ghcjsBoot ? import ./ghcjs-boot.nix {
inherit runCommand;
src = ghcjsBootSrc;
}
, shims
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
# It can be generated with the command:
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/^\([^_]*\)\(.*\)$/ \"\1\"/'"
, stage1Packages
, stage2 ? import ./stage2.nix
, patches
# used for resolving compiler plugins
, ghcLibdir ? null
}:
let
inherit (bootPkgs) ghc;
in mkDerivation ({
pname = "ghcjs";
inherit version;
src = ghcjsSrc;
isLibrary = true;
isExecutable = true;
jailbreak = true;
doHaddock = false;
doCheck = false;
buildDepends = [
filepath HTTP mtl network random stm time zlib aeson attoparsec
bzlib data-default ghc-paths hashable haskell-src-exts haskell-src-meta
lens optparse-applicative parallel safe shelly split
stringsearch syb system-fileio system-filepath tar terminfo text-binary
unordered-containers vector wl-pprint-text yaml
alex happy git gnumake autoconf automake libtool patch gmp
base16-bytestring cryptohash executable-path haddock-api
transformers-compat QuickCheck haddock hspec xhtml
regex-posix libiconv
];
buildTools = [ nodejs git ];
testDepends = [
HUnit test-framework test-framework-hunit
];
inherit patches;
postPatch = ''
substituteInPlace Setup.hs \
--replace "/usr/bin/env" "${coreutils}/bin/env"
substituteInPlace src/Compiler/Info.hs \
--replace "@PREFIX@" "$out" \
--replace "@VERSION@" "${version}"
substituteInPlace src-bin/Boot.hs \
--replace "@PREFIX@" "$out" \
--replace "@CC@" "${stdenv.cc}/bin/cc"
'';
preBuild = ''
export HOME="$TMP"
local topDir=$out/lib/ghcjs-${version}
mkdir -p $topDir
cp -r ${ghcjsBoot} $topDir/ghcjs-boot
chmod -R u+w $topDir/ghcjs-boot
cp -r ${shims} $topDir/shims
chmod -R u+w $topDir/shims
# Make the patches be relative their corresponding package's directory.
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
for patch in "$topDir/ghcjs-boot/patches/"*.patch; do
echo "fixing patch: $patch"
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
done
'';
# We build with --quick so we can build stage 2 packages separately.
# This is necessary due to: https://github.com/haskell/cabal/commit/af19fb2c2d231d8deff1cb24164a2bf7efb8905a
# Cabal otherwise fails to build: http://hydra.nixos.org/build/31824079/nixlog/1/raw
postInstall = ''
PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp.out}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
--dev \
--quick \
--with-cabal ${cabal-install}/bin/cabal \
--with-gmp-includes ${gmp.dev}/include \
--with-gmp-libraries ${gmp.out}/lib
'' + lib.optionalString (ghcLibdir != null) ''
printf '%s' '${ghcLibdir}' > "$out/lib/ghcjs-${version}/ghc_libdir"
'';
passthru = {
inherit bootPkgs;
ghcVersion = ghc.version;
isCross = true;
isGhcjs = true;
inherit nodejs ghcjsBoot;
socket-io = pkgs.nodePackages."socket.io";
haskellCompilerName = "ghcjs-${version}";
# let us assume ghcjs is never actually cross compiled
targetPrefix = "";
enableShared = true;
inherit stage1Packages;
mkStage2 = stage2 {
inherit ghcjsBoot;
};
};
homepage = https://github.com/ghcjs/ghcjs;
description = "A Haskell to JavaScript compiler that uses the GHC API";
license = stdenv.lib.licenses.bsd3;
platforms = ghc.meta.platforms;
maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan dmjio elvishjerricco ];
hydraPlatforms = if broken then [] else ghc.meta.platforms;
inherit broken;
})

View file

@ -1,54 +0,0 @@
#!/usr/bin/env ruby
require 'pathname'
# from boot.yaml in ghcjs/ghcjs
stage2_packages = [
"boot/async",
"boot/aeson",
"boot/attoparsec",
"boot/case-insensitive",
"boot/dlist",
"boot/extensible-exceptions",
"boot/hashable",
"boot/mtl",
"boot/old-time",
"boot/parallel",
"boot/scientific",
"boot/stm",
"boot/syb",
"boot/text",
"boot/unordered-containers",
"boot/vector",
"ghcjs/ghcjs-base",
# not listed under stage2, but needed when "quick booting".
"boot/cabal/Cabal"
]
nixpkgs = File.expand_path("../../../../..", __FILE__)
boot = ARGV[0] || `nix-build #{nixpkgs} -A haskell.packages.ghcjs.ghc.ghcjsBoot`.chomp
out = "".dup
out << "{ ghcjsBoot }: { callPackage }:\n"
out << "\n"
out << "{\n"
stage2_packages.each do |package|
name = Pathname.new(package).basename
nix = `cabal2nix file://#{boot}/#{package} --jailbreak`
nix.sub!(/src =.*?$/, "src = \"${ghcjsBoot}/#{package}\";")
nix.sub!(" doCheck = false;\n", "")
nix.sub!("libraryHaskellDepends", "doCheck = false;\n libraryHaskellDepends")
# cabal2nix somehow generates the deps for 'text' as if it had selected flag
# 'integer-simple' (despite not passing the flag within the generated
# expression). We want integer-gmp instead.
nix.gsub!(/integer-simple/, "integer-gmp")
nix = nix.split("\n").join("\n ")
out << " #{name} = callPackage\n"
out << " (#{nix}) {};\n"
end
out << "}"
puts out

View file

@ -1,25 +0,0 @@
{ runCommand, src }:
# we remove the patches so ghcjs-boot doesn't try to apply them again.
runCommand "${src.name}-patched" {} ''
cp -r ${src} $out
chmod -R +w $out
# Make the patches be relative their corresponding package's directory.
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
for patch in $out/patches/*.patch; do
echo ">> fixing patch: $patch"
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
done
for package in $(cd $out/boot; echo *); do
patch=$out/patches/$package.patch
if [[ -e $patch ]]; then
echo ">> patching package: $package"
pushd $out/boot/$package
patch -p1 < $patch
rm $patch
popd
fi
done
''

View file

@ -7,7 +7,6 @@ let
"ghc863Binary"
"ghc844"
"ghcjs"
"ghcjs84"
"ghcjs86"
"integer-simple"
];
@ -70,12 +69,6 @@ in {
llvmPackages = pkgs.llvmPackages_6;
};
ghcjs = compiler.ghcjs86;
ghcjs84 = callPackage ../development/compilers/ghcjs-ng {
bootPkgs = packages.ghc844;
ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.4/git.json;
stage0 = ../development/compilers/ghcjs-ng/8.4/stage0.nix;
ghcjsDepOverrides = callPackage ../development/compilers/ghcjs-ng/8.4/dep-overrides.nix {};
};
ghcjs86 = callPackage ../development/compilers/ghcjs-ng {
bootPkgs = packages.ghc865;
ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.6/git.json;
@ -133,12 +126,6 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
};
ghcjs = packages.ghcjs86;
ghcjs84 = callPackage ../development/haskell-modules rec {
buildHaskellPackages = ghc.bootPkgs;
ghc = bh.compiler.ghcjs84;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.4.x.nix { };
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
};
ghcjs86 = callPackage ../development/haskell-modules rec {
buildHaskellPackages = ghc.bootPkgs;
ghc = bh.compiler.ghcjs86;