2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, lib, gnome2, fetchurl, pkgs, xorg, makeWrapper, makeDesktopItem }:
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "postman-${version}";
|
2018-08-23 10:19:35 +00:00
|
|
|
version = "6.2.5";
|
2018-02-11 17:34:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
2018-08-23 10:19:35 +00:00
|
|
|
sha256 = "9fd52b4c4ac744d3c70f28e39dbfeda3d03a8640c562e82e3744c2f9d0f8ade1";
|
2018-02-11 17:34:40 +00:00
|
|
|
name = "${name}.tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
buildPhase = ":"; # nothing to build
|
|
|
|
|
|
|
|
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";
|
|
|
|
categories = "Application;Development;";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/postman
|
2018-07-29 20:05:04 +00:00
|
|
|
cp -R app/* $out/share/postman
|
2018-02-19 20:47:36 +00:00
|
|
|
|
2018-02-11 17:34:40 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
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
|
|
|
|
|
|
|
iconDir=$out/share/icons/hicolor/128x128/apps
|
|
|
|
mkdir -p $iconDir
|
|
|
|
ln -s $out/share/postman/resources/app/assets/icon.png $iconDir/postman.png
|
2018-02-11 17:34:40 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
gnome2.pango
|
|
|
|
gnome2.GConf
|
|
|
|
pkgs.atk
|
|
|
|
pkgs.alsaLib
|
|
|
|
pkgs.cairo
|
|
|
|
pkgs.cups
|
2018-07-22 02:03:24 +00:00
|
|
|
pkgs.dbus.daemon.lib
|
2018-02-11 17:34:40 +00:00
|
|
|
pkgs.expat
|
|
|
|
pkgs.gdk_pixbuf
|
|
|
|
pkgs.glib
|
|
|
|
pkgs.gtk2-x11
|
|
|
|
pkgs.freetype
|
|
|
|
pkgs.fontconfig
|
|
|
|
pkgs.nss
|
|
|
|
pkgs.nspr
|
|
|
|
pkgs.udev.lib
|
2018-03-13 10:16:03 +00:00
|
|
|
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
|
2018-02-11 17:34:40 +00:00
|
|
|
];
|
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.getpostman.com;
|
|
|
|
description = "API Development Environment";
|
|
|
|
license = stdenv.lib.licenses.postman;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ xurei ];
|
|
|
|
};
|
|
|
|
}
|