forked from DalekCraft2/Shimeji-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
47 lines (39 loc) · 1.24 KB
/
default.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
39
40
41
42
43
44
45
46
47
{
lib,
jdk11,
makeDesktopItem,
maven,
xorg,
}:
maven.buildMavenPackage rec {
pname = "shimeji-desktop";
version = "dev";
src = ./.;
mvnHash = "sha256-y71i4RzobDW+AlwwDhotj8SOQDHAcfM/e5oVJH+cwa4=";
mvnParameters = "-DskipLaunch4j -Dmaven.antrun.skip=true";
nativeBuildInputs = [ jdk11 ];
desktopItem = makeDesktopItem {
desktopName = "Shimeji Desktop";
name = pname;
exec = pname;
icon = pname;
comment = meta.description;
startupWMClass = "com-group_finity-mascot-Main";
};
installPhase = ''
export java=${lib.getExe jdk11}
export runtimeLibs=${lib.makeLibraryPath [ xorg.libX11 xorg.libXrender ]}
mkdir -p $out/bin $out/share/{pixmaps,$pname}
cp -r conf/ img/ target/{lib,Shimeji-ee.jar} $out/share/$pname
mv $out/share/$pname/img/profile.png $out/share/pixmaps/$pname.png
ln -s $desktopItem/share/applications $out/share/
substituteAll ${./run.sh.in} $out/bin/shimeji-desktop
chmod +x $out/bin/shimeji-desktop
'';
meta = {
description = "A fork of Shimeji-ee with newer Java version and better cross-platform support";
homepage = "https://github.com/SamLukeYes/Shimeji-Desktop";
license = with lib.licenses; [ bsd3 mit lgpl21Only ];
mainProgram = pname;
};
}