2019-02-26 12:45:54 +01:00
|
|
|
{ stdenv, fetchurl, runtimeShell }:
|
2010-07-28 13:55:54 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-05-16 08:51:40 +02:00
|
|
|
name = "thinkingrock-binary-2.2.1";
|
2009-02-06 04:14:30 +01:00
|
|
|
|
2010-07-28 13:55:54 +02:00
|
|
|
src = fetchurl {
|
2010-05-09 16:15:37 +02:00
|
|
|
url = mirror://sourceforge/thinkingrock/ThinkingRock/TR%202.2.1/tr-2.2.1.tar.gz;
|
2009-09-13 10:54:50 +02:00
|
|
|
sha256 = "0hnwvvyc8miiz8w2g4iy7s4rgfy0kfbncgbgfzpsq6nrzq334kgm";
|
2009-02-06 04:14:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* it would be a really bad idea to put thinkingrock tr executable in PATH!
|
|
|
|
the tr.sh script does use the coreutils tr itself
|
|
|
|
That's why I've renamed the wrapper and called it thinkingrock
|
2019-02-26 12:45:54 +01:00
|
|
|
However you may not rename the bin/tr script cause it will notice and throw an
|
2009-02-06 04:14:30 +01:00
|
|
|
"java.lang.IllegalArgumentException: Malformed branding token: thinkingrock"
|
|
|
|
exception. I hope that's fine
|
|
|
|
*/
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# only keep /bin/tr
|
|
|
|
ls -1 bin/* | grep -ve 'bin/tr''$' | xargs rm
|
|
|
|
# don't keep the other .exe file either
|
|
|
|
find . -iname "*.exe" | xargs -n1 rm
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/{nix-support/tr-files,bin}
|
2009-02-06 04:14:30 +01:00
|
|
|
cp -r . $out/nix-support/tr-files
|
|
|
|
cat >> $out/bin/thinkingrock << EOF
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2009-02-06 04:14:30 +01:00
|
|
|
exec $out/nix-support/tr-files/bin/tr "$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/thinkingrock
|
|
|
|
'';
|
2019-02-26 12:45:54 +01:00
|
|
|
|
2009-02-06 04:14:30 +01:00
|
|
|
installPhase = ":";
|
|
|
|
|
2019-02-26 12:45:54 +01:00
|
|
|
meta = {
|
2010-07-28 13:55:54 +02:00
|
|
|
description = "Task management system";
|
|
|
|
homepage = http://www.thinkingrock.com.au/;
|
|
|
|
license = "CDDL"; # Common Development and Distribution License
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-02-06 04:14:30 +01:00
|
|
|
};
|
|
|
|
}
|