-
Notifications
You must be signed in to change notification settings - Fork 35
/
package.nix
38 lines (30 loc) · 856 Bytes
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, fetchFromGitHub, jre, makeWrapper, maven }:
maven.buildMavenPackage rec {
pname = "MtgDesktopCompanion";
version = "2.49";
src = fetchFromGitHub {
owner = "nicho92";
repo = "${pname}";
rev = "${version}";
sha256 = "sha256-E8tTR2xcJaAY7IOGQFk748TkDyqOjOJGEqZkq59jze8=";
};
mvnHash = "sha256-+9OTlhLLSoxhfjd1EiXLbHhxZBCxJv3QnG3GoREBE7Q=";
nativeBuildInputs = [
maven
makeWrapper
];
buildInputs = [
jre
];
buildPhase = ''
mvn -DskipTests clean install
'';
installPhase = ''
mkdir -p $out/bin $out/lib
mv target/executable/bin/*.sh $out/bin
mv target/executable/lib $out
wrapProgram $out/bin/mtg-desktop-companion.sh \
--set JAVA_HOME ${jre} \
--prefix PATH : ${jre}/bin
'';
}