tcl2048: Simplify package with tcl.mkTclDerivation
This commit is contained in:
parent
bf222c3835
commit
f17ca3f517
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchurl, tcl, tcllib, runtimeShell }:
|
{ lib, stdenv, fetchurl, tcl, tcllib, runtimeShell }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
tcl.mkTclDerivation {
|
||||||
name = "tcl2048-0.4.0";
|
name = "tcl2048-0.4.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -8,20 +8,12 @@ stdenv.mkDerivation {
|
||||||
sha256 = "53f5503efd7f029b2614b0f9b1e3aac6c0342735a3c9b811d74a5135fee3e89e";
|
sha256 = "53f5503efd7f029b2614b0f9b1e3aac6c0342735a3c9b811d74a5135fee3e89e";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = "installPhase";
|
buildInputs = [ tcllib ];
|
||||||
|
phases = "installPhase fixupPhase";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -pv $out/bin
|
mkdir -pv $out/bin
|
||||||
cp $src $out/2048.tcl
|
install -m 755 $src $out/bin/2048
|
||||||
cat > $out/bin/2048 << EOF
|
|
||||||
#!${runtimeShell}
|
|
||||||
|
|
||||||
# wrapper for tcl2048
|
|
||||||
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
|
|
||||||
${tcl}/bin/tclsh $out/2048.tcl
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x $out/bin/2048
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in a new issue