2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat
|
2022-02-20 05:27:41 +00:00
|
|
|
, fontconfig, freetype, gdk-pixbuf, glib, pango, mesa, nspr, nss, gtk3
|
2020-04-24 23:36:52 +00:00
|
|
|
, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook
|
|
|
|
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
|
2022-03-30 09:31:56 +00:00
|
|
|
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, nghttp2
|
2020-04-24 23:36:52 +00:00
|
|
|
, libudev0-shim, glibc, curl, openssl, autoPatchelfHook }:
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
runtimeLibs = lib.makeLibraryPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
curl
|
|
|
|
glibc
|
|
|
|
libudev0-shim
|
|
|
|
nghttp2
|
|
|
|
openssl
|
2023-05-24 13:37:59 +00:00
|
|
|
stdenv.cc.cc.lib
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "insomnia";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2023.5.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.deb";
|
|
|
|
sha256 = "sha256-XB8ktjF6VWj57whbXC0iwH3WpuMkGnRZCCdx86Mj2ZI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
makeWrapper
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
at-spi2-atk
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
2020-10-27 00:29:36 +00:00
|
|
|
pango
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk3
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
libX11
|
|
|
|
libXScrnSaver
|
|
|
|
libXcomposite
|
|
|
|
libXcursor
|
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libXtst
|
|
|
|
libxcb
|
2022-03-30 09:31:56 +00:00
|
|
|
libxshmfence
|
2021-04-26 19:14:03 +00:00
|
|
|
mesa # for libgbm
|
2020-04-24 23:36:52 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
dontWrapGApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapProgramShell "$out/bin/insomnia" \
|
|
|
|
"''${gappsWrapperArgs[@]}" \
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${runtimeLibs}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://insomnia.rest/";
|
|
|
|
description = "The most intuitive cross-platform REST API Client";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ markus1189 babariviere kashw2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|