From da554a2ba0b93e957df2cf5416023fdf1bb74956 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 31 May 2022 14:16:13 -0700 Subject: [PATCH] ...Why is it working now? --- build.tools.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/build.tools.nix b/build.tools.nix index 1aa25b8..821779c 100644 --- a/build.tools.nix +++ b/build.tools.nix @@ -1,5 +1,5 @@ -{ lib, stdenv, build-tools-src, clojure, callPackage, writeText, gitignoreSource -, jre, ... }: +{ lib, stdenv, build-tools-src, clojure, callPackage, writeText +, writeShellScript, gitignoreSource, jre, ... }: with lib; let @@ -38,15 +38,17 @@ in stdenv.mkDerivation { src = gitignoreSource "${build-tools-src}/src/main/clojure"; nativeBuildInputs = [ jre ]; buildInputs = map (x: x.paths) cljdeps.packages; - buildPhase = '' - mkdir classes - HOME=. - cp ${./src}/build.clj . - ${concatStringsSep "\n" (map extract-jar dep-jars)} - ${concatStringsSep "\n" - (map (java-compile tools-classpath) (all-namespaces ++ [ "'build" ]))} - jar cmf ${manifest} ./out.jar -C . cljs cognitect com javax mozilla plugin.xml about.html clojure cognitect_aws_http.edn data_readers.cljc licenses org - ''; + buildPhase = let + build-script = writeShellScript "build.sh" '' + mkdir classes + HOME=. + cp ${./src}/build.clj . + ${concatStringsSep "\n" (map extract-jar dep-jars)} + ${concatStringsSep "\n" + (map (java-compile tools-classpath) (all-namespaces ++ [ "'build" ]))} + jar cmf ${manifest} ./out.jar -C . cljs cognitect com javax mozilla plugin.xml about.html clojure cognitect_aws_http.edn data_readers.cljc licenses org + ''; + in "${build-script}"; installPhase = '' cp out.jar $out