added comments
This commit is contained in:
parent
b075d0071b
commit
101feafed4
|
@ -41,15 +41,18 @@
|
|||
src = ./src/..;
|
||||
runtime = ./public;
|
||||
|
||||
# Cargo cant download dependencies at build time, so this downloads them through nix
|
||||
cargoDeps = pkgs.rustPlatform.importCargoLock {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
};
|
||||
|
||||
# we need rust to compile
|
||||
nativeBuildInputs = [
|
||||
pkgs.makeWrapper
|
||||
pkgs.rust-bin.nightly.latest.default
|
||||
];
|
||||
|
||||
# build the thing
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
cargo build -r
|
||||
|
@ -58,15 +61,16 @@
|
|||
runHook postBuild
|
||||
'';
|
||||
|
||||
# move the files
|
||||
installPhase = ''
|
||||
makeWrapper $out/bin/webbisitey $out/bin/webbisitey-wrapped --run 'cd $(dirname $0)';
|
||||
makeWrapper $out/bin/webbisitey $out/bin/webbisitey-wrapped --run 'cd $(dirname $0)'; # im too lazy to add a path argument so cd into the correct folder so it can serve files.
|
||||
cp -r $runtime $out/bin/public
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Website server backend";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
mainProgram = "webbisitey-wrapped";
|
||||
mainProgram = "webbisitey-wrapped"; # we want to run the wrapped version
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue