nixpkgs/pkgs/development/web/insomnia/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
2.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat
2022-02-11 14:08:36 +00:00
, fontconfig, freetype, gdk-pixbuf, glib, pango, mesa, nspr, nss, gtk3
, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
2022-03-15 01:36:54 +00:00
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, nghttp2
, libudev0-shim, glibc, curl, openssl, autoPatchelfHook }:
2018-02-22 19:01:34 +00:00
let
2021-01-23 17:15:07 +00:00
runtimeLibs = lib.makeLibraryPath [
curl
glibc
libudev0-shim
nghttp2
openssl
2023-04-24 01:03:31 +00:00
stdenv.cc.cc.lib
2018-02-22 19:01:34 +00:00
];
in stdenv.mkDerivation rec {
pname = "insomnia";
2023-08-26 05:36:11 +00:00
version = "2023.5.5";
2018-02-22 19:01:34 +00:00
src = fetchurl {
url =
2020-11-10 00:37:50 +00:00
"https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.deb";
2023-08-26 05:36:11 +00:00
sha256 = "sha256-/SrSpkfF3IrLl6BC4UknsTDraqN8uFKrKQSzQpBaRLY=";
2018-02-22 19:01:34 +00:00
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
gobject-introspection
wrapGAppsHook
];
2019-05-22 11:03:39 +00:00
buildInputs = [
alsa-lib
at-spi2-atk
atk
cairo
cups
dbus
expat
fontconfig
freetype
2019-05-22 11:03:39 +00:00
gdk-pixbuf
glib
2020-10-25 19:38:25 +00:00
pango
gtk3
gsettings-desktop-schemas
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libxcb
2022-03-15 01:36:54 +00:00
libxshmfence
2021-04-09 11:27:10 +00:00
mesa # for libgbm
nspr
nss
];
2018-02-22 19:01:34 +00:00
dontBuild = true;
dontConfigure = true;
dontWrapGApps = true;
2018-02-22 19:01:34 +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
2018-02-22 19:01:34 +00:00
'';
preFixup = ''
wrapProgram "$out/bin/insomnia" "''${gappsWrapperArgs[@]}" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
2018-02-22 19:01:34 +00:00
'';
meta = with lib; {
homepage = "https://insomnia.rest/";
2018-02-22 19:01:34 +00:00
description = "The most intuitive cross-platform REST API Client";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
2018-02-22 19:01:34 +00:00
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ markus1189 babariviere ];
2018-02-22 19:01:34 +00:00
};
}