nixos: Add way of building the static files
This commit is contained in:
parent
0811be9ae0
commit
4f5977002b
36
flake.nix
36
flake.nix
@ -35,6 +35,42 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# packages.quickpeepWebStatic = pkgs.stdenv.mkDerivation {
|
||||||
|
# name = "quickpeepWebStatic";
|
||||||
|
#
|
||||||
|
# src = ./quickpeep_static;
|
||||||
|
#
|
||||||
|
# buildInputs = [ pkgs.yarn ];
|
||||||
|
#
|
||||||
|
# preparePhase = ''
|
||||||
|
# yarn install
|
||||||
|
# '';
|
||||||
|
#
|
||||||
|
# buildPhase = ''
|
||||||
|
# yarn build
|
||||||
|
# cp -r dist/* $out
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
|
||||||
|
packages.quickpeepWebStatic = pkgs.mkYarnPackage {
|
||||||
|
name = "quickpeepWebStatic";
|
||||||
|
src = ./quickpeep_static;
|
||||||
|
packageJSON = ./quickpeep_static/package.json;
|
||||||
|
yarnLock = ./quickpeep_static/yarn.lock;
|
||||||
|
yarnNix = ./quickpeep_static/yarn.nix;
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
yarn build
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
# nop ?
|
||||||
|
'';
|
||||||
|
distPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cp -r deps/quickpeep_static/dist/* $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
defaultPackage = packages.quickpeep;
|
defaultPackage = packages.quickpeep;
|
||||||
|
|
||||||
# NixOS Modules
|
# NixOS Modules
|
||||||
|
1717
quickpeep_static/yarn.nix
Normal file
1717
quickpeep_static/yarn.nix
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user