blob: 26348cc06cae4edac040640483e26ad3f682d349 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{ yarnModulesConfig, mkYarnModules', sources, nodejs, stdenv }:
rec {
modules = mkYarnModules' rec {
pname = "peertube-server-yarn-modules";
inherit (sources) version;
name = "${pname}-${version}";
packageJSON = "${sources}/package.json";
yarnLock = "${sources}/yarn.lock";
pkgConfig = yarnModulesConfig;
};
dist = stdenv.mkDerivation {
pname = "peertube-server";
inherit (sources) version;
src = sources;
buildPhase = ''
ln -s ${modules}/node_modules .
patchShebangs scripts/build/server.sh
npm run build:server
'';
installPhase = ''
mkdir $out
cp -a dist $out
'';
buildInputs = [ nodejs ];
};
}
|