clojure: 1.9.0.326 -> 1.9.0.273, refactor, closes #35136

This commit is contained in:
Yegor Timoshenko 2018-02-18 19:38:50 +00:00 committed by Herwig Hochleitner
parent a96886863a
commit 3ab38ef086

View File

@ -1,28 +1,28 @@
{ stdenv, fetchurl, jdk, rlwrap, makeWrapper }: { stdenv, fetchurl, jdk, rlwrap, makeWrapper }:
let version = "1.9.0.326"; in stdenv.mkDerivation rec {
stdenv.mkDerivation {
name = "clojure-${version}"; name = "clojure-${version}";
version = "1.9.0.273";
src = fetchurl { src = fetchurl {
url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz";
sha256 = "0sf8gy39iz4jxj2wic1lbdwdwbj90k3awhr0kq76gr1z1dwbj6s9"; sha256 = "0xmrq3xvr002jgq8m1j0y5ld0rcr49608g3gqxgyxzjqswacglb4";
}; };
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
outputs = [ "out" "prefix" ];
installPhase = '' installPhase = ''
pwd mkdir -p $prefix/libexec
ls -la cp clojure-tools-${version}.jar $prefix/libexec
mkdir -p $out/libexec $out/bin cp {,example-}deps.edn $prefix
cp -f deps.edn example-deps.edn $out
cp -f clojure-tools-${version}.jar $out/libexec substituteInPlace clojure --replace PREFIX $prefix
sed -i -e "s@PREFIX@$out@g" clojure
cp -f clj clojure $out/bin install -Dt $out/bin clj clojure
for program in $out/bin/{clojure,clj}; do wrapProgram $out/bin/clj --suffix PATH ${rlwrap}/bin
wrapProgram $program --suffix PATH : $out/bin:${jdk.jre}/bin:${rlwrap}/bin wrapProgram $out/bin/clojure --suffix PATH ${jdk}/bin
done
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {