forked from mirrors/nixpkgs
epgstation: fix for node2nix npmv7 update
This commit is contained in:
parent
cc857c8e22
commit
e51b313775
|
@ -6,7 +6,6 @@
|
|||
, makeWrapper
|
||||
, bash
|
||||
, nodejs
|
||||
, nodePackages
|
||||
, gzip
|
||||
, jq
|
||||
, yq
|
||||
|
@ -23,18 +22,17 @@ let
|
|||
sha256 = "K1cAvmqWEfS6EY4MKAtjXb388XLYHtouxNM70PWgFig=";
|
||||
};
|
||||
|
||||
client = nodePackages.epgstation-client.override (drv: {
|
||||
# FIXME: remove this option if possible
|
||||
#
|
||||
# Unsetting this option resulted NPM attempting to re-download packages.
|
||||
dontNpmInstall = true;
|
||||
client = nodejs.pkgs.epgstation-client.override (drv: {
|
||||
# This is set to false to keep devDependencies at build time. Build time
|
||||
# dependencies are pruned afterwards.
|
||||
production = false;
|
||||
|
||||
meta = drv.meta // {
|
||||
inherit (nodejs.meta) platforms;
|
||||
};
|
||||
});
|
||||
|
||||
server = nodePackages.epgstation.override (drv: {
|
||||
server = nodejs.pkgs.epgstation.override (drv: {
|
||||
inherit src;
|
||||
|
||||
# This is set to false to keep devDependencies at build time. Build time
|
||||
|
@ -47,6 +45,9 @@ let
|
|||
];
|
||||
|
||||
preRebuild = ''
|
||||
# Fix for OpenSSL compat with newer Node.js
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
|
||||
# Fix for not being able to connect to mysql using domain sockets.
|
||||
patch -p1 < ${./use-mysql-over-domain-socket.patch}
|
||||
|
||||
|
@ -64,8 +65,8 @@ let
|
|||
|
||||
pushd $out/lib/node_modules/epgstation
|
||||
|
||||
cp -r ${client}/lib/node_modules/epgstation-client/node_modules client/node_modules
|
||||
chmod -R u+w client/node_modules
|
||||
cp -r ${client}/lib/node_modules/epgstation-client/{package-lock.json,node_modules} client/
|
||||
chmod -R u+w client/{package-lock.json,node_modules}
|
||||
|
||||
npm run build
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"reflect-metadata": "0.1.13",
|
||||
"socket.io": "4.3.1",
|
||||
"source-map-support": "0.5.20",
|
||||
"sqlite3": "5.0.2",
|
||||
"sqlite3": "5.0.11",
|
||||
"swagger-ui-dist": "3.52.5",
|
||||
"typeorm": "0.2.38",
|
||||
"url-join": "4.0.1",
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
, writers
|
||||
, jq
|
||||
, yq
|
||||
, gnused
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -45,6 +46,9 @@ in writers.writeBash "update-epgstation" ''
|
|||
"$SRC/client/package.json" \
|
||||
> client/package.json
|
||||
|
||||
# Fix issue with old sqlite3 version pinned that depends on very old node-gyp 3.x
|
||||
${gnused}/bin/sed -i -e 's/"sqlite3":\s*"5.0.[0-9]\+"/"sqlite3": "5.0.11"/' package.json
|
||||
|
||||
# Regenerate node packages to update the pre-overriden epgstation derivation.
|
||||
# This must come *after* package.json has been regenerated.
|
||||
pushd ../../../development/node-packages
|
||||
|
|
|
@ -132,7 +132,8 @@ final: prev: {
|
|||
# NOTE: this is a stub package to fetch npm dependencies for
|
||||
# ../../applications/video/epgstation
|
||||
epgstation = prev."epgstation-../../applications/video/epgstation".override (oldAttrs: {
|
||||
buildInputs = [ final.node-pre-gyp final.node-gyp-build ];
|
||||
buildInputs = [ pkgs.postgresql ];
|
||||
nativeBuildInputs = [ final.node-pre-gyp final.node-gyp-build pkgs.which ];
|
||||
meta = oldAttrs.meta // { platforms = lib.platforms.none; };
|
||||
});
|
||||
|
||||
|
|
|
@ -27630,7 +27630,9 @@ with pkgs;
|
|||
|
||||
epeg = callPackage ../applications/graphics/epeg { };
|
||||
|
||||
epgstation = callPackage ../applications/video/epgstation { };
|
||||
epgstation = callPackage ../applications/video/epgstation {
|
||||
nodejs = nodejs-16_x;
|
||||
};
|
||||
|
||||
inherit (gnome) epiphany;
|
||||
|
||||
|
|
Loading…
Reference in a new issue