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.
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ stdenv, fetchurl, jre, runtimeShell }:
|
||
|
||
stdenv.mkDerivation rec {
|
||
name = "alchemy-${version}";
|
||
version = "008";
|
||
|
||
enableParallelBuilding = true;
|
||
|
||
src = fetchurl {
|
||
url = "http://al.chemy.org/files/Alchemy-${version}.tar.gz";
|
||
sha256 = "0449bvdccgx1jqnws1bckzs4nv2d230523qs0jx015gi81s1q7li";
|
||
};
|
||
|
||
installPhase = ''
|
||
mkdir -p $out/bin $out/share
|
||
cp -a . $out/share/alchemy
|
||
cat >> $out/bin/alchemy << EOF
|
||
#!${runtimeShell}
|
||
cd $out/share/alchemy
|
||
${jre}/bin/java -jar Alchemy.jar "$@"
|
||
EOF
|
||
chmod +x $out/bin/alchemy
|
||
'';
|
||
|
||
meta = with stdenv.lib; {
|
||
description = "Drawing application";
|
||
longDescription = ''
|
||
Alchemy is an open drawing project aimed at exploring how we can sketch,
|
||
draw, and create on computers in new ways. Alchemy isn’t software for
|
||
creating finished artwork, but rather a sketching environment that
|
||
focuses on the absolute initial stage of the creation process.
|
||
Experimental in nature, Alchemy lets you brainstorm visually to explore
|
||
an expanded range of ideas and possibilities in a serendipitous way.
|
||
'';
|
||
homepage = http://al.chemy.org/;
|
||
license = licenses.gpl3Plus;
|
||
maintainers = [ maintainers.marcweber ];
|
||
platforms = platforms.linux;
|
||
};
|
||
}
|