Try an earlier version

This commit is contained in:
niten 2022-06-01 10:18:47 -07:00
parent 31629acbb0
commit ada11faec7
2 changed files with 9 additions and 6 deletions

View File

@ -17,8 +17,10 @@ let
pthru = o: builtins.trace o o; pthru = o: builtins.trace o o;
java-compile = classpath: ns: java-compile = classpath: ns: ''
''java -cp .:${classpath} clojure.main -e "(compile ${ns})"''; echo "building namespace: ${ns}"...
java -cp .:${classpath} clojure.main -e "(compile ${ns})"
'';
head-or-null = lst: if (lst == [ ]) then null else head lst; head-or-null = lst: if (lst == [ ]) then null else head lst;
matches-ext = ext: filename: (builtins.match ".+[.]${ext}$" filename) != null; matches-ext = ext: filename: (builtins.match ".+[.]${ext}$" filename) != null;
strip-ext = ext: filename: strip-ext = ext: filename:
@ -68,7 +70,8 @@ in stdenv.mkDerivation {
cp ${./src}/build.clj . cp ${./src}/build.clj .
${concatStringsSep "\n" (map extract-jar dep-jars)} ${concatStringsSep "\n" (map extract-jar dep-jars)}
${concatStringsSep "\n" ${concatStringsSep "\n"
(map (java-compile tools-classpath) (tools-namespaces ++ [ "'build" ]))} (map (java-compile tools-classpath) tools-namespaces)}
${java-compile "" "'build"}
jar cmf ${manifest} ./out.jar -C . ${ jar cmf ${manifest} ./out.jar -C . ${
concatStringsSep " " [ concatStringsSep " " [
"build" "build"
@ -88,7 +91,7 @@ in stdenv.mkDerivation {
} }
cat /tmp/*.edn cat /tmp/*.edn
''; '';
in "${build-script}"; in pthru "${build-script}";
installPhase = '' installPhase = ''
cp out.jar $out cp out.jar $out

View File

@ -6,7 +6,7 @@
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
clj2nix.url = "github:hlolli/clj2nix"; clj2nix.url = "github:hlolli/clj2nix";
build-tools-src = { build-tools-src = {
url = "github:clojure/tools.build?tag=v0.8.2"; url = "github:clojure/tools.build?tag=v0.6.8";
flake = false; flake = false;
}; };
gitignore = { gitignore = {
@ -22,7 +22,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}"; pkgs = nixpkgs.legacyPackages."${system}";
build-tools-jar = pkgs.callPackage ./build.tools.nix { build-tools-jar = pkgs.callPackage ./build.tools.nix {
version = "0.8.2"; version = "0.6.8";
inherit build-tools-src; inherit build-tools-src;
inherit (gitignore.lib) gitignoreSource; inherit (gitignore.lib) gitignoreSource;
}; };