lemmy-ui: add static assets folder to out

This commit is contained in:
happysalada 2021-10-03 14:51:06 +09:00
parent 82155ff501
commit 5e7aab5982

View file

@ -4,7 +4,6 @@
, nodejs
, python3
, pkg-config
, writeShellScriptBin
, fetchFromGitHub
}:
@ -22,7 +21,8 @@ let
name = "lemmy-ui";
version = "0.12.2";
unwrapped = mkYarnPackage {
in
mkYarnPackage {
src = fetchFromGitHub {
owner = "LemmyNet";
@ -55,6 +55,11 @@ let
yarn --offline build:prod
'';
preInstall = ''
mkdir $out
cp -R ./deps/lemmy-ui/dist/assets $out
'';
distPhase = "true";
meta = with lib; {
@ -64,11 +69,5 @@ let
maintainers = with maintainers; [ happysalada billewanick ];
platforms = platforms.linux;
};
};
in
(writeShellScriptBin "lemmy-ui" ''
${nodejs}/bin/node ${unwrapped}/libexec/lemmy-ui/node_modules/lemmy-ui/dist/js/server.js
'').overrideAttrs (oldAttrs: {
passthru = { inherit unwrapped; };
})
}