2019-02-26 11:45:54 +00:00
|
|
|
{ stdenv, fetchurl, tcl, tcllib, runtimeShell }:
|
2014-08-31 09:48:51 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2018-05-15 20:50:45 +01:00
|
|
|
name = "tcl2048-0.4.0";
|
2014-08-31 09:48:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-05-15 20:50:45 +01:00
|
|
|
url = https://raw.githubusercontent.com/dbohdan/2048.tcl/v0.4.0/2048.tcl;
|
|
|
|
sha256 = "53f5503efd7f029b2614b0f9b1e3aac6c0342735a3c9b811d74a5135fee3e89e";
|
2014-08-31 09:48:51 +01:00
|
|
|
};
|
|
|
|
|
2015-02-03 11:00:59 +00:00
|
|
|
phases = "installPhase";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out/bin
|
|
|
|
cp $src $out/2048.tcl
|
|
|
|
cat > $out/bin/2048 << EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2015-02-03 11:00:59 +00:00
|
|
|
|
|
|
|
# wrapper for tcl2048
|
|
|
|
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
|
|
|
|
${tcl}/bin/tclsh $out/2048.tcl
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/2048
|
|
|
|
'';
|
2014-08-31 09:48:51 +01:00
|
|
|
|
|
|
|
meta = {
|
2018-05-15 20:50:45 +01:00
|
|
|
homepage = https://github.com/dbohdan/2048.tcl;
|
2014-11-11 13:20:43 +00:00
|
|
|
description = "The game of 2048 implemented in Tcl";
|
2014-08-31 09:48:51 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2015-02-03 11:00:59 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ dbohdan ];
|
2014-08-31 09:48:51 +01:00
|
|
|
};
|
|
|
|
}
|