2019-09-06 00:24:31 +01:00
|
|
|
{ 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
|
|
|
|
}:
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "postman";
|
2019-11-02 20:05:32 +00:00
|
|
|
version = "7.10.0";
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
2019-11-02 20:05:32 +00:00
|
|
|
sha256 = "0k8np71p414407hvcw149gspvdgyadnmpvfdxwwkr3pydj70vn6f";
|
2019-09-06 00:24:31 +01:00
|
|
|
name = "${pname}.tar.gz";
|
2018-02-11 17:34:40 +00:00
|
|
|
};
|
|
|
|
|
2019-09-06 00:24:31 +01:00
|
|
|
dontBuild = true; # nothing to build
|
|
|
|
dontConfigure = true;
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "postman";
|
|
|
|
exec = "postman";
|
2018-07-29 21:05:04 +01:00
|
|
|
icon = "postman";
|
2018-02-11 17:34:40 +00:00
|
|
|
comment = "API Development Environment";
|
|
|
|
desktopName = "Postman";
|
|
|
|
genericName = "Postman";
|
|
|
|
categories = "Application;Development;";
|
|
|
|
};
|
|
|
|
|
2019-09-06 00:24:31 +01:00
|
|
|
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 ];
|
|
|
|
|
|
|
|
|
2018-02-11 17:34:40 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/postman
|
2018-07-29 21:05:04 +01:00
|
|
|
cp -R app/* $out/share/postman
|
2019-09-06 00:24:31 +01:00
|
|
|
rm $out/share/postman/Postman
|
2018-02-19 20:47:36 +00:00
|
|
|
|
2018-02-11 17:34:40 +00:00
|
|
|
mkdir -p $out/bin
|
2019-09-06 00:24:31 +01:00
|
|
|
ln -s $out/share/postman/_Postman $out/bin/postman
|
2018-02-19 20:47:36 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
2018-02-11 17:34:40 +00:00
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
2018-07-29 21:05:04 +01:00
|
|
|
|
2019-04-03 18:50:36 +01:00
|
|
|
iconRootDir=$out/share/icons
|
|
|
|
iconSizeDir=$out/share/icons/hicolor/128x128/apps
|
|
|
|
mkdir -p $iconSizeDir
|
|
|
|
ln -s $out/share/postman/resources/app/assets/icon.png $iconRootDir/postman.png
|
|
|
|
ln -s $out/share/postman/resources/app/assets/icon.png $iconSizeDir/postman.png
|
2018-02-11 17:34:40 +00:00
|
|
|
'';
|
|
|
|
|
2019-09-06 00:24:31 +01:00
|
|
|
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
|
2018-02-11 17:34:40 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.getpostman.com;
|
|
|
|
description = "API Development Environment";
|
2019-09-06 00:24:31 +01:00
|
|
|
license = licenses.postman;
|
2018-02-11 17:34:40 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-09-06 00:24:48 +01:00
|
|
|
maintainers = with maintainers; [ xurei evanjs ];
|
2018-02-11 17:34:40 +00:00
|
|
|
};
|
|
|
|
}
|