2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeDesktopItem, wrapGAppsHook
|
2020-07-01 11:23:44 +00:00
|
|
|
, atk, at-spi2-atk, at-spi2-core, alsaLib, cairo, cups, dbus, expat, gdk-pixbuf, glib, gtk3
|
|
|
|
, freetype, fontconfig, nss, nspr, pango, udev, libuuid, libX11, libxcb, libXi
|
2019-09-05 23:24:31 +00:00
|
|
|
, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes
|
2021-05-13 15:09:41 +00:00
|
|
|
, libXrender, libXtst, libXScrnSaver, libdrm, mesa
|
2019-09-05 23:24:31 +00:00
|
|
|
}:
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "postman";
|
2021-05-13 15:09:41 +00:00
|
|
|
version = "8.4.0";
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
2021-05-13 15:09:41 +00:00
|
|
|
sha256 = "040l0g6m8lmjrm0wvq8z13xyddasz7v95v54d658w14gv0n713vw";
|
2019-09-05 23:24:31 +00:00
|
|
|
name = "${pname}.tar.gz";
|
2018-02-11 17:34:40 +00:00
|
|
|
};
|
|
|
|
|
2019-09-05 23:24:31 +00: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 20:05:04 +00:00
|
|
|
icon = "postman";
|
2018-02-11 17:34:40 +00:00
|
|
|
comment = "API Development Environment";
|
|
|
|
desktopName = "Postman";
|
|
|
|
genericName = "Postman";
|
2020-06-25 02:18:37 +00:00
|
|
|
categories = "Development;";
|
2018-02-11 17:34:40 +00:00
|
|
|
};
|
|
|
|
|
2019-09-05 23:24:31 +00:00
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
atk
|
|
|
|
at-spi2-atk
|
2020-07-01 11:23:44 +00:00
|
|
|
at-spi2-core
|
2019-09-05 23:24:31 +00:00
|
|
|
alsaLib
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
freetype
|
|
|
|
fontconfig
|
2021-05-13 15:09:41 +00:00
|
|
|
mesa
|
2019-09-05 23:24:31 +00:00
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
pango
|
|
|
|
udev
|
2021-05-13 15:09:41 +00:00
|
|
|
libdrm
|
2020-07-01 11:23:44 +00:00
|
|
|
libuuid
|
2019-09-05 23:24:31 +00:00
|
|
|
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 20:05:04 +00:00
|
|
|
cp -R app/* $out/share/postman
|
2019-09-05 23:24:31 +00: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-05 23:24:31 +00: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 20:05:04 +00:00
|
|
|
|
2019-04-03 17:50:36 +00: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-05 23:24:31 +00: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); \
|
2021-01-23 17:15:07 +00:00
|
|
|
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}:$ORIGIN" $file
|
2019-09-05 23:24:31 +00:00
|
|
|
done
|
|
|
|
popd
|
2018-02-11 17:34:40 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-11 13:42:33 +00:00
|
|
|
homepage = "https://www.getpostman.com";
|
2018-02-11 17:34:40 +00:00
|
|
|
description = "API Development Environment";
|
2019-09-05 23:24:31 +00:00
|
|
|
license = licenses.postman;
|
2018-02-11 17:34:40 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-09-05 23:24:48 +00:00
|
|
|
maintainers = with maintainers; [ xurei evanjs ];
|
2018-02-11 17:34:40 +00:00
|
|
|
};
|
|
|
|
}
|