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

91 lines
2.1 KiB
Nix
Raw Normal View History

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