From e6d3a4e7d1e2262c0b28dac67538d253cc4e719e Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 23 Jan 2016 15:32:58 -0800 Subject: [PATCH] ghcjs: Remove wrapper, which seems long unused --- pkgs/development/compilers/ghcjs/wrapper.nix | 77 -------------------- 1 file changed, 77 deletions(-) delete mode 100644 pkgs/development/compilers/ghcjs/wrapper.nix diff --git a/pkgs/development/compilers/ghcjs/wrapper.nix b/pkgs/development/compilers/ghcjs/wrapper.nix deleted file mode 100644 index 751b7d9a7de7..000000000000 --- a/pkgs/development/compilers/ghcjs/wrapper.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ stdenv, ghc, makeWrapper, coreutils, writeScript }: -let - ghcjs = ghc; - packageDBFlag = "-package-db"; - - GHCGetPackages = writeScript "ghc-get-packages.sh" '' - #! ${stdenv.shell} - # Usage: - # $1: version of GHC - # $2: invocation path of GHC - # $3: prefix - version="$1" - if test -z "$3"; then - prefix="${packageDBFlag} " - else - prefix="$3" - fi - PATH="$PATH:$2" - IFS=":" - for p in $PATH; do - for i in "$p/../share/ghcjs/$system-${ghcjs.version}-${ghcjs.ghc.version}"{,/lib,/ghcjs}"/package.conf.d" "$p/../lib/ghcjs-${ghc.version}_ghc-${ghc.ghc.version}/package.conf.d" ; do - # output takes place here - test -f $i/package.cache && echo -n " $prefix$i" - done - done - ''; - - GHCPackages = writeScript "ghc-packages.sh" '' - #! ${stdenv.shell} -e - declare -A GHC_PACKAGES_HASH # using bash4 hashs to get uniq paths - - for arg in $(${GHCGetPackages} ${ghcjs.version} "$(dirname $0)"); do # Why is ghc.version passed in from here instead of captured in the other script directly? - case "$arg" in - ${packageDBFlag}) ;; - *) - CANONICALIZED="$(${coreutils}/bin/readlink -f -- "$arg")" - GHC_PACKAGES_HASH["$CANONICALIZED"]= ;; - esac - done - - for path in ''${!GHC_PACKAGES_HASH[@]}; do - echo -n "$path:" - done - ''; -in -stdenv.mkDerivation { - name = "ghcjs-ghc${ghcjs.ghc.version}-${ghcjs.version}-wrapper"; - - buildInputs = [makeWrapper]; - propagatedBuildInputs = [ghcjs]; - - unpackPhase = "true"; - installPhase = '' - runHook preInstall - - mkdir -p $out/bin - for prg in ghcjs ; do - makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghcjs.version} \"\$(dirname \$0)\")" - done - for prg in ghcjs-pkg ; do - makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghcjs.version} \"\$(dirname \$0)\" -${packageDBFlag}=)" - done - - mkdir -p $out/nix-support - ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages - - mkdir -p $out/share/doc - ln -s $ghc/lib $out/lib - ln -s $ghc/share/doc/ghc $out/share/doc/ghc-${ghcjs.version} - - runHook postInstall - ''; - - ghc = ghcjs; - inherit GHCGetPackages GHCPackages; - inherit (ghcjs) meta version; -}