packages/tetrio: init
This commit is contained in:
parent
bf54c8b48b
commit
c110e53871
4 changed files with 117 additions and 1 deletions
81
packages/tetrio/base.nix
Normal file
81
packages/tetrio/base.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Copied from https://github.com/NixOS/nixpkgs/pull/146940
|
||||
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, alsa-lib
|
||||
, cups
|
||||
, libX11
|
||||
, libXScrnSaver
|
||||
, libXtst
|
||||
, mesa
|
||||
, nss
|
||||
, systemd
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tetrio-desktop";
|
||||
version = "8.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://web.archive.org/web/20211228025517/https://tetr.io/about/desktop/builds/TETR.IO%20Setup.deb";
|
||||
name = "${pname}.deb";
|
||||
sha256 = "1nlblfhrph4cw8rpic9icrs78mzrxyskl7ggyy2i8bk9i07i21xf";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
alsa-lib
|
||||
autoPatchelfHook
|
||||
cups
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
mesa
|
||||
nss
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
libPath = lib.makeLibraryPath [
|
||||
alsa-lib
|
||||
cups
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
mesa
|
||||
nss
|
||||
systemd
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p $TMP/${pname} $out/bin
|
||||
cp $src $TMP/${pname}.deb
|
||||
ar vx $TMP/${pname}.deb
|
||||
tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/${pname}/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -R $TMP/${pname}/{usr/share,opt} $out/
|
||||
wrapProgram $out/opt/TETR.IO/${pname} \
|
||||
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO
|
||||
ln -s $out/opt/TETR.IO/${pname} $out/bin/
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace "Exec=\"/opt/TETR.IO/${pname}\"" "Exec=\"$out/opt/TETR.IO/${pname}\""
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tetr.io";
|
||||
downloadPage = "https://tetr.io/about/desktop/";
|
||||
description = "TETR.IO desktop client";
|
||||
longDescription = ''
|
||||
TETR.IO is a modern yet familiar online stacker.
|
||||
Play against friends and foes all over the world, or claim a spot on the leaderboards - the stacker future is yours!
|
||||
'';
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.unfree;
|
||||
#maintainers = with maintainers; [ wackbyte ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue