nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 150 lines 3.3 kB view raw
1{ 2 lib, 3 stdenv, 4 copyDesktopItems, 5 makeWrapper, 6 alsa-lib, 7 at-spi2-atk, 8 at-spi2-core, 9 atk, 10 cairo, 11 cups, 12 curlWithGnuTls, 13 dbus, 14 expat, 15 fontconfig, 16 freetype, 17 gdk-pixbuf, 18 glib, 19 gtk3, 20 libX11, 21 libXcomposite, 22 libXcursor, 23 libXdamage, 24 libXext, 25 libXfixes, 26 libXi, 27 libXrandr, 28 libXrender, 29 libXScrnSaver, 30 libXtst, 31 libdrm, 32 libgbm, 33 libGL, 34 libsecret, 35 libuuid, 36 libxkbcommon, 37 nspr, 38 nss, 39 pango, 40 udev, 41 libxshmfence, 42 libxcb, 43 bintools, 44 makeDesktopItem, 45 # It's unknown which version of openssl that postman expects but it seems that 46 # OpenSSL 3+ seems to work fine (cf. 47 # https://github.com/NixOS/nixpkgs/issues/254325). If postman breaks apparently 48 # around OpenSSL stuff then try changing this dependency version. 49 openssl, 50 pname, 51 version, 52 src, 53 passthru, 54 meta, 55}: 56 57stdenv.mkDerivation { 58 inherit 59 pname 60 version 61 src 62 passthru 63 meta 64 ; 65 66 nativeBuildInputs = [ 67 copyDesktopItems 68 makeWrapper 69 ]; 70 71 desktopItems = [ 72 (makeDesktopItem { 73 name = "postman"; 74 exec = "postman %U"; 75 icon = "postman"; 76 comment = "API Development Environment"; 77 desktopName = "Postman"; 78 genericName = "Postman"; 79 categories = [ "Development" ]; 80 mimeTypes = [ "x-scheme-handler/postman" ]; 81 startupNotify = true; 82 startupWMClass = "postman"; 83 }) 84 ]; 85 86 installPhase = '' 87 runHook preInstall 88 89 mkdir -p $out/share $out/bin 90 cp --recursive app $out/share/postman 91 rm $out/share/postman/Postman 92 makeWrapper $out/share/postman/postman $out/bin/postman \ 93 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \ 94 --prefix PATH : ${lib.makeBinPath [ openssl ]} 95 mkdir -p $out/share/icons/hicolor/128x128/apps 96 ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/postman.png 97 ln -s $out/share/postman/resources/app/assets/icon.png $out/share/icons/hicolor/128x128/apps/postman.png 98 99 runHook postInstall 100 ''; 101 102 postFixup = '' 103 patchelf --set-interpreter ${bintools.dynamicLinker} --add-needed libGL.so.1 $out/share/postman/postman 104 patchelf --set-interpreter ${bintools.dynamicLinker} $out/share/postman/chrome_crashpad_handler 105 for file in $(find $out/share/postman -type f \( -name \*.node -o -name postman -o -name \*.so\* \) ); do 106 patchelf --add-rpath "${ 107 lib.makeLibraryPath [ 108 (lib.getLib stdenv.cc.cc) 109 alsa-lib 110 atk 111 at-spi2-atk 112 at-spi2-core 113 cairo 114 cups 115 curlWithGnuTls 116 dbus 117 expat 118 fontconfig 119 freetype 120 gdk-pixbuf 121 glib 122 gtk3 123 libdrm 124 libgbm 125 libGL 126 libsecret 127 libuuid 128 libX11 129 libXcomposite 130 libXcursor 131 libXdamage 132 libXext 133 libXfixes 134 libXi 135 libXrandr 136 libXrender 137 libXScrnSaver 138 libxkbcommon 139 libXtst 140 nspr 141 nss 142 pango 143 udev 144 libxcb 145 libxshmfence 146 ] 147 }" $file 148 done 149 ''; 150}