mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 00:53:57 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
93 lines
2.1 KiB
Nix
93 lines
2.1 KiB
Nix
{ lib, stdenv, makeWrapper, fetchurl, dpkg, alsaLib, atk, cairo, cups, dbus, expat
|
|
, fontconfig, freetype, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, gtk2
|
|
, 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 }:
|
|
|
|
let
|
|
runtimeLibs = stdenv.lib.makeLibraryPath [
|
|
curl
|
|
glibc
|
|
libudev0-shim
|
|
nghttp2
|
|
openssl
|
|
stdenv.cc.cc
|
|
];
|
|
in stdenv.mkDerivation rec {
|
|
pname = "insomnia";
|
|
version = "2020.5.2";
|
|
|
|
src = fetchurl {
|
|
url =
|
|
"https://github.com/Kong/insomnia/releases/download/core%40${version}/Insomnia.Core-${version}.deb";
|
|
sha256 = "03j76a0dj3ak5h6malwxqf7cdc2ycwgyr6993bhiq75yhxhblhc4";
|
|
};
|
|
|
|
nativeBuildInputs =
|
|
[ autoPatchelfHook dpkg makeWrapper gobject-introspection wrapGAppsHook ];
|
|
|
|
buildInputs = [
|
|
alsaLib
|
|
at-spi2-atk
|
|
atk
|
|
cairo
|
|
cups
|
|
dbus
|
|
expat
|
|
fontconfig
|
|
freetype
|
|
gdk-pixbuf
|
|
glib
|
|
gnome2.GConf
|
|
pango
|
|
gtk2
|
|
gtk3
|
|
gsettings-desktop-schemas
|
|
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
|
|
sed -i 's|\/opt\/Insomnia|'$out'/bin|g' $out/share/applications/insomnia.desktop
|
|
'';
|
|
|
|
preFixup = ''
|
|
wrapProgram "$out/bin/insomnia" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
|
|
'';
|
|
|
|
meta = with 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 babariviere ];
|
|
};
|
|
|
|
}
|