mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-11 06:34:13 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
168 lines
3.5 KiB
Nix
168 lines
3.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
makeDesktopItem,
|
|
wrapGAppsHook3,
|
|
atk,
|
|
at-spi2-atk,
|
|
at-spi2-core,
|
|
alsa-lib,
|
|
cairo,
|
|
cups,
|
|
dbus,
|
|
expat,
|
|
gdk-pixbuf,
|
|
glib,
|
|
gtk3,
|
|
freetype,
|
|
fontconfig,
|
|
nss,
|
|
nspr,
|
|
pango,
|
|
udev,
|
|
libsecret,
|
|
libuuid,
|
|
libX11,
|
|
libxcb,
|
|
libXi,
|
|
libXcursor,
|
|
libXdamage,
|
|
libXrandr,
|
|
libXcomposite,
|
|
libXext,
|
|
libXfixes,
|
|
libXrender,
|
|
libXtst,
|
|
libXScrnSaver,
|
|
libxkbcommon,
|
|
libdrm,
|
|
mesa,
|
|
# It's unknown which version of openssl that postman expects but it seems that
|
|
# OpenSSL 3+ seems to work fine (cf.
|
|
# https://github.com/NixOS/nixpkgs/issues/254325). If postman breaks apparently
|
|
# around OpenSSL stuff then try changing this dependency version.
|
|
openssl,
|
|
xorg,
|
|
pname,
|
|
version,
|
|
meta,
|
|
copyDesktopItems,
|
|
makeWrapper,
|
|
}:
|
|
|
|
let
|
|
dist =
|
|
{
|
|
aarch64-linux = {
|
|
arch = "arm64";
|
|
sha256 = "sha256-yq2J5KRv/NJDaQG7e7RKyzbJqKWRolSU9X6khHxlrNo=";
|
|
};
|
|
|
|
x86_64-linux = {
|
|
arch = "64";
|
|
sha256 = "sha256-fAaxrLZSXGBYr4Vu0Cz2pZwXivSTkaIF5wL217cB9qM=";
|
|
};
|
|
}
|
|
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
inherit pname version meta;
|
|
|
|
src = fetchurl {
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux${dist.arch}";
|
|
inherit (dist) sha256;
|
|
name = "${pname}-${version}.tar.gz";
|
|
};
|
|
|
|
dontConfigure = true;
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "postman";
|
|
exec = "postman %U";
|
|
icon = "postman";
|
|
comment = "API Development Environment";
|
|
desktopName = "Postman";
|
|
genericName = "Postman";
|
|
categories = [ "Development" ];
|
|
})
|
|
];
|
|
|
|
buildInputs = [
|
|
(lib.getLib stdenv.cc.cc)
|
|
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
|
|
libsecret
|
|
libuuid
|
|
libX11
|
|
libxcb
|
|
libXi
|
|
libXcursor
|
|
libXdamage
|
|
libXrandr
|
|
libXcomposite
|
|
libXext
|
|
libXfixes
|
|
libXrender
|
|
libXtst
|
|
libXScrnSaver
|
|
libxkbcommon
|
|
xorg.libxshmfence
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook3
|
|
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
|
|
|
|
source "${makeWrapper}/nix-support/setup-hook"
|
|
wrapProgram $out/bin/${pname} \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime=true}}"
|
|
|
|
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
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" chrome_crashpad_handler
|
|
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
|
|
wrapProgram $out/bin/postman --set PATH ${lib.makeBinPath [ openssl ]}
|
|
'';
|
|
}
|