2022-06-02 12:24:10 -07:00
|
|
|
{ lib, stdenv, clojure, fetchgit, fetchMavenArtifact, gitignoreSource
|
|
|
|
, callPackage, writeText, writeShellScript, ... }:
|
2022-05-27 11:40:56 -07:00
|
|
|
|
|
|
|
let
|
|
|
|
base-name = "bebot";
|
2022-06-02 19:58:01 -07:00
|
|
|
project = "org.fudo";
|
2022-05-27 11:40:56 -07:00
|
|
|
version = "0.1";
|
|
|
|
full-name = "${base-name}-${version}";
|
|
|
|
|
2022-06-02 12:24:10 -07:00
|
|
|
cljdeps = callPackage ./deps.nix { inherit fetchgit fetchMavenArtifact lib; };
|
|
|
|
classpath = cljdeps.makeClasspaths { };
|
2022-05-27 11:40:56 -07:00
|
|
|
|
2022-06-02 12:29:31 -07:00
|
|
|
pthru = o: builtins.trace o o;
|
|
|
|
|
2022-05-27 11:40:56 -07:00
|
|
|
in stdenv.mkDerivation {
|
2022-06-02 12:24:10 -07:00
|
|
|
name = "${full-name}.jar";
|
2022-06-02 19:58:01 -07:00
|
|
|
src = ./.;
|
|
|
|
buildInputs = [ clojure ] ++ (map (d: d.paths) cljdeps.packages);
|
2022-06-02 12:29:31 -07:00
|
|
|
buildPhase = pthru ''
|
2022-06-02 12:24:10 -07:00
|
|
|
HOME=./home
|
|
|
|
mkdir -p $HOME
|
2022-06-02 19:58:01 -07:00
|
|
|
clojure -Scp ${classpath}:./src -X:build build/uberjar :project ${project}/${base-name} :version ${version}
|
2022-05-27 11:40:56 -07:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
2022-06-02 12:24:10 -07:00
|
|
|
cp ./target/bebot-${version}-standalone.jar $out
|
2022-05-27 11:40:56 -07:00
|
|
|
'';
|
|
|
|
}
|