mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
postman: 7.0.7 -> 7.6.0
- Remove gnome2 (#39976) - Use pango instead of gnome2.pango - Remove gnome2.GConf - Remove gtk2-x11 - Add at-spi2-atk dependency - Explicitly import packages rather than just pkgs or xorg - Refactor patchelf to be more generic - Use wrapGAppsHook - As this app uses GTK3 for the UI, we need to use wrapGAppsHook - Move libPath creation to postFixup - Remove dontPatchELF - Remove unnecessary Postman binary, only use _Postman - Remove unnecessary makeWrapper - Add dontConfigure - Remove unnecessary lib - Move libPath inputs to buildInputs
This commit is contained in:
parent
539d66aef6
commit
abd41c3f68
@ -1,20 +1,22 @@
|
||||
{ stdenv, lib, gnome2, fetchurl, pkgs, xorg, makeWrapper, makeDesktopItem }:
|
||||
{ stdenv, fetchurl, makeDesktopItem, wrapGAppsHook
|
||||
, atk, at-spi2-atk, alsaLib, cairo, cups, dbus, expat, gdk-pixbuf, glib, gtk3
|
||||
, freetype, fontconfig, nss, nspr, pango, udev, libX11, libxcb, libXi
|
||||
, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes
|
||||
, libXrender, libXtst, libXScrnSaver
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "postman";
|
||||
version = "7.0.7";
|
||||
version = "7.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
||||
sha256 = "47be1b955759520f3a2c7dcdecb85b4c52c38df717da294ba184f46f2058014a";
|
||||
name = "${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256:03y82ydkj46l7dn35y944gnghbrrhc75y3yxdyidbh8fl3xvmlfv";
|
||||
name = "${pname}.tar.gz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
dontPatchELF = true;
|
||||
|
||||
buildPhase = ":"; # nothing to build
|
||||
dontBuild = true; # nothing to build
|
||||
dontConfigure = true;
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "postman";
|
||||
@ -26,12 +28,48 @@ stdenv.mkDerivation rec {
|
||||
categories = "Application;Development;";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.cc.lib
|
||||
atk
|
||||
at-spi2-atk
|
||||
alsaLib
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
freetype
|
||||
fontconfig
|
||||
nss
|
||||
nspr
|
||||
pango
|
||||
udev
|
||||
libX11
|
||||
libxcb
|
||||
libXi
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXrandr
|
||||
libXcomposite
|
||||
libXext
|
||||
libXfixes
|
||||
libXrender
|
||||
libXtst
|
||||
libXScrnSaver
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/postman
|
||||
cp -R app/* $out/share/postman
|
||||
rm $out/share/postman/Postman
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/share/postman/Postman $out/bin/postman
|
||||
ln -s $out/share/postman/_Postman $out/bin/postman
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
||||
@ -43,54 +81,20 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/share/postman/resources/app/assets/icon.png $iconSizeDir/postman.png
|
||||
'';
|
||||
|
||||
preFixup = let
|
||||
libPath = lib.makeLibraryPath [
|
||||
stdenv.cc.cc.lib
|
||||
gnome2.pango
|
||||
gnome2.GConf
|
||||
pkgs.atk
|
||||
pkgs.alsaLib
|
||||
pkgs.cairo
|
||||
pkgs.cups
|
||||
pkgs.dbus.daemon.lib
|
||||
pkgs.expat
|
||||
pkgs.gdk-pixbuf
|
||||
pkgs.glib
|
||||
pkgs.gtk2-x11
|
||||
pkgs.freetype
|
||||
pkgs.fontconfig
|
||||
pkgs.nss
|
||||
pkgs.nspr
|
||||
pkgs.udev.lib
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
xorg.libXi
|
||||
xorg.libXcursor
|
||||
xorg.libXdamage
|
||||
xorg.libXrandr
|
||||
xorg.libXcomposite
|
||||
xorg.libXext
|
||||
xorg.libXfixes
|
||||
xorg.libXrender
|
||||
xorg.libX11
|
||||
xorg.libXtst
|
||||
xorg.libXScrnSaver
|
||||
];
|
||||
in ''
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libPath}:$out/share/postman" \
|
||||
$out/share/postman/Postman
|
||||
patchelf --set-rpath "${libPath}" $out/share/postman/libnode.so
|
||||
patchelf --set-rpath "${libPath}" $out/share/postman/libffmpeg.so
|
||||
|
||||
wrapProgram $out/share/postman/Postman --prefix LD_LIBRARY_PATH : ${libPath}
|
||||
postFixup = ''
|
||||
pushd $out/share/postman
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" _Postman
|
||||
for file in $(find . -type f \( -name \*.node -o -name _Postman -o -name \*.so\* \) ); do
|
||||
ORIGIN=$(patchelf --print-rpath $file); \
|
||||
patchelf --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}:$ORIGIN" $file
|
||||
done
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.getpostman.com;
|
||||
description = "API Development Environment";
|
||||
license = stdenv.lib.licenses.postman;
|
||||
license = licenses.postman;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ xurei ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user