Hagia
log in
morj / pokesz
overview
files
history
wiki
Viewing at
{ pkgs ? import <nixpkgs> {} }:

pkgs.stdenvNoCC.mkDerivation {
pname = "deno-http-server";
version = "1.0.0";

src = ./.;

nativeBuildInputs = [ pkgs.makeWrapper ];

installPhase = ''
mkdir -p $out/bin $out/share/pokesz/client $out/share/pokesz/server

install -m644 $src/client/host.html $out/share/pokesz/client/host.html
install -m644 $src/client/host.js $out/share/pokesz/client/host.js
install -m644 $src/client/types.js $out/share/pokesz/client/types.js
install -m644 $src/client/watcher.html $out/share/pokesz/client/watcher.html
install -m644 $src/client/watcher.js $out/share/pokesz/client/watcher.js
install -m644 $src/server/server.js $out/share/pokesz/server/server.js

install -m755 $src/pokesz-start.sh $out/bin/pokesz-start.sh

wrapProgram $out/bin/pokesz-start.sh \
--prefix PATH : ${pkgs.deno}/bin
'';

meta = {
description = "A simple Deno HTTP server with a bash launch script";
maintainers = with pkgs.lib.maintainers; [ ];
license = pkgs.lib.licenses.mit;
platforms = pkgs.lib.platforms.unix;
};
}