Skip to content

Commit 2aefa47

Browse files
authored
[25.11] ente-web: 1.2.18 -> 1.3.13 (#491080)
2 parents 0f3292c + 3c47753 commit 2aefa47

1 file changed

Lines changed: 51 additions & 14 deletions

File tree

pkgs/by-name/en/ente-web/package.nix

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
22
lib,
33
stdenv,
4+
binaryen,
5+
cargo,
46
fetchFromGitHub,
57
fetchYarnDeps,
68
nodejs,
9+
rustPlatform,
10+
rustc,
11+
wasm-bindgen-cli_0_2_106,
12+
wasm-pack,
713
yarnConfigHook,
814
yarnBuildHook,
915
nix-update-script,
@@ -19,43 +25,73 @@
1925

2026
stdenv.mkDerivation (finalAttrs: {
2127
pname = "ente-web-${enteApp}";
22-
version = "1.2.18";
28+
version = "1.3.13";
2329

2430
src = fetchFromGitHub {
2531
owner = "ente-io";
2632
repo = "ente";
27-
sparseCheckout = [ "web" ];
33+
sparseCheckout = [
34+
"rust"
35+
"web"
36+
];
2837
tag = "photos-v${finalAttrs.version}";
2938
fetchSubmodules = true;
30-
hash = "sha256-Ym5pL3UFNSz9Pk179qvTFsFNdIIb3Bs//vscRKV+30Q=";
39+
hash = "sha256-Bfu4O+kBtXxxVyx2iC/577TPD049ifjg1ItmKN4bx4U=";
3140
};
3241
sourceRoot = "${finalAttrs.src.name}/web";
3342

43+
cargoDeps = rustPlatform.fetchCargoVendor {
44+
inherit (finalAttrs)
45+
pname
46+
version
47+
src
48+
sourceRoot
49+
cargoRoot
50+
;
51+
hash = "sha256-dedLmQP15V+gAtycXx1fpWfjXWsTPLXPPcCIAcr/ME0=";
52+
};
53+
cargoRoot = "packages/wasm";
54+
3455
offlineCache = fetchYarnDeps {
3556
yarnLock = "${finalAttrs.src}/web/yarn.lock";
36-
hash = "sha256-omFNobZ+2hb1cEO2Gfn+F3oYy7UDSrtIY4cliQ80CUs=";
57+
hash = "sha256-OPmO+4VlM4Fy9vjgb2ZxDP6Ber9A+ANwix1dZSuEgUE=";
3758
};
3859

3960
nativeBuildInputs = [
4061
yarnConfigHook
4162
yarnBuildHook
63+
binaryen
64+
cargo
65+
rustPlatform.cargoSetupHook
66+
rustc
67+
rustc.llvmPackages.lld
4268
nodejs
69+
wasm-bindgen-cli_0_2_106
70+
wasm-pack
4371
];
4472

4573
# See: https://github.com/ente-io/ente/blob/main/web/apps/photos/.env
4674
env = extraBuildEnv;
4775

48-
# Replace hardcoded ente.io urls if desired
49-
postPatch = lib.optionalString (enteMainUrl != null) ''
50-
substituteInPlace \
51-
apps/payments/src/services/billing.ts \
52-
apps/photos/src/pages/shared-albums.tsx \
53-
--replace-fail "https://ente.io" ${lib.escapeShellArg enteMainUrl}
76+
postPatch =
77+
# Use our `wasm-pack` binary, rather than the Node version, which is
78+
# just a wrapper that tries to download the actual binary
79+
''
80+
substituteInPlace \
81+
packages/wasm/package.json \
82+
--replace-fail "wasm-pack " ${lib.escapeShellArg "${wasm-pack}/bin/wasm-pack "}
83+
''
84+
# Replace hardcoded ente.io urls if desired
85+
+ lib.optionalString (enteMainUrl != null) ''
86+
substituteInPlace \
87+
apps/payments/src/services/billing.ts \
88+
apps/photos/src/pages/shared-albums.tsx \
89+
--replace-fail "https://ente.io" ${lib.escapeShellArg enteMainUrl}
5490
55-
substituteInPlace \
56-
apps/accounts/src/pages/index.tsx \
57-
--replace-fail "https://web.ente.io" ${lib.escapeShellArg enteMainUrl}
58-
'';
91+
substituteInPlace \
92+
apps/accounts/src/pages/index.tsx \
93+
--replace-fail "https://web.ente.io" ${lib.escapeShellArg enteMainUrl}
94+
'';
5995

6096
yarnBuildScript = "build:${enteApp}";
6197
installPhase =
@@ -85,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
85121
maintainers = with lib.maintainers; [
86122
pinpox
87123
oddlama
124+
nicegamer7
88125
];
89126
platforms = lib.platforms.all;
90127
};

0 commit comments

Comments
 (0)