diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f44f357 --- /dev/null +++ b/default.nix @@ -0,0 +1,28 @@ +{ pkgs ? import {} }: + +with pkgs; + +# TODO: Once https://github.com/svanderburg/node2nix/issues/184 is +# fixed, use a proper nixos package instead of a tarball. +stdenv.mkDerivation { + pname = "tlaternet-templates"; + version = "1.0"; + src = ./dist.tar.gz; + installPhase = '' + mkdir -p $out/srv/ + mv browser $out/srv/web + ''; +} + +# let +# nodePackages = import ./node-packages.nix { +# inherit pkgs; +# }; + +# in +# nodePackages.package.override { +# buildInputs = [ pkgs.nodePackages.node-gyp-build ]; +# postInstall = '' +# npm run build-dist +# ''; +# } diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..05cdda4 --- /dev/null +++ b/generate.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i bash -p nodePackages.node2nix +set -euo pipefail + +node2nix --input package.json \ + --output node-packages-generated.nix \ + --composition node-packages.nix