Commit 1182bd00 authored by Dominique Martinet's avatar Dominique Martinet
Browse files

rmfakecloud: 0.0.21 -> 0.0.23

0.0.22
- fix regression in 0.0.21 for old remarkable tablet versions
(see https://github.com/ddvk/rmfakecloud/issues/330 )
- fix build with new UI...

0.0.23
- fix other regression with 0.0.22...
parent fa42b5a5
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -9,13 +9,13 @@

buildGoModule rec {
  pname = "rmfakecloud";
  version = "0.0.21";
  version = "0.0.23";

  src = fetchFromGitHub {
    owner = "ddvk";
    repo = pname;
    repo = "rmfakecloud";
    rev = "v${version}";
    hash = "sha256-Opx39FUo4Kzezi96D9iraA8gkqCPVfMf4LhxtVpsuNQ=";
    hash = "sha256-XlKqh6GKGreWLPjS8XfEUJCMMxiOw8pP2qX8otD+RCo=";
  };

  vendorHash = "sha256-9tfxE03brUvCYusmewiqNpCkKyIS9qePqylrzDWrJLY=";
@@ -25,8 +25,7 @@ buildGoModule rec {
  postPatch =
    if enableWebui then
      ''
        mkdir -p ui/build
        cp -r ${ui}/* ui/build
        cp -a ${ui} ui/dist
      ''
    else
      ''
+27 −18
Original line number Diff line number Diff line
{ version, src, stdenv, lib, fetchYarnDeps, fixup-yarn-lock, yarn, nodejs }:
{
  version,
  src,
  stdenv,
  lib,
  pnpm_9,
  nodejs,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  inherit version src;

  pname = "rmfakecloud-webui";

  yarnOfflineCache = fetchYarnDeps {
    yarnLock = "${src}/ui/yarn.lock";
    hash = "sha256-9//uQ4ZLLTf2N1WSwsOwFjBuDmThuMtMXU4SzMljAMM=";
  pnpmDeps = pnpm_9.fetchDeps {
    inherit (finalAttrs) pname version src;
    sourceRoot = "${finalAttrs.src.name}/ui";
    pnpmLock = "${src}/ui/pnpm-lock.yaml";
    hash = "sha256-VNmCT4um2W2ii8jAm+KjQSjixYEKoZkw7CeRwErff/o=";
  };

  nativeBuildInputs = [ fixup-yarn-lock yarn nodejs ];
  pnpmRoot = "ui";

  buildPhase = ''
    export HOME=$(mktemp -d)
    cd ui
    fixup-yarn-lock yarn.lock
    yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
    yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
    patchShebangs node_modules
    export PATH=$PWD/node_modules/.bin:$PATH
    ./node_modules/.bin/react-scripts build
    mkdir -p $out
    cd ..

    # using sass-embedded fails at executing node_modules/sass-embedded-linux-x64/dart-sass/src/dart
    rm -r node_modules/sass-embedded node_modules/.pnpm/sass-embedded*

    pnpm build
  '';

  installPhase = ''
    cp -r ui/build/* $out
    cp -a dist/. $out
  '';

  nativeBuildInputs = [
    nodejs
    pnpm_9.configHook
  ];

  meta = with lib; {
    description = "Only the webui files for rmfakecloud";
    homepage = "https://ddvk.github.io/rmfakecloud/";
    license = licenses.agpl3Only;
  };
}
})