package adams site and remove tetrio

This commit is contained in:
Kopatz
2024-05-25 21:19:55 +02:00
parent ceff361008
commit ba7aba817e
10 changed files with 98 additions and 144 deletions

View File

@@ -0,0 +1,16 @@
{ lib, buildNpmPackage, fetchFromGitHub }:
buildNpmPackage rec {
pname = "adam-site";
version = "1.0.0";
src = fetchGit {
url = "git@github.com:oberprofis/adams.git";
ref = "main";
rev = "0d1d5003bd5681c5dbe2ad12ed1ef7e56bb4c197";
};
npmDepsHash="sha256-ndpuIqMAitnx0rswYD60l5JhDMdaKH77Qdu7zNgwj/o=";
installPhase = ''
mkdir -p $out
cp -r ./dist/adams-site/* $out
'';
}

View File

@@ -1,8 +1,8 @@
{ pkgs, ... }: rec {
tetrio = pkgs.callPackage ./tetrio-desktop/package.nix { };
kop-hub = pkgs.callPackage ./hub/default.nix { };
ente-frontend = pkgs.callPackage ./ente-frontend/default.nix { };
kop-website =
pkgs.callPackage ./website/default.nix { inherit kop-hub ente-frontend; };
kop-monitor = pkgs.callPackage ./kop-monitor/default.nix { };
adam-site = pkgs.callPackage ./adam-site/default.nix { };
}

View File

@@ -1,97 +0,0 @@
{ stdenv
, lib
, fetchurl
, dpkg
, autoPatchelfHook
, wrapGAppsHook
, alsa-lib
, cups
, libGL
, libX11
, libXScrnSaver
, libXtst
, mesa
, nss
, gtk3
, libpulseaudio
, systemd
, callPackage
, withTetrioPlus ? true
, tetrio-plus ? callPackage ./tetrio-plus.nix { }
, ...
}:
let
libPath = lib.makeLibraryPath [
libGL
libpulseaudio
systemd
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "tetrio-desktop";
version = "9.0.0";
src = fetchurl {
url = "https://tetr.io/about/desktop/builds/${lib.versions.major finalAttrs.version}/TETR.IO%20Setup.deb";
hash = "sha256-UriLwMB8D+/T32H4rPbkJAy/F/FFhNpd++0AR1lwEfs=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
wrapGAppsHook
];
dontWrapGApps = true;
buildInputs = [
alsa-lib
cups
libX11
libXScrnSaver
libXtst
mesa
nss
gtk3
];
unpackCmd = "dpkg -x $curSrc src";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r opt/ usr/share/ $out
ln -s $out/opt/TETR.IO/TETR.IO $out/bin/tetrio
substituteInPlace $out/share/applications/TETR.IO.desktop \
--replace "Exec=/opt/TETR.IO/TETR.IO" "Exec=$out/bin/tetrio"
runHook postInstall
'';
postInstall = lib.strings.optionalString withTetrioPlus ''
cp ${tetrio-plus} $out/opt/TETR.IO/resources/app.asar
'';
postFixup = ''
wrapProgram $out/opt/TETR.IO/TETR.IO \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO \
''${gappsWrapperArgs[@]}
'';
meta = {
description = "TETR.IO desktop client";
downloadPage = "https://tetr.io/about/desktop/";
homepage = "https://tetr.io";
license = lib.licenses.unfree;
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!
'';
mainProgram = "tetrio";
maintainers = with lib.maintainers; [ wackbyte ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -1,26 +0,0 @@
{ lib, stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = "tetrio-plus";
version = "0.25.3";
src = fetchzip {
url = "https://gitlab.com/UniQMG/tetrio-plus/-/jobs/6734605389/artifacts/raw/tetrio-plus_v0.27.2_for_desktop_v9.asar.zip";
hash = "sha256-+5jXhJwltw426eWU1yR4jxXlOm/etuJKzfeoXSetMws=";
};
installPhase = ''
runHook preInstall
install app.asar $out
runHook postInstall
'';
meta = with lib; {
description = "TETR.IO customization toolkit";
homepage = "https://gitlab.com/UniQMG/tetrio-plus";
license = licenses.mit;
maintainers = with maintainers; [ huantian ];
platforms = [ "x86_64-linux" ];
};
}