Unverified Commit 17572dd7 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #266345 from WolfangAukang/indiepass-desktop

indiepass-desktop: init at unstable-2023-05-19
parents 951ef60b 0eb84808
Loading
Loading
Loading
Loading
+0 −55
Original line number Diff line number Diff line
{ stdenv, lib, fetchurl, unzip, makeDesktopItem, copyDesktopItems
, makeWrapper, electron }:

stdenv.mkDerivation rec {
  pname = "indigenous-desktop";
  version = "1.3.0";

  src = fetchurl {
    url = "https://github.com/marksuth/indigenous-desktop/releases/download/v${version}/indigenous-linux-x64-${version}.zip";
    sha256 = "sha256-1nqj9N5RQE0PogJSULu75CTVLHeQsHIimtFXSCP6SPA=";
  };

  nativeBuildInputs = [
    copyDesktopItems
    makeWrapper
    unzip
  ];

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      exec = "indigenous-desktop";
      icon = "indigenous-desktop";
      comment = meta.description;
      desktopName = "Indigenous";
      genericName = "Feed Reader";
    })
  ];

  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/opt/indigenous $out/share/indigenous $out/share/pixmaps
    cp -r ./ $out/opt/indigenous
    mv $out/opt/indigenous/{locales,resources} $out/share/indigenous
    mv $out/share/indigenous/resources/app/images/icon.png $out/share/pixmaps/indigenous-desktop.png

    makeWrapper ${electron}/bin/electron $out/bin/indigenous-desktop \
      --add-flags $out/share/indigenous/resources/app

    runHook postInstall
  '';

  meta = with lib; {
    description = "IndieWeb app with extensions for sharing to/reading from micropub endpoints";
    homepage = "https://indigenous.realize.be/indigenous-desktop";
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ wolfangaukang ];
    platforms = [ "x86_64-linux" ];
  };
}
+58 −0
Original line number Diff line number Diff line
{ lib
, buildNpmPackage
, fetchFromGitHub
, makeDesktopItem
, copyDesktopItems
, makeWrapper
, electron
}:

buildNpmPackage rec {
  pname = "indiepass-desktop";
  version = "1.4.0-unstable-2023-05-19";

  src = fetchFromGitHub {
    owner = "indiepass";
    repo = "indiepass-desktop";
    rev = "751660324d6bfc6f95af08bf9bc92e892841f2b2";
    hash = "sha256-cQqL8eNb23NFMWrK9xh6bZcr0EoYbyJiid+xXQRPqMk=";
  };

  npmDepsHash = "sha256-gp77eDxturBib0JRNVNSd+nDxQyVTJVKEj4ydB7eICE=";

  env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";

  dontNpmBuild = true;

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      exec = "indiepass";
      icon = "indiepass";
      comment = meta.description;
      desktopName = "Indiepass";
      genericName = "Feed Reader";
    })
  ];

  nativeBuildInputs = [
    copyDesktopItems
    makeWrapper
  ];

  postInstall = ''
    install -Dm 644 $out/lib/node_modules/indiepass/images/icon.png $out/share/pixmaps/indiepass.png

    makeWrapper ${electron}/bin/electron $out/bin/indiepass \
      --add-flags $out/lib/node_modules/indiepass/main.js
  '';

  meta = with lib; {
    description = "IndieWeb app with extensions for sharing to/reading from micropub endpoints";
    homepage = "https://github.com/IndiePass/indiepass-desktop";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ wolfangaukang ];
    mainProgram = "indiepass";
    platforms = [ "x86_64-linux" ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -393,6 +393,7 @@ mapAliases ({
  imagemagick7 = imagemagick; # Added 2021-02-22
  imagemagick7_light = imagemagick_light; # Added 2021-02-22
  imlib = throw "imlib has been dropped due to the lack of maintenance from upstream since 2004"; # Added 2023-01-04
  indigenous-desktop = throw "'indigenous-desktop' has been renamed to/replaced by 'indiepass-desktop'"; # Added 2023-11-08
  instead-launcher = throw "instead-launcher has been removed, because it depended on qt4"; # Added 2023-07-26
  insync-v3 = throw "insync-v3 has been merged into the insync package; use insync instead"; #Added 2023-05-13
  index-fm = libsForQt5.mauiPackages.index; # added 2022-05-17
+3 −1
Original line number Diff line number Diff line
@@ -32499,7 +32499,9 @@ with pkgs;
  hypnotix = callPackage ../applications/video/hypnotix { };
  indigenous-desktop = callPackage ../applications/networking/feedreaders/indigenous-desktop { };
  indiepass-desktop = callPackage ../by-name/in/indiepass-desktop/package.nix {
    electron = electron_19;
  };
  jackline = callPackage ../applications/networking/instant-messengers/jackline { };