mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
104 lines
2.5 KiB
Nix
104 lines
2.5 KiB
Nix
{ stdenv, fetchurl, makeDesktopItem, wrapGAppsHook
|
|
, 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
|
|
, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes
|
|
, libXrender, libXtst, libXScrnSaver
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "postman";
|
|
version = "7.34.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
|
sha256 = "13d3wc49wp8rh8kxrn1krsyh24g5m6wl0mfhvbjylv0q6kp5jlan";
|
|
name = "${pname}.tar.gz";
|
|
};
|
|
|
|
dontBuild = true; # nothing to build
|
|
dontConfigure = true;
|
|
|
|
desktopItem = makeDesktopItem {
|
|
name = "postman";
|
|
exec = "postman";
|
|
icon = "postman";
|
|
comment = "API Development Environment";
|
|
desktopName = "Postman";
|
|
genericName = "Postman";
|
|
categories = "Development;";
|
|
};
|
|
|
|
buildInputs = [
|
|
stdenv.cc.cc.lib
|
|
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
|
|
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
|
|
|
|
mkdir -p $out/share/applications
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
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
|
|
'';
|
|
|
|
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 = licenses.postman;
|
|
platforms = [ "x86_64-linux" ];
|
|
maintainers = with maintainers; [ xurei evanjs ];
|
|
};
|
|
}
|