1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 07:04:28 +00:00
nixpkgs/pkgs/development/web/insomnia/default.nix
worldofpeace f591dd2fdf
insomnia: 6.0.2 -> 6.2.0 (#50906)
- Switch to using autoPatchelfHook
- Add some new deps needed for this version

In particular the application won't function without `stdenv.cc.cc`
in LD_LIBRARY_PATH.
2018-11-23 02:50:02 -05:00

94 lines
1.9 KiB
Nix

{ stdenv, makeWrapper, fetchurl, dpkg
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype
, gdk_pixbuf, glib, gnome2, nspr, nss, gtk3, gtk2, at-spi2-atk
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, nghttp2
, libudev0-shim, glibc, curl, openssl, autoPatchelfHook
}:
let
runtimeLibs = stdenv.lib.makeLibraryPath [
curl
glibc
libudev0-shim
nghttp2
openssl
stdenv.cc.cc
];
in stdenv.mkDerivation rec {
name = "insomnia-${version}";
version = "6.2.0";
src = fetchurl {
url = "https://github.com/getinsomnia/insomnia/releases/download/v${version}/insomnia_${version}_amd64.deb";
sha256 = "1wxgcriszsbgpicaj4h1ycyykgwsjr8m7x5xi02y5bs5k6l7gcva";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
];
buildInputs = [
alsaLib
at-spi2-atk
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk_pixbuf
glib
gnome2.GConf
gnome2.pango
gtk2
gtk3
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libxcb
nspr
nss
stdenv.cc.cc
];
dontBuild = true;
dontConfigure = 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
mv $out/share/insomnia/*.so $out/lib/
ln -s $out/share/insomnia/insomnia $out/bin/insomnia
'';
preFixup = ''
wrapProgram "$out/bin/insomnia" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
'';
meta = with stdenv.lib; {
homepage = https://insomnia.rest/;
description = "The most intuitive cross-platform REST API Client";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ markus1189 ];
};
}