hoppscotch: 24.3.3-1 -> 24.8.1-0 (#340777)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-19 22:39:58 +02:00 committed by GitHub
commit c3c413a5ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,30 +1,35 @@
{ lib {
, stdenv lib,
, fetchurl stdenv,
, appimageTools fetchurl,
, undmg appimageTools,
undmg,
copyDesktopItems,
}: }:
let let
pname = "hoppscotch"; pname = "hoppscotch";
version = "24.3.3-1"; version = "24.8.1-0";
src = fetchurl { src =
aarch64-darwin = { fetchurl
url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_mac_aarch64.dmg"; {
hash = "sha256-litOYRsUOx6VpkA1LPx7aGGagqIVL9fgNsYoP5n/2mo="; aarch64-darwin = {
}; url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_mac_aarch64.dmg";
x86_64-darwin = { hash = "sha256-Tc6lQbMZHX4Wl0R3fGClRr27fFTrYTxMtAkSPCw8mrw=";
url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_mac_x64.dmg"; };
hash = "sha256-UG89Fv9J8SnzPVoIO16LOprxPmZuu/zyox1b+jn+eNw="; x86_64-darwin = {
}; url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_mac_x64.dmg";
x86_64-linux = { hash = "sha256-c3UHntrLRoXfmz8LL3Xu8mjBtyf952/tYMFqbTyECR0=";
url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_linux_x64.AppImage"; };
hash = "sha256-110l1DTyvH2M0ex1r35Q+55NiJ8nYum1KdWQXDvAdxo="; x86_64-linux = {
}; url = "https://github.com/hoppscotch/releases/releases/download/v${version}/Hoppscotch_linux_x64.AppImage";
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); hash = "sha256-Aegc4kiLPtY+hlQtfYR3uztqs8Gj9fbUcAZ1XB8i1Pw=";
};
}
.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
meta = with lib; { meta = {
description = "Open source API development ecosystem"; description = "Open source API development ecosystem";
longDescription = '' longDescription = ''
Hoppscotch is a lightweight, web-based API development suite. It was built Hoppscotch is a lightweight, web-based API development suite. It was built
@ -34,41 +39,56 @@ let
''; '';
homepage = "https://hoppscotch.com"; homepage = "https://hoppscotch.com";
downloadPage = "https://hoppscotch.com/downloads"; downloadPage = "https://hoppscotch.com/downloads";
changelog = "https://hoppscotch.com/changelog"; changelog = "https://github.com/hoppscotch/hoppscotch/releases/tag/2024.8.1";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ DataHearth ]; maintainers = with lib.maintainers; [ DataHearth ];
mainProgram = "hoppscotch"; mainProgram = "hoppscotch";
platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; platforms = [
sourceProvenance = [ sourceTypes.binaryNativeCode ]; "aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
}; };
in in
if stdenv.isDarwin then stdenv.mkDerivation if stdenv.isDarwin then
{ stdenv.mkDerivation {
inherit pname version src meta; inherit
pname
version
src
meta
;
sourceRoot = "."; sourceRoot = ".";
nativeBuildInputs = [ undmg ]; nativeBuildInputs = [ undmg ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p "$out/Applications" mkdir -p "$out/Applications"
mv Hoppscotch.app $out/Applications/ mv Hoppscotch.app $out/Applications/
runHook postInstall runHook postInstall
'';
}
else appimageTools.wrapType2 {
inherit pname version src meta;
extraInstallCommands =
let
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
''
# Install .desktop files
install -Dm444 ${appimageContents}/hoppscotch.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/hoppscotch.png -t $out/share/pixmaps
''; '';
} }
else
appimageTools.wrapType2 {
inherit
pname
version
src
meta
;
extraInstallCommands =
let
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
''
# Install .desktop files
install -Dm444 ${appimageContents}/hoppscotch.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/hoppscotch.png -t $out/share/pixmaps
'';
}