Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: Phoenix Code Editor #364069

Open
boustanihani opened this issue Dec 11, 2024 · 1 comment
Open

Package request: Phoenix Code Editor #364069

boustanihani opened this issue Dec 11, 2024 · 1 comment
Labels
0.kind: packaging request Request for a new package to be added

Comments

@boustanihani
Copy link

Phoenix Code Editor

https://github.com/phcode-dev/phoenix-desktop

https://phcode.io/

License: GNU AFFERO GENERAL PUBLIC LICENSE

@boustanihani boustanihani added the 0.kind: packaging request Request for a new package to be added label Dec 11, 2024
@genga898
Copy link
Contributor

error: failed to run custom build command for phoenix-code-ide v3.10.0 (/build/source/src-tauri) is the error I am getting, seems like the Cargo.lock file fetches the previous production version rather than the latest.

{
  lib,
  fetchFromGitHub,
  fetchNpmDeps,
  npmHooks,
  nodejs,

  rustPlatform,
  cargo-tauri_1,

  pkg-config,
  wrapGAppsHook3,

  openssl,
  libsoup_2_4,
  webkitgtk_4_0,
  glib-networking,
  gst_all_1,
}:

rustPlatform.buildRustPackage rec {
  pname = "phoenix-desktop";
  version = "prod-app-v3.10.0";

  src = fetchFromGitHub {
    owner = "phcode-dev";
    repo = "phoenix-desktop";
    rev = "refs/tags/${version}";
    hash = "sha256-12hFXPlIYQQ9oRr/Hn7guVo8YmWTmmsUSsjyFl5H5Vc=";
  };

  npmDeps = fetchNpmDeps {
    name = "${pname}-${version}-npm-deps";
    inherit src;
    forceGitDeps = true;
    hash = "sha256-9vvizv2IRo+pVlYvgJVersp5vQ5Tn/8og/Q87n/MCBY=";
  };

  postPatch = ''
    substituteInPlace package.json \
      --replace-fail '"postinstall": "node ./src-build/downloadNodeBinary.js",' "" \
      --replace-fail '"cleanNodeBinary": "node src-build/cleanNodeBinary.js",' "" \
  '';

  cargoRoot = "src-tauri";

  useFetchCargoVendor = true;
  cargoHash = "sha256-JO6asaZLaqOXiSYxxvEYsRinVxO0O3kBn8AG5WRgaX0=";

  buildAndTestSubdir = cargoRoot;

  nativeBuildInputs = [
    npmHooks.npmConfigHook
    nodejs

    cargo-tauri_1.hook

    pkg-config
    wrapGAppsHook3
  ];

  buildInputs = [
    openssl
    libsoup_2_4
    webkitgtk_4_0
    glib-networking

    # Optional plugins for media playback
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-good
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-ugly
    gst_all_1.gst-libav
  ];

  meta = {
    description = "";
    homepage = "";
    changelog = "";
    license = lib.licenses.agpl3Only;
    maintainers = with lib.maintainers; [ genga898 ];
  };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

No branches or pull requests

2 participants