leiningen: added package version 1.6.2

svn path=/nixpkgs/trunk/; revision=31716
This commit is contained in:
Yury G. Kudryashov 2012-01-19 20:34:59 +00:00
parent 185a3d13aa
commit d0c8b530e9
4 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -e
source $stdenv/setup
mkdir -pv $out/bin $out/lib
out_bin=$out/bin/lein
cp -v $src $out_bin
cp -v $jarsrc $out/lib
cp -v $clojuresrc $out/lib
patch --verbose $out_bin -p0 < $patches
chmod -v 755 $out_bin
echo "Testing out \"lein version\"..."
$out_bin version
echo "Success."

View File

@ -0,0 +1,36 @@
{stdenv, fetchurl, openjdk}:
stdenv.mkDerivation rec {
pname = "leiningen";
version = "1.6.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://raw.github.com/technomancy/leiningen/stable/bin/lein-pkg";
sha256 = "e177a493ed0c4a7874f1391d5cc72cc1e541e55ed3d6e075feec87b5da6f8277";
};
jarsrc = fetchurl {
url = "https://github.com/downloads/technomancy/leiningen/leiningen-1.6.2-standalone.jar";
sha256 = "e35272556ece82d9a6a54b86266626da1b5f990ff556639dd7dd1025d6ed4226";
};
clojuresrc = fetchurl {
url = "http://build.clojure.org/releases/org/clojure/clojure/1.2.1/clojure-1.2.1.jar";
sha256 = "b38853254a2df9138b2e2c12be0dca3600fa7e2a951fed05fc3ba2d9141a3fb0";
};
patches = [ ./lein.patch ];
builder = ./builder.sh;
propagatedBuildInputs = [ openjdk ];
meta = {
homepage = https://github.com/technomancy/leiningen;
description = "Project automation for Clojure";
license = "EPL";
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -0,0 +1,36 @@
--- lein-pkg 2012-01-09 20:47:44.000000000 -0800
+++ lein-pkg-nix 2012-01-09 20:45:01.000000000 -0800
@@ -70,7 +70,7 @@
LEIN_PLUGIN_PATH="$(echo "$DEV_PLUGINS" | tr \\n :)"
LEIN_USER_PLUGIN_PATH="$(echo "$(unique_user_plugins)" | tr \\n :)"
CLASSPATH="$CLASSPATH:$LEIN_PLUGIN_PATH:$LEIN_USER_PLUGIN_PATH:test/:src/:resources/"
-CLOJURE_JAR="/usr/share/java/clojure-1.2.jar:/usr/share/java/asm3.jar:/usr/share/java/asm3-commons.jar"
+CLOJURE_JAR="$(dirname $0)/../lib/*clojure-1.2.1.jar"
NULL_DEVICE=/dev/null
# apply context specific CLASSPATH entries
@@ -78,23 +78,7 @@
CLASSPATH="`cat .lein-classpath`:$CLASSPATH"
fi
-SHARE_JARS="ant ant-launcher classworlds clojure-1.2 clojure-contrib \
-lucene-memory maven-ant-tasks maven-artifact maven-artifact-manager \
-maven-error-diagnostics maven-model maven-settings maven-project maven-profile \
-maven-repository-metadata plexus-container-default-alpha plexus-interpolation \
-plexus-utils wagon-file wagon-http-lightweight wagon-http-shared wagon-provider-api \
-xml-apis lucene-core lucene-highlighter clucy robert-hooke lancet \
-backport-util-concurrent" # NFI why that last one is necessary
-for JAR in $SHARE_JARS; do
- CLASSPATH="$CLASSPATH":"/usr/share/java/$JAR.jar"
-done
-
-# Do not use installed leiningen jar during self-compilation
-if ! { [ "$1" = "compile" ] &&
- grep -qsE 'defproject leiningen[[:space:]]+"[[:digit:].]+"' \
- project.clj ;}; then
- CLASSPATH="$CLASSPATH":/usr/share/java/leiningen-$LEIN_VERSION.jar
-fi
+CLASSPATH="$CLASSPATH:$(dirname $0)/../lib/*"
if [ $DEBUG ]; then
echo $CLASSPATH

View File

@ -3008,6 +3008,8 @@ let
lcov = callPackage ../development/tools/analysis/lcov { };
leiningen = callPackage ../development/tools/build-managers/leiningen { };
libtool = libtool_2;
libtool_1_5 = callPackage ../development/tools/misc/libtool { };