Commit f4e91ee8 authored by zestsystem's avatar zestsystem
Browse files

eas-cli: migrate from nodePackages

fix: use pkgs/by-name

fix: apply suggested fixes

fix: apply correct formatting

add changelog to meta
parent 4a3807f4
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnConfigHook,
  yarnBuildHook,
  yarnInstallHook,
  nodejs,
  jq,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "eas-cli";
  version = "14.7.1";

  src = fetchFromGitHub {
    owner = "expo";
    repo = "eas-cli";
    rev = "v${finalAttrs.version}";
    hash = "sha256-h7LohShs4j9Z7Mbe6MSMqfszrEPBcGeTpB+ma3iBXyM=";
  };

  packageJson = finalAttrs.src + "/packages/eas-cli/package.json";

  yarnOfflineCache = fetchYarnDeps {
    yarnLock = finalAttrs.src + "/yarn.lock"; # Point to the root lockfile
    hash = "sha256-pnp9MI2S5v4a7KftxYC3Sgc487vooX8+7lmYkmRTWWs=";
  };

  nativeBuildInputs = [
    yarnConfigHook
    yarnBuildHook
    yarnInstallHook
    nodejs
    jq
  ];

  # Add version field to package.json to prevent yarn pack from failing
  preInstall = ''
    echo "Adding version field to package.json"
    jq '. + {version: "${finalAttrs.version}"}' package.json > package.json.tmp
    mv package.json.tmp package.json
  '';

  postInstall = ''
    echo "Creating symlink for eas-cli binary"
    mkdir -p $out/bin
    ln -sf $out/lib/node_modules/eas-cli-root/packages/eas-cli/bin/run $out/bin/eas
    chmod +x $out/bin/eas
  '';

  meta = {
    changelog = "https://github.com/expo/eas-cli/releases/tag/v${finalAttrs.version}";
    description = "EAS command line tool from submodule";
    homepage = "https://github.com/expo/eas-cli";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ zestsystem ];
  };
})
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ mapAliases {
  inherit (pkgs.elmPackages) elm-test;
  inherit (pkgs) eslint; # Added 2024-08-28
  inherit (pkgs) eslint_d; # Added 2023-05-26
  inherit (pkgs) eas-cli; # added 2025-01-08
  expo-cli = throw "expo-cli was removed because it was deprecated upstream. Use `npx expo` or eas-cli instead."; # added 2024-12-02
  inherit (pkgs) firebase-tools; # added 2023-08-18
  inherit (pkgs) fixjson; # added 2024-06-26
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@
, "dotenv-vault"
, "elasticdump"
, "@electron-forge/cli"
, "eas-cli"
, "elm-oracle"
, "emoj"
, "emojione"
+0 −649

File changed.

Preview size limit exceeded, changes collapsed.