Unverified Commit 46c7edcc authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

electron-{24,27,28,29,30,31}-bin: remove (#384809)

parents d69ab0d7 8c7aa317
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
{
  version = "3.6.0";
  version = "3.8.0";
  x86_64-linux = {
    url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.6.0-linux.deb";
    sha256 = "sha256-jUp4Q9tiR/WLkTNHz97j0eE/WwcfFF3ut0S9N4M75Oc=";
    url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.8.0-linux.deb";
    sha256 = "sha256-0smSLq8PAwEWK9yf4GeUjXcKlKVRoqfb+qd8w3ppQqA=";
  };
  x86_64-darwin = {
    url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.6.0-mac.dmg";
    sha256 = "sha256-ZvTig1/fm1GRoOYuTRBiZ8j4CRbZSa95q6a0sxo39Gs=";
    url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.8.0-mac.dmg";
    sha256 = "sha256-lysO25oDNDs86Es2VO3XSafVpZU5mcKAZXEdkn0AHig=";
  };
}
+0 −93
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnBuildHook,
  fetchzip,
  makeWrapper,
  makeDesktopItem,
  electron,
  desktopToDarwinBundle,
  copyDesktopItems,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "micropad";
  version = "4.5.1";

  src = fetchFromGitHub {
    owner = "MicroPad";
    repo = "Micropad-Electron";
    rev = "v${finalAttrs.version}";
    hash = "sha256-z+g+FwmoX4Qqf+v4BVLCtfrXwGiAUFlPLQQhp2CMhLU=";
  };

  # This project can't be built from source currently, because Nixpkgs lacks
  # ecosystem for https://bun.sh
  micropad-core = fetchzip {
    url = "https://github.com/MicroPad/MicroPad-Core/releases/download/v${finalAttrs.version}/micropad.tar.xz";
    hash = "sha256-y13PVA/AKKsc5q7NDwZFasb7fOo+56IW8qbTbsm2WWc=";
  };

  offlineCache = fetchYarnDeps {
    yarnLock = "${finalAttrs.src}/yarn.lock";
    hash = "sha256-ESYSHuHLNsn3EYKIe2p0kg142jyC0USB+Ef//oGeF08=";
  };

  nativeBuildInputs = [
    yarnBuildHook
    copyDesktopItems
    makeWrapper
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ];

  installPhase = ''
    runHook preInstall

    # resources
    mkdir -p "$out/share/"
    cp -r './deps/micropad' "$out/share/micropad"
    ln -s '${finalAttrs.micropad-core}' "$out/share/micropad/core"
    rm "$out/share/micropad/node_modules"
    cp -r './node_modules' "$out/share/micropad"

    # icons
    for icon in $out/share/micropad/build/icons/*.png; do
      mkdir -p "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps"
      ln -s "$icon" "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps/micropad.png"
    done

    # executable wrapper
    makeWrapper '${electron}/bin/electron' "$out/bin/micropad" \
      --add-flags "$out/share/micropad" \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"

    runHook postInstall
  '';

  # Do not attempt generating a tarball for micropad again.
  doDist = false;

  # The desktop item properties should be kept in sync with data from upstream:
  # https://github.com/MicroPad/MicroPad-Electron/blob/master/package.json
  desktopItems = [
    (makeDesktopItem {
      name = "micropad";
      exec = "micropad %u";
      icon = "micropad";
      desktopName = "µPad";
      startupWMClass = "µPad";
      comment = finalAttrs.meta.description;
      categories = [ "Office" ];
    })
  ];

  meta = {
    description = "A powerful note-taking app that helps you organise + take notes without restrictions";
    homepage = "https://getmicropad.com/";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ rhysmdnz ];
    inherit (electron.meta) platforms;
    mainProgram = "micropad";
  };
})
+0 −102
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, appimageTools
, unzip
, makeWrapper
  # Notice: graphs will not sync without matching upstream's major electron version
  #         the specific electron version is set at top-level file to preserve override interface.
  #         whenever updating this package also sync electron version at top-level file.
, electron_27
, autoPatchelfHook
, git
, nix-update-script
}:

stdenv.mkDerivation (finalAttrs:
let
  inherit (finalAttrs) pname version src;
  inherit (stdenv.hostPlatform) system;
  selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}");
  suffix = selectSystem {
    x86_64-linux = "linux-x64-${version}.AppImage";
    x86_64-darwin = "darwin-x64-${version}.zip";
    aarch64-darwin = "darwin-arm64-${version}.zip";
  };
  hash = selectSystem {
    x86_64-linux = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc=";
    x86_64-darwin = "sha256-0i9ozqBSeV/y8v+YEmQkbY0V6JHOv6tKub4O5Fdx2fQ=";
    aarch64-darwin = "sha256-Uvv96XWxpFj14wPH0DwPT+mlf3Z2dy1g/z8iBt5Te7Q=";
  };
in
{
  pname = "logseq";
  version = "0.10.9";
  src = fetchurl {
    inherit hash;
    url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-${suffix}";
    name = lib.optionalString stdenv.hostPlatform.isLinux "logseq-${version}.AppImage";
  };

  nativeBuildInputs = [ makeWrapper ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [ unzip ];
  buildInputs = [ (lib.getLib stdenv.cc.cc) ];

  dontUnpack = stdenv.hostPlatform.isLinux;
  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall
  '' + lib.optionalString stdenv.hostPlatform.isLinux (
    let
      appimageContents = appimageTools.extract { inherit pname src version; };
    in
    ''
      mkdir -p $out/bin $out/share/logseq $out/share/applications
      cp -a ${appimageContents}/{locales,resources} $out/share/logseq
      cp -a ${appimageContents}/Logseq.desktop $out/share/applications/logseq.desktop

      # remove the `git` in `dugite` because we want the `git` in `nixpkgs`
      chmod +w -R $out/share/logseq/resources/app/node_modules/dugite/git
      chmod +w $out/share/logseq/resources/app/node_modules/dugite
      rm -rf $out/share/logseq/resources/app/node_modules/dugite/git
      chmod -w $out/share/logseq/resources/app/node_modules/dugite

      mkdir -p $out/share/pixmaps
      ln -s $out/share/logseq/resources/app/icons/logseq.png $out/share/pixmaps/logseq.png

      substituteInPlace $out/share/applications/logseq.desktop \
        --replace Exec=Logseq Exec=logseq \
        --replace Icon=Logseq Icon=logseq
    ''
  ) + lib.optionalString stdenv.hostPlatform.isDarwin ''
    mkdir -p $out/{Applications/Logseq.app,bin}
    cp -R . $out/Applications/Logseq.app
    makeWrapper $out/Applications/Logseq.app/Contents/MacOS/Logseq $out/bin/logseq
  '' + ''
    runHook postInstall
  '';

  postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
    # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs
    makeWrapper ${electron_27}/bin/electron $out/bin/logseq \
      --set "LOCAL_GIT_DIRECTORY" ${git} \
      --add-flags $out/share/logseq/resources/app \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base";
    homepage = "https://github.com/logseq/logseq";
    changelog = "https://github.com/logseq/logseq/releases/tag/${version}";
    license = lib.licenses.agpl3Plus;
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    maintainers = with lib.maintainers; [ cheeseecake ];
    platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
    mainProgram = "logseq";
  };
})
+0 −76
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  electron_29,
  makeWrapper,
  makeDesktopItem,
  copyDesktopItems,
}:

let
  electron = electron_29;
in
stdenv.mkDerivation rec {
  pname = "passky-desktop";
  version = "8.1.2";

  src = fetchFromGitHub {
    owner = "Rabbit-Company";
    repo = "Passky-Desktop";
    tag = "v${version}";
    sha256 = "sha256-QQ0+qIkDPNCHeWmcF6FkbDrrt/r3fIkNi0dv6XlV1rc=";
  };

  nativeBuildInputs = [
    makeWrapper
    copyDesktopItems
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/passky
    cp -r "." "$out/share/passky/electron"

    local resolution
    for icon in $out/share/passky/electron/images/icons/icon*.png; do
      resolution=''${icon%".png"}
      resolution=''${resolution##*/icon-}
      mkdir -p "$out/share/icons/hicolor/''${resolution}/apps"
      ln -s "$icon" "$out/share/icons/hicolor/''${resolution}/apps/passky.png"
    done

    mkdir "$out/share/applications"
    makeWrapper ${electron}/bin/electron "$out/bin/passky" \
      --add-flags "$out/share/passky/electron/" \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"

    runHook postInstall
  '';

  desktopItems = [
    (makeDesktopItem {
      name = "passky";
      type = "Application";
      desktopName = "Passky";
      comment = "Simple, modern, open source and secure password manager.";
      icon = "passky";
      exec = "passky %U";
      terminal = false;
      categories = [ "Utility" ];
      startupWMClass = "Passky";
    })
  ];

  meta = with lib; {
    description = "Simple, modern, lightweight, open source and secure password manager";
    homepage = "https://passky.org";
    downloadPage = "https://github.com/Rabbit-Company/Passky-Desktop/releases";
    changelog = "https://github.com/Rabbit-Company/Passky-Desktop/releases/tag/v${version}";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ akkesm ];
    mainProgram = "passky";
    platforms = platforms.unix;
  };
}
+0 −66
Original line number Diff line number Diff line
{
    "24": {
        "hashes": {
            "aarch64-darwin": "d9093e6928b2247336b3f0811e4f66c4ae50a719ec9399c393ac9556c8e56cee",
            "aarch64-linux": "599e78a3a8127828ea3fa444927e7e51035dba9811ce0d81d59ad9b0bd02b4f6",
            "armv7l-linux": "8f46901667a904a62df7043991f20dc1c2a00370a42159976855458562cda8fc",
            "headers": "009p1ffh2cyn98fcmprrjzq79jysp7h565v4f54wvjxjsq2nkr97",
            "x86_64-darwin": "067ce05d628b44e1393369c506268915081ac9d96c0973d367262c71dcd91078",
            "x86_64-linux": "61e87bbd361da101c6a8363cc9c1f8b8b51db61b076cf495d3f4424303265a96"
        },
        "version": "24.8.6"
    },
    "27": {
        "hashes": {
            "aarch64-darwin": "a687b199fcb9890f43af90ac8a4d19dc7b15522394de89e42abd5f5c6b735804",
            "aarch64-linux": "ddbfcd5e04450178ca4e3113f776893454822af6757761adc792692f7978e0df",
            "armv7l-linux": "012127a3edf79e0e4623a08e853286e1cba512438a0414b1ab19b75d929c1cf2",
            "headers": "0vrjdvqllfyz09sw2y078mds1di219hnmska8bw8ni7j35wxr2br",
            "x86_64-darwin": "357e70a1c8848d4ac7655346bec98dd18a7c0cee82452a7edf76142017779049",
            "x86_64-linux": "e3a6f55e54e7a623bba1a15016541248408eef5a19ab82a59d19c807aab14563"
        },
        "version": "27.3.11"
    },
    "28": {
        "hashes": {
            "aarch64-darwin": "c310ab098d8849c4aa05f05b1c8521031241a046e023a911f964fd1db31c64c9",
            "aarch64-linux": "f77107266581a6b9880757876518df1c4bf6eeff5c193bb5de0a8f6c9902bd1f",
            "armv7l-linux": "384d8b43f52b5350a438031ad12980418fc244b4b0aecfa5f7dcc3d6f103ebed",
            "headers": "1d407g6yb81l9p0pbsidrsmnzkrwb4f2qb221kc9k2r7qdpf64px",
            "x86_64-darwin": "6bc63916b7fe52de7559e7631fef5c93315a18ee90a0d3d08168c91414b09ecf",
            "x86_64-linux": "20f6be493cbd6c9924206e744b1c490af1f97f4735451b9dc19f0d305366d546"
        },
        "version": "28.3.3"
    },
    "29": {
        "hashes": {
            "aarch64-darwin": "077c7abc2c8f1117863141fb5662684fc1320823e0e0aab6c42ad97bcfcceace",
            "aarch64-linux": "14d5b54ef561cea2ca28c55a877bc1a1a3e360ca2f9e69ab3aa719054eca8552",
            "armv7l-linux": "9007e44a5cb5b7645455e7895d2039d3264cab2eb0ecf8dbb4295344d392ca74",
            "headers": "0swfh30yilw6w0qi6cl6ccm3rdvdmpr5s2vaxy5bbmizc88a4jkv",
            "x86_64-darwin": "9f367006b67a923903e27b0be72a1a578b97936ca36cd91856adf4a278076d67",
            "x86_64-linux": "2346338e2ffa12276f5b3bc6d63ff357c39f42d260ad45f19471ef7bbf18a389"
        },
        "version": "29.4.6"
    },
    "30": {
        "hashes": {
            "aarch64-darwin": "d312544ea29844cf328b44b9dbde12f4fdced90cb442dfca6df36c098dbb6e7a",
            "aarch64-linux": "eb31470c0d7cd6e23e7ce0d89cc93a2356c9dac8bcc997e335353b8aa995afa0",
            "armv7l-linux": "224bd46983e503101c756c72d10b195f14712a7a56438718acb126017dd04edf",
            "headers": "0db38ndw9rrd8ixa14761cbff6ns31b6302bzx5q4in8i4dkrrs3",
            "x86_64-darwin": "faf9dcc20d525607ea205f2f6a1dfe3270f6268aa439bb0ba5646c7e4fbbd842",
            "x86_64-linux": "ec4707783d39e86005f42899e30ae59e50dd5d9c7f28531ed494eb43f2361403"
        },
        "version": "30.5.1"
    },
    "31": {
        "hashes": {
            "aarch64-darwin": "e81b75a185376effcc7dd15aef8877ab48474633e5ac7417810a3b28e694bbfa",
            "aarch64-linux": "21dd1a8c37c7816d3ad945f2fc66fa6c5c56af44b6c06b5280e023ee0a663439",
            "armv7l-linux": "530f0d146f962e7dd101dc08505933e781f21c42f3234e3f0d316a113faccfbc",
            "headers": "1dakbhv1f1cc8zr8rvhjgbmly43db1l1gcf0l8c7yn8h0lb17aq5",
            "x86_64-darwin": "3b08668fe88c47474be23df2c24674d68be79501b5552202462d16078f629bf0",
            "x86_64-linux": "00a2e8e5f52fe39c37cfc9d7bd7629e560017d28ee94c51495bf7e39c84b2d47"
        },
        "version": "31.7.7"
    },
    "32": {
        "hashes": {
            "aarch64-darwin": "f644ac51590a5d2e16318aca9a2ad70f9b5c45cc2edf2524b33d15dd0add4193",
Loading