about summary refs log blame commit diff
path: root/web/static/default.nix
blob: ef346f9c746f0057bd0d86e18e90d25a09144eb9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                                 
 





                                                                
                   
   
# Expose all static assets as a folder. The derivation contains a
# `drvHash` attribute which can be used for cache-busting.
{ depot, lib, pkgs, ... }:

let storeDirLength = with builtins; (stringLength storeDir) + 1;
in lib.fix(self: pkgs.runCommand "tvl-static" {
  passthru = {
    drvHash = lib.substring storeDirLength 32 self.drvPath;
  };
} ''
  cp -r ${./.} $out
'')