Skip to content

Commit

Permalink
Merge pull request #307616 from huantianad/tetrio-plus-0-27-2
Browse files Browse the repository at this point in the history
tetrio-desktop: unstable-2024-04-20 -> 0.27.2
  • Loading branch information
Mic92 committed Apr 29, 2024
2 parents 368b2d7 + ac8162c commit b64e2c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 6 additions & 1 deletion pkgs/by-name/te/tetrio-desktop/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ stdenv.mkDerivation (finalAttrs: {
let
tetrio-plus' =
if tetrio-plus == null
then callPackage ./tetrio-plus.nix { tetrio-src = finalAttrs.src; }
then
callPackage ./tetrio-plus.nix
{
tetrio-src = finalAttrs.src;
tetrio-version = finalAttrs.version;
}
else tetrio-plus;

asarPath =
Expand Down
14 changes: 10 additions & 4 deletions pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
, asar

, tetrio-src
, tetrio-version
}:

let
version = "unstable-2024-04-20";
version = "0.27.2";

src = fetchFromGitLab {
owner = "UniQMG";
repo = "tetrio-plus";
rev = "8091b969cddbff32254eaebf8088efb63f4c519a";
hash = "sha256-ow9DrS3jWNtTbz8Obj4l8Zdr3u9m7f9V3dYUE2H3thk=";
rev = "electron-v${version}-tetrio-v${lib.versions.major tetrio-version}";
hash = "sha256-PvTivTt1Zuvk5gaCcQDcIBFsUf/ZG7TJYXqm0NP++Bw=";
fetchSubmodules = true;

# tetrio-plus uses this info for displaying its version,
Expand Down Expand Up @@ -52,7 +53,7 @@ let

sourceRoot = "${src.name}/tpsecore";

cargoHash = "sha256-r5Qcu2u/ju0b/1PWz9tE5jNlNS3PfzS79Gm1XSKA3W4=";
cargoHash = "sha256-K9l8wQOtjf3l8gZMMdVnaNrgzVWGl62iBBcpA+ulJbw=";

nativeBuildInputs = [
wasm-pack
Expand Down Expand Up @@ -127,6 +128,11 @@ stdenv.mkDerivation (finalAttrs: {
cp -r $src out/tetrioplus
chmod -R u+w out/tetrioplus
# Disable the uninstall button in the tetrio-plus popup,
# as it doesn't make sense to mutably uninstall it in a nix package
substituteInPlace out/tetrioplus/desktop-manifest.js \
--replace-fail '"show_uninstaller_button": true' '"show_uninstaller_button": false'
# We don't need the tpsecore source code bundled
rm -rf out/tetrioplus/tpsecore/
# since we install the compiled version here
Expand Down

0 comments on commit b64e2c2

Please sign in to comment.