forked from mirrors/nixpkgs
5ba34b84e5
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/insomnia/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/98c4q9sy1qvxivk5f5svimhm4q6il3d9-insomnia-5.16.6/bin/.insomnia-wrapped had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/98c4q9sy1qvxivk5f5svimhm4q6il3d9-insomnia-5.16.6/bin/insomnia had a zero exit code or showed the expected version - 0 of 2 passed binary check by having a zero exit code. - 0 of 2 passed binary check by having the new version present in output. - found 5.16.6 with grep in /nix/store/98c4q9sy1qvxivk5f5svimhm4q6il3d9-insomnia-5.16.6 - directory tree listing: https://gist.github.com/b7175aec2a35af15cb56818c93443ad6 - du listing: https://gist.github.com/f6cf98c261dda8a0b0415186ee6963a9
64 lines
2 KiB
Nix
64 lines
2 KiB
Nix
{ stdenv, lib, makeWrapper, fetchurl, dpkg
|
|
, alsaLib, atk, cairo, cups, dbus_daemon, expat, fontconfig, freetype
|
|
, gdk_pixbuf, glib, gnome2, gtk2-x11, nspr, nss
|
|
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
|
|
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, nghttp2
|
|
, libudev0-shim, glibc, curl, openssl
|
|
}:
|
|
|
|
let
|
|
libPath = lib.makeLibraryPath [
|
|
alsaLib atk cairo cups dbus_daemon.lib expat fontconfig freetype gdk_pixbuf glib gnome2.GConf gnome2.pango
|
|
gtk2-x11 nspr nss stdenv.cc.cc.lib libX11 libXScrnSaver libXcomposite libXcursor libXdamage libXext libXfixes
|
|
libXi libXrandr libXrender libXtst libxcb
|
|
];
|
|
runtimeLibs = lib.makeLibraryPath [ libudev0-shim glibc curl openssl nghttp2 ];
|
|
in stdenv.mkDerivation rec {
|
|
name = "insomnia-${version}";
|
|
version = "5.16.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/getinsomnia/insomnia/releases/download/v${version}/insomnia_${version}_amd64.deb";
|
|
sha256 = "1acad6gjrldd87nnv2hw558lzwy4c4ijh9jwjxnhz61jmdqvbmxw";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper dpkg ];
|
|
|
|
buildPhase = ":";
|
|
|
|
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 = ''
|
|
for lib in $out/lib/*.so; do
|
|
patchelf --set-rpath "$out/lib:${libPath}" $lib
|
|
done
|
|
|
|
for bin in $out/bin/insomnia; do
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
--set-rpath "$out/lib:${libPath}" \
|
|
$bin
|
|
done
|
|
|
|
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 = stdenv.lib.licenses.mit;
|
|
platforms = [ "x86_64-linux" ];
|
|
maintainers = with maintainers; [ markus1189 ];
|
|
};
|
|
|
|
}
|