depot/web/default.nix

25 lines
675 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ depot, pkgs, ... }@args:
{
int = pkgs.copyPathToStore ./int;
logged-out-int = pkgs.copyPathToStore ./logged-out-int;
2021-01-19 03:51:22 +00:00
quotes = import ./quotes args;
2021-03-20 19:49:33 +00:00
fup = import ./fup args;
as205479 = hostName: pkgs.runCommand "as205479-web" {
inherit hostName;
depotVersion = depot.version;
} ''
cp -Rv ${./as205479} $out
chmod -R +w $out
find $out -name '*.html' | while read filename; do
substituteInPlace "$filename" \
--replace "{{NODENAME}}" "$hostName" \
--replace "{{DEPOT_VERSION}}" "$depotVersion"
done
'';
2020-12-30 00:51:56 +00:00
}