2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, runtimeShell }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "thinkingrock-binary-2.2.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/thinkingrock/ThinkingRock/TR%202.2.1/tr-2.2.1.tar.gz";
|
|
|
|
sha256 = "0hnwvvyc8miiz8w2g4iy7s4rgfy0kfbncgbgfzpsq6nrzq334kgm";
|
|
|
|
};
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
However you may not rename the bin/tr script cause it will notice and throw an
|
|
|
|
"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
|
|
|
|
mkdir -p $out/{nix-support/tr-files,bin}
|
|
|
|
cp -r . $out/nix-support/tr-files
|
|
|
|
cat >> $out/bin/thinkingrock << EOF
|
|
|
|
#!${runtimeShell}
|
|
|
|
exec $out/nix-support/tr-files/bin/tr "$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/thinkingrock
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ":";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Task management system";
|
|
|
|
homepage = "http://www.thinkingrock.com.au/";
|
2020-07-18 16:06:22 +00:00
|
|
|
license = licenses.cddl;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|