nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 unzip,
6 jdk,
7 makeWrapper,
8}:
9
10stdenv.mkDerivation {
11 version = "6.0.1";
12 pname = "omegat";
13
14 src = fetchurl {
15 # their zip has repeated files or something, so no fetchzip
16 url = "mirror://sourceforge/project/omegat/OmegaT%20-%20Standard/OmegaT%206.0.1/OmegaT_6.0.1_Without_JRE.zip";
17 sha256 = "sha256-Rj50bzT8k7+GWb0p/ma+zy+PzkF7tB6iV4F4UVAImJg=";
18 };
19
20 nativeBuildInputs = [
21 makeWrapper
22 unzip
23 ];
24
25 unpackCmd = "unzip -o $curSrc"; # tries to go interactive without -o
26
27 installPhase = ''
28 mkdir -p $out/bin
29 cp -r lib docs images plugins scripts *.txt *.html OmegaT.jar $out/
30
31 cat > $out/bin/omegat <<EOF
32 #! $SHELL -e
33 CLASSPATH="$out/lib"
34 exec ${jdk}/bin/java -jar -Xmx1024M $out/OmegaT.jar "\$@"
35 EOF
36 chmod +x $out/bin/omegat
37 '';
38
39 meta = with lib; {
40 description = "Free computer aided translation (CAT) tool for professionals";
41 mainProgram = "omegat";
42 longDescription = ''
43 OmegaT is a free and open source multiplatform Computer Assisted Translation
44 tool with fuzzy matching, translation memory, keyword search, glossaries, and
45 translation leveraging into updated projects.
46 '';
47 homepage = "http://www.omegat.org/";
48 sourceProvenance = with sourceTypes; [ binaryBytecode ];
49 license = licenses.gpl3Plus;
50 maintainers = with maintainers; [ t184256 ];
51 platforms = [
52 "i686-linux"
53 "x86_64-linux"
54 ];
55 };
56}