mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 20:14:37 +00:00
Merge pull request #307571 from DataHearth/update/app/insomnia-8.6.1-9.0.0
insomnia: 8.6.1 -> 9.0.0
This commit is contained in:
commit
7b1e0230a0
@ -4580,9 +4580,14 @@
|
||||
github = "DataHearth";
|
||||
githubId = 28595242;
|
||||
name = "DataHearth";
|
||||
keys = [{
|
||||
fingerprint = "A129 2547 0298 BFEE 7EE0 92B3 946E 2D0C 410C 7B3D";
|
||||
}];
|
||||
keys = [
|
||||
{
|
||||
fingerprint = "A129 2547 0298 BFEE 7EE0 92B3 946E 2D0C 410C 7B3D";
|
||||
}
|
||||
{
|
||||
fingerprint = "FFC4 92C1 5320 B05D 0F8D 7D58 ABF6 737C 6339 6D35";
|
||||
}
|
||||
];
|
||||
};
|
||||
davegallant = {
|
||||
name = "Dave Gallant";
|
||||
|
@ -1,100 +1,75 @@
|
||||
{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat
|
||||
, fontconfig, freetype, gdk-pixbuf, glib, pango, mesa, nspr, nss, gtk3
|
||||
, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook3
|
||||
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
|
||||
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, nghttp2
|
||||
, libudev0-shim, glibc, curl, openssl, autoPatchelfHook }:
|
||||
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
appimageTools
|
||||
}:
|
||||
let
|
||||
runtimeLibs = lib.makeLibraryPath [
|
||||
curl
|
||||
glibc
|
||||
libudev0-shim
|
||||
nghttp2
|
||||
openssl
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "insomnia";
|
||||
version = "8.6.1";
|
||||
version = "9.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.deb";
|
||||
hash = "sha256-qy2j6kdmtDgfTab8gTz7eb/uNKwtzbxcoJHNibVa35c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
dpkg
|
||||
makeWrapper
|
||||
gobject-introspection
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
atk
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
glib
|
||||
pango
|
||||
gtk3
|
||||
gsettings-desktop-schemas
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libXrender
|
||||
libXtst
|
||||
libxcb
|
||||
libxshmfence
|
||||
mesa # for libgbm
|
||||
nspr
|
||||
nss
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
dontWrapGApps = true;
|
||||
|
||||
unpackPhase = "dpkg-deb -x $src .";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/insomnia $out/lib $out/bin
|
||||
|
||||
mv usr/share/* $out/share/
|
||||
mv opt/Insomnia/* $out/share/insomnia
|
||||
|
||||
ln -s $out/share/insomnia/insomnia $out/bin/insomnia
|
||||
sed -i 's|\/opt\/Insomnia|'$out'/bin|g' $out/share/applications/insomnia.desktop
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapProgramShell "$out/bin/insomnia" \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
|
||||
--prefix LD_LIBRARY_PATH : ${runtimeLibs}
|
||||
'';
|
||||
x86_64-darwin = {
|
||||
url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.dmg";
|
||||
hash = "sha256-QIArPdThQcNTUgrXpWP8JHaZfrZ/6ztekIvzFdoWjsY=";
|
||||
};
|
||||
x86_64-linux = {
|
||||
url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.AppImage";
|
||||
hash = "sha256-2UiqopYmNxnDcIqQMn/H89ugvOtTWkHH4LrmKkQErSs=";
|
||||
};
|
||||
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://insomnia.rest/";
|
||||
description = "The most intuitive cross-platform REST API Client";
|
||||
homepage = "https://insomnia.rest";
|
||||
description = " The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage. ";
|
||||
mainProgram = "insomnia";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.mit;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ markus1189 babariviere kashw2 ];
|
||||
changelog = "https://github.com/Kong/insomnia/releases/tag/core@${version}";
|
||||
license = licenses.asl20;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
maintainers = with maintainers; [ markus1189 babariviere kashw2 DataHearth ];
|
||||
};
|
||||
in
|
||||
if stdenv.isDarwin then stdenv.mkDerivation {
|
||||
inherit pname version src meta;
|
||||
sourceRoot = ".";
|
||||
|
||||
unpackCmd = ''
|
||||
echo "Creating temp directory"
|
||||
mnt=$(TMPDIR=/tmp mktemp -d -t nix-XXXXXXXXXX)
|
||||
function finish {
|
||||
echo "Ejecting temp directory"
|
||||
/usr/bin/hdiutil detach $mnt -force
|
||||
rm -rf $mnt
|
||||
}
|
||||
# Detach volume when receiving SIG "0"
|
||||
trap finish EXIT
|
||||
# Mount DMG file
|
||||
echo "Mounting DMG file into \"$mnt\""
|
||||
/usr/bin/hdiutil attach -nobrowse -mountpoint $mnt $curSrc
|
||||
# Copy content to local dir for later use
|
||||
echo 'Copying extracted content into "sourceRoot"'
|
||||
cp -a $mnt/Insomnia.app $PWD/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/Applications"
|
||||
mv Insomnia.app $out/Applications/
|
||||
runHook postInstall
|
||||
'';
|
||||
} else appimageTools.wrapType2 {
|
||||
inherit pname version src meta;
|
||||
|
||||
extraInstallCommands = let
|
||||
appimageContents = appimageTools.extract {
|
||||
inherit pname version src;
|
||||
};
|
||||
in ''
|
||||
# Install XDG Desktop file and its icon
|
||||
install -Dm444 ${appimageContents}/insomnia.desktop -t $out/share/applications
|
||||
install -Dm444 ${appimageContents}/insomnia.png -t $out/share/pixmaps
|
||||
# Replace wrong exec statement in XDG Desktop file
|
||||
substituteInPlace $out/share/applications/insomnia.desktop \
|
||||
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=insomnia'
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user