diff options
author | huantian <davidtianli@gmail.com> | 2024-04-28 20:40:56 -0700 |
---|---|---|
committer | huantian <davidtianli@gmail.com> | 2024-04-28 20:40:56 -0700 |
commit | ac8162c98477f7f2396d82e5f1f2e47c432d44e2 (patch) | |
tree | 49175e5becd781b3cd748fa999991592487cdd39 | |
parent | 6e64fb1b073bd299683aac659cfd042d7a43cbf7 (diff) |
tetrio-plus: unstable-2024-04-20 -> 0.27.2
-rw-r--r-- | pkgs/by-name/te/tetrio-desktop/package.nix | 7 | ||||
-rw-r--r-- | pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix | 14 |
2 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/by-name/te/tetrio-desktop/package.nix b/pkgs/by-name/te/tetrio-desktop/package.nix index 4d02efc2aa4f9..f07299b37cc39 100644 --- a/pkgs/by-name/te/tetrio-desktop/package.nix +++ b/pkgs/by-name/te/tetrio-desktop/package.nix @@ -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 = diff --git a/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix b/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix index cc5c2f4fce9ae..a9c6f6080b03a 100644 --- a/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix +++ b/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix @@ -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, @@ -52,7 +53,7 @@ let sourceRoot = "${src.name}/tpsecore"; - cargoHash = "sha256-r5Qcu2u/ju0b/1PWz9tE5jNlNS3PfzS79Gm1XSKA3W4="; + cargoHash = "sha256-K9l8wQOtjf3l8gZMMdVnaNrgzVWGl62iBBcpA+ulJbw="; nativeBuildInputs = [ wasm-pack @@ -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 |