Skip to content

Commit 8a43018

Browse files
committed
rmfakecloud: 0.0.21 -> 0.0.22
- fix regression in 0.0.21 for old remarkable tablet versions (see ddvk/rmfakecloud#330 ) - fix build with new UI...
1 parent f27f1e0 commit 8a43018

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

pkgs/by-name/rm/rmfakecloud/package.nix

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
buildGoModule rec {
1111
pname = "rmfakecloud";
12-
version = "0.0.21";
12+
version = "0.0.22";
1313

1414
src = fetchFromGitHub {
1515
owner = "ddvk";
16-
repo = pname;
16+
repo = "rmfakecloud";
1717
rev = "v${version}";
18-
hash = "sha256-Opx39FUo4Kzezi96D9iraA8gkqCPVfMf4LhxtVpsuNQ=";
18+
hash = "sha256-rOJ5q8JwvSPxHZ5n2UnltHG/ja6l7Z4pbnOWKjNG4hQ=";
1919
};
2020

2121
vendorHash = "sha256-9tfxE03brUvCYusmewiqNpCkKyIS9qePqylrzDWrJLY=";
@@ -25,8 +25,7 @@ buildGoModule rec {
2525
postPatch =
2626
if enableWebui then
2727
''
28-
mkdir -p ui/build
29-
cp -r ${ui}/* ui/build
28+
cp -a ${ui} ui/dist
3029
''
3130
else
3231
''

pkgs/by-name/rm/rmfakecloud/webui.nix

+27-18
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
1-
{ version, src, stdenv, lib, fetchYarnDeps, fixup-yarn-lock, yarn, nodejs }:
1+
{
2+
version,
3+
src,
4+
stdenv,
5+
lib,
6+
pnpm_9,
7+
nodejs,
8+
}:
29

3-
stdenv.mkDerivation rec {
10+
stdenv.mkDerivation (finalAttrs: {
411
inherit version src;
512

613
pname = "rmfakecloud-webui";
714

8-
yarnOfflineCache = fetchYarnDeps {
9-
yarnLock = "${src}/ui/yarn.lock";
10-
hash = "sha256-9//uQ4ZLLTf2N1WSwsOwFjBuDmThuMtMXU4SzMljAMM=";
15+
pnpmDeps = pnpm_9.fetchDeps {
16+
inherit (finalAttrs) pname version src;
17+
sourceRoot = "${finalAttrs.src.name}/ui";
18+
pnpmLock = "${src}/ui/pnpm-lock.yaml";
19+
hash = "sha256-VNmCT4um2W2ii8jAm+KjQSjixYEKoZkw7CeRwErff/o=";
1120
};
12-
13-
nativeBuildInputs = [ fixup-yarn-lock yarn nodejs ];
21+
pnpmRoot = "ui";
1422

1523
buildPhase = ''
16-
export HOME=$(mktemp -d)
1724
cd ui
18-
fixup-yarn-lock yarn.lock
19-
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
20-
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
21-
patchShebangs node_modules
22-
export PATH=$PWD/node_modules/.bin:$PATH
23-
./node_modules/.bin/react-scripts build
24-
mkdir -p $out
25-
cd ..
25+
26+
# using sass-embedded fails at executing node_modules/sass-embedded-linux-x64/dart-sass/src/dart
27+
rm -r node_modules/sass-embedded node_modules/.pnpm/sass-embedded*
28+
29+
pnpm build
2630
'';
2731

2832
installPhase = ''
29-
cp -r ui/build/* $out
33+
cp -a dist/. $out
3034
'';
3135

36+
nativeBuildInputs = [
37+
nodejs
38+
pnpm_9.configHook
39+
];
40+
3241
meta = with lib; {
3342
description = "Only the webui files for rmfakecloud";
3443
homepage = "https://ddvk.github.io/rmfakecloud/";
3544
license = licenses.agpl3Only;
3645
};
37-
}
46+
})

0 commit comments

Comments
 (0)