qt5.qtwebengine: fix source exceeding output limit

This hack reduces the source derivation size from 3.7G to 450M by
removing the src/3rparty submodule .git directory and compressing
the whole directory. This is needed to avoid the 2G limit on hydra.

rnhmjoj a1452f6e 96a4f3f9

+17 -2
+17 -2
pkgs/development/libraries/qt-5/5.15/default.nix
··· 59 59 rev = "a059e7404a6db799f4da0ad696e65ae9c854b4b0"; 60 60 in 61 61 { 62 - version = "${branchName}-${lib.substring 0 8 rev}"; 62 + version = "${branchName}-${lib.substring 0 7 rev}"; 63 63 64 64 src = fetchgit { 65 65 url = "https://github.com/qt/qtwebengine.git"; 66 - sha256 = "19l1i4sk3pvnwbvz5s97jchqawfz8k1xmjza29bgvkp1zz96r0jx"; 66 + sha256 = "1vdgxfbmx4z4qrm2g61dl64gqn3fv5f83jwpp7h1gyfx5z2qvfmv"; 67 67 inherit rev branchName; 68 68 fetchSubmodules = true; 69 69 leaveDotGit = true; 70 + name = "qtwebengine-${substring 0 7 rev}.tar.gz"; 71 + postFetch = '' 72 + # remove submodule .git directory 73 + rm -rf $out/src/3rdparty/.git 74 + 75 + # compress to not exceed the 2GB output limit 76 + mv $out source 77 + # try to make a deterministic tarball 78 + tar -I 'gzip -n' \ 79 + --sort name \ 80 + --mtime 1970-01-01 \ 81 + --owner=root --group=root \ 82 + --numeric-owner --mode=go=rX,u+rw,a-s \ 83 + -cf $out source 84 + ''; 70 85 }; 71 86 }; 72 87 };