dadc7eb329
Whenever we create scripts that are installed to $out, we must use runtimeShell in order to get the shell that can be executed on the machine we create the package for. This is relevant for cross-compiling. The only use case for stdenv.shell are scripts that are executed as part of the build system. Usages in checkPhase are borderline however to decrease the likelyhood of people copying the wrong examples, I decided to use runtimeShell as well.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ stdenv, fetchurl, unzip, runtimeShell }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "openjump-1.3.1";
|
|
|
|
src = fetchurl {
|
|
url = mirror://sourceforge/jump-pilot/OpenJUMP/1.3.1/openjump-1.3.1.zip;
|
|
sha256 = "0y4z53yx0x7rp3c8rnj028ni3gr47r35apgcpqp3jl7r2di6zgqm";
|
|
};
|
|
|
|
# ln jump.log hack: a different user will probably get a permission denied
|
|
# error. Still this is better than getting it always.
|
|
# TODO: build from source and patch this
|
|
unpackPhase = ''
|
|
mkdir -p $out/bin;
|
|
cd $out; unzip $src
|
|
s=$out/bin/OpenJump
|
|
dir=$(echo $out/openjump-*)
|
|
cat >> $s << EOF
|
|
#!${runtimeShell}
|
|
cd $dir/bin
|
|
exec ${stdenv.shell} openjump.sh
|
|
EOF
|
|
chmod +x $s
|
|
ln -s /tmp/openjump.log $dir/bin/jump.log
|
|
'';
|
|
|
|
installPhase = ":";
|
|
|
|
buildInputs = [unzip];
|
|
|
|
meta = {
|
|
description = "Open source Geographic Information System (GIS) written in the Java programming language";
|
|
homepage = http://www.openjump.org/index.html;
|
|
license = stdenv.lib.licenses.gpl2;
|
|
maintainers = [stdenv.lib.maintainers.marcweber];
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|