1 { lib, stdenv, fetchurl, runtimeShell }:
3 stdenv.mkDerivation rec {
4 pname = "thinkingrock-binary";
8 url = "mirror://sourceforge/thinkingrock/ThinkingRock/TR%20${version}/tr-${version}.tar.gz";
9 sha256 = "0hnwvvyc8miiz8w2g4iy7s4rgfy0kfbncgbgfzpsq6nrzq334kgm";
12 /* it would be a really bad idea to put thinkingrock tr executable in PATH!
13 the tr.sh script does use the coreutils tr itself
14 That's why I've renamed the wrapper and called it thinkingrock
15 However you may not rename the bin/tr script cause it will notice and throw an
16 "java.lang.IllegalArgumentException: Malformed branding token: thinkingrock"
17 exception. I hope that's fine
22 ls -1 bin/* | grep -ve 'bin/tr''$' | xargs rm
23 # don't keep the other .exe file either
24 find . -iname "*.exe" | xargs -n1 rm
25 mkdir -p $out/{nix-support/tr-files,bin}
26 cp -r . $out/nix-support/tr-files
27 cat >> $out/bin/thinkingrock << EOF
29 exec $out/nix-support/tr-files/bin/tr "$@"
31 chmod +x $out/bin/thinkingrock
37 description = "Task management system";
38 mainProgram = "thinkingrock";
39 homepage = "http://www.thinkingrock.com.au/";
40 license = licenses.cddl;
41 platforms = platforms.unix;