diff options
-rw-r--r-- | pkgs/development/interpreters/spidermonkey/builder.sh | 31 | ||||
-rw-r--r-- | pkgs/development/interpreters/spidermonkey/default.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
3 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/spidermonkey/builder.sh b/pkgs/development/interpreters/spidermonkey/builder.sh new file mode 100644 index 0000000000000..b0cfe6c9ed624 --- /dev/null +++ b/pkgs/development/interpreters/spidermonkey/builder.sh @@ -0,0 +1,31 @@ +source $stdenv/setup + +set -e +set -x + +tar zxf $src +cd js/src + + +# Extend Makefile to dump some of its variables we want to know. +cat >> Makefile.ref <<EOF +printlibraries : + @echo \$(LIBRARY) \$(SHARED_LIBRARY) > LIBRARIES + +printprograms : + @echo \$(PROGRAM) > PROGRAMS +EOF + +MAKE="make -f Makefile.ref" + +$MAKE printlibraries +$MAKE printprograms +$MAKE + +ensureDir $out +ensureDir $out/bin +ensureDir $out/lib + +# Install the binaries that have been created. +install $(cat PROGRAMS) $out/bin +install $(cat LIBRARIES) $out/lib diff --git a/pkgs/development/interpreters/spidermonkey/default.nix b/pkgs/development/interpreters/spidermonkey/default.nix new file mode 100644 index 0000000000000..769d384c99816 --- /dev/null +++ b/pkgs/development/interpreters/spidermonkey/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "spidermonkey-1.5"; + src = fetchurl { + url = http://ftp.uni-erlangen.de/pub/mozilla.org/js/js-1.5.tar.gz; + md5 = "863bb6462f4ce535399a7c6276ae6776"; + }; + + builder = ./builder.sh; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 80c7c2e992e9d..28d085a99a41e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -850,6 +850,10 @@ rec { inherit fetchurl stdenv; }; + spidermonkey = (import ../development/interpreters/spidermonkey) { + inherit fetchurl stdenv; + }; + lua4 = (import ../development/interpreters/lua-4) { inherit fetchurl stdenv; }; |