diff --git a/mkClojureLib.nix b/mkClojureLib.nix index 877a557..20e667f 100644 --- a/mkClojureLib.nix +++ b/mkClojureLib.nix @@ -27,21 +27,23 @@ in stdenv.mkDerivation { nativeBuildInputs = [ clojure jre ]; buildInputs = (map (x: x.paths) clj-deps.packages); - buildPhase = '' - HOME=$TEMP/home - mkdir -p $HOME - mkdir -p ${target} + buildPhase = let + script = writeShellScript "create-uberjar.sh" '' + HOME=$TEMP/home + mkdir -p $HOME + mkdir -p ${target} - clojure \ - -Scp .:${build-tools-jar}:${classpath} \ - -Sdeps ${builtins.trace build-tools-deps build-tools-deps} \ - -X:build \ - lib-uberjar \ - :project ${group}/${name} \ - :version ${version} \ - :srcs ${concatStringsSep "," src-paths} \ - :target ${target} - ''; + clojure \ + -Scp .:${build-tools-jar}:${classpath} \ + -Sdeps ${builtins.trace build-tools-deps build-tools-deps} \ + -X:build \ + lib-uberjar \ + :project ${group}/${name} \ + :version ${version} \ + :srcs ${concatStringsSep "," src-paths} \ + :target ${target} + ''; + in "${builtins.trace script script}"; installPhase = '' mv ${target}/${name}-${version}-standalone.jar $out