2014-08-31 10:48:51 +02:00
|
|
|
{ stdenv, fetchurl, tcl, tcllib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2015-02-03 12:00:59 +01:00
|
|
|
name = "tcl2048-0.3.1";
|
2014-08-31 10:48:51 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-03 12:00:59 +01:00
|
|
|
url = https://raw.githubusercontent.com/dbohdan/2048-tcl/v0.3.1/2048.tcl;
|
|
|
|
sha256 = "44e325328784c4e91cecc0a9cc00e32d733da713adf2fad1c081542f38af3361";
|
2014-08-31 10:48:51 +02:00
|
|
|
};
|
|
|
|
|
2015-02-03 12:00:59 +01:00
|
|
|
phases = "installPhase";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out/bin
|
|
|
|
cp $src $out/2048.tcl
|
|
|
|
cat > $out/bin/2048 << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
|
|
|
|
# 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 10:48:51 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/dbohdan/2048-tcl;
|
2014-11-11 14:20:43 +01:00
|
|
|
description = "The game of 2048 implemented in Tcl";
|
2014-08-31 10:48:51 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2015-02-03 12:00:59 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ dbohdan ];
|
2014-08-31 10:48:51 +02:00
|
|
|
};
|
|
|
|
}
|