2022-04-03 18:54:34 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
|
|
|
, wrapGAppsHook
|
|
|
|
, atk
|
|
|
|
, at-spi2-atk
|
|
|
|
, at-spi2-core
|
|
|
|
, alsa-lib
|
|
|
|
, 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
|
|
|
|
, libxkbcommon
|
|
|
|
, libdrm
|
|
|
|
, mesa
|
|
|
|
, xorg
|
|
|
|
, pname
|
|
|
|
, version
|
|
|
|
, meta
|
|
|
|
, copyDesktopItems
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit pname version meta;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "118da102904cd7b04c50d3e2c2daac3fc1228f05e541eacef55e8ecbf73d3896";
|
2022-04-03 18:54:34 +00:00
|
|
|
name = "${pname}.tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(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
|
|
|
|
alsa-lib
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
mesa
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
pango
|
|
|
|
udev
|
|
|
|
libdrm
|
|
|
|
libuuid
|
|
|
|
libX11
|
|
|
|
libxcb
|
|
|
|
libXi
|
|
|
|
libXcursor
|
|
|
|
libXdamage
|
|
|
|
libXrandr
|
|
|
|
libXcomposite
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXrender
|
|
|
|
libXtst
|
|
|
|
libXScrnSaver
|
|
|
|
libxkbcommon
|
|
|
|
xorg.libxshmfence
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook copyDesktopItems ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
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/icons/hicolor/128x128/apps
|
|
|
|
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/postman.png
|
|
|
|
ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/hicolor/128x128/apps/postman.png
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 "${lib.makeLibraryPath buildInputs}:$ORIGIN" $file
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
}
|