precompress invtracker-web files

This commit is contained in:
Morten Delenk 2022-08-28 14:31:59 +01:00
parent 1262cb504f
commit 64484b91be
No known key found for this signature in database
GPG key ID: 5130416C797067B6

View file

@ -114,11 +114,23 @@
invtracker-web = pkgs.mkYarnPackage rec {
pname = "invtracker-web";
version = self.lastModifiedDate;
nativeBuildInputs = with pkgs; [
brotli
gzip
zstd
];
src = "${self}/map-desktop";
yarnLock = "${self}/map-desktop/yarn.lock";
buildPhase = "yarn run build";
installPhase = "cp -rv deps/map-desktop/dist $out";
distPhase = "true";
distPhase = ''
fnames=$(find $out -type f)
for f in $fnames; do
brotli -k $f
gzip -k9 $f
zstd --ultra -22 -k $f
done
'';
};
};