From 3ab38ef086947822fbe2cffea071e1c508811990 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Sun, 18 Feb 2018 19:38:50 +0000 Subject: [PATCH] clojure: 1.9.0.326 -> 1.9.0.273, refactor, closes #35136 --- .../interpreters/clojure/default.nix | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix index 3b071d3afb3a..6a652bde993c 100644 --- a/pkgs/development/interpreters/clojure/default.nix +++ b/pkgs/development/interpreters/clojure/default.nix @@ -1,28 +1,28 @@ { stdenv, fetchurl, jdk, rlwrap, makeWrapper }: -let version = "1.9.0.326"; in - -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "clojure-${version}"; + version = "1.9.0.273"; src = fetchurl { url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; - sha256 = "0sf8gy39iz4jxj2wic1lbdwdwbj90k3awhr0kq76gr1z1dwbj6s9"; + sha256 = "0xmrq3xvr002jgq8m1j0y5ld0rcr49608g3gqxgyxzjqswacglb4"; }; buildInputs = [ makeWrapper ]; + outputs = [ "out" "prefix" ]; + installPhase = '' - pwd - ls -la - mkdir -p $out/libexec $out/bin - cp -f deps.edn example-deps.edn $out - cp -f clojure-tools-${version}.jar $out/libexec - sed -i -e "s@PREFIX@$out@g" clojure - cp -f clj clojure $out/bin - for program in $out/bin/{clojure,clj}; do - wrapProgram $program --suffix PATH : $out/bin:${jdk.jre}/bin:${rlwrap}/bin - done + mkdir -p $prefix/libexec + cp clojure-tools-${version}.jar $prefix/libexec + cp {,example-}deps.edn $prefix + + substituteInPlace clojure --replace PREFIX $prefix + + install -Dt $out/bin clj clojure + wrapProgram $out/bin/clj --suffix PATH ${rlwrap}/bin + wrapProgram $out/bin/clojure --suffix PATH ${jdk}/bin ''; meta = with stdenv.lib; {