Don't create separate assets package
This commit is contained in:
parent
21007e8168
commit
284d8881f9
1 changed files with 13 additions and 28 deletions
27
flake.nix
27
flake.nix
|
@ -33,23 +33,6 @@
|
|||
pname = "entrance-exam";
|
||||
version = "0.1.0";
|
||||
|
||||
buildPhase = ''
|
||||
# Compile bootsnap cache
|
||||
${gems}/bin/bundle exec bootsnap precompile --gemfile app/ lib/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r * $out
|
||||
rm -r $out/public
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
assets = pkgs.stdenv.mkDerivation {
|
||||
inherit src version;
|
||||
|
||||
pname = "entrance-exam-assets";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nodejs
|
||||
yarnConfigHook
|
||||
|
@ -62,15 +45,17 @@
|
|||
};
|
||||
|
||||
buildPhase = ''
|
||||
# Compile bootsnap cache
|
||||
${gems}/bin/bundle exec bootsnap precompile --gemfile app/ lib/
|
||||
SECRET_KEY_BASE=000000 RAILS_ENV=production SKIP_YARN_INSTALL=1 ${gems}/bin/bundle exec rails assets:precompile
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r public $out
|
||||
mkdir $out
|
||||
cp -r * $out
|
||||
'';
|
||||
};
|
||||
env = gems;
|
||||
};
|
||||
|
||||
passthru.env = gems;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue