make nix ready
This commit is contained in:
parent
32685964c2
commit
a3461caf81
7 changed files with 1716 additions and 151 deletions
33
frontend/default.nix
Normal file
33
frontend/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
pkgs.buildNpmPackage {
|
||||
pname = "my-node-app"; # Name of your package
|
||||
version = "1.0.0"; # Your app version
|
||||
|
||||
# Source files (usually the current directory)
|
||||
src = pkgs.lib.cleanSource ../frontend;
|
||||
|
||||
# Optionally, you can provide a package-lock.json or yarn.lock file
|
||||
# This ensures dependencies are installed reproducibly.
|
||||
packageLock = ./package-lock.json; # Use this for npm
|
||||
|
||||
# Node.js version (optional, defaults to pkgs.nodejs)
|
||||
nodejs = pkgs.nodejs-18_x;
|
||||
npmDepsHash = "sha256-n9SpPPRvu92RwNPDKZ3f1Splbux2IVGhSazJ4DM2IrA=";
|
||||
|
||||
|
||||
# Add any additional arguments for the build process
|
||||
buildInputs = [ ];
|
||||
|
||||
# Specify the build phase, if needed
|
||||
buildPhase = ''
|
||||
echo "Building the app..."
|
||||
npm run build
|
||||
'';
|
||||
|
||||
# Specify the install phase (what to copy to the output)
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r dist/* $out/
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue