40 # It's unknown which version of openssl that postman expects but it seems that
41 # OpenSSL 3+ seems to work fine (cf.
42 # https://github.com/NixOS/nixpkgs/issues/254325). If postman breaks apparently
43 # around OpenSSL stuff then try changing this dependency version.
57 sha256 = "sha256-yq2J5KRv/NJDaQG7e7RKyzbJqKWRolSU9X6khHxlrNo=";
62 sha256 = "sha256-fAaxrLZSXGBYr4Vu0Cz2pZwXivSTkaIF5wL217cB9qM=";
64 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
67 stdenv.mkDerivation rec {
68 inherit pname version meta;
71 url = "https://dl.pstmn.io/download/version/${version}/linux${dist.arch}";
72 inherit (dist) sha256;
73 name = "${pname}-${version}.tar.gz";
83 comment = "API Development Environment";
84 desktopName = "Postman";
85 genericName = "Postman";
86 categories = [ "Development" ];
91 (lib.getLib stdenv.cc.cc)
129 nativeBuildInputs = [ wrapGAppsHook3 copyDesktopItems ];
133 mkdir -p $out/share/postman
134 cp -R app/* $out/share/postman
135 rm $out/share/postman/Postman
138 ln -s $out/share/postman/postman $out/bin/postman
140 source "${makeWrapper}/nix-support/setup-hook"
141 wrapProgram $out/bin/${pname} \
142 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime=true}}"
144 mkdir -p $out/share/icons/hicolor/128x128/apps
145 ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/postman.png
146 ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/hicolor/128x128/apps/postman.png
151 pushd $out/share/postman
152 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" postman
153 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" chrome_crashpad_handler
154 for file in $(find . -type f \( -name \*.node -o -name postman -o -name \*.so\* \) ); do
155 ORIGIN=$(patchelf --print-rpath $file); \
156 patchelf --set-rpath "${lib.makeLibraryPath buildInputs}:$ORIGIN" $file
159 wrapProgram $out/bin/postman --set PATH ${lib.makeBinPath [ openssl ]}