- # if yarn complains about
- # TypeError: Cannot read property 'lang' of undefined yarn
- # make sure that all package names in yarn-packages.nix finish in
- # .tar.gz where due (especially jsonld-signatures)
- # Most errors where due to jsonld-signature (name, git version, etc.)
- # or bluebird (3.5.18 instead vs 3.5.21)
- yarnModulesArg = rec {
- pname = "peertube-yarn-modules";
- version = "1.2.0";
- name = "peertube-yarn-modules-${version}";
- packageJSON = "${patchedPackages}/package.json";
- yarnLock = "${patchedPackages}/yarn.lock";
- yarnNix = ./yarn-packages.nix;
- pkgConfig = {
- all = {
- buildInputs = [ mylibs.yarn2nixPackage.src ];
- };
- bcrypt = {
- buildInputs = [ nodePackages.node-pre-gyp ];
- postInstall = let
- bcrypt_lib = fetchurl {
- url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.2/bcrypt_lib-v3.0.2-node-v64-linux-x64-glibc.tar.gz";
- sha256 = "0i0dx4h52fqi3mda2zzqrxp2fh7spbvf7h88mjk218h8d7vl53yx";
+ serverPatchedPackage = runCommand "server-package" {} ''
+ mkdir -p $out
+ cp ${patchedSource}/package.json $out/
+ cp ${patchedSource}/yarn.lock $out/
+ '';
+ clientPatchedPackage = runCommand "client-package" {} ''
+ mkdir -p $out
+ cp ${patchedSource}/client/package.json $out/
+ cp ${patchedSource}/client/yarn.lock $out/
+ '';
+
+ yarnModulesConfig = {
+ # all = {
+ # buildInputs = [ yarn2nix-moretea.yarn2nix.src ];
+ # };
+ bcrypt = {
+ buildInputs = [ nodePackages.node-pre-gyp ];
+ postInstall = let
+ bcrypt_lib = fetchurl {
+ url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.7/bcrypt_lib-v3.0.7-node-v64-linux-x64-glibc.tar.gz";
+ sha256 = "0gbq4grhp5wl0f9yqb4y43kjfh8nivfd6y0nkv1x6gfvs2v23wb0";
+ };
+ in
+ ''
+ mkdir lib && tar -C lib -xf ${bcrypt_lib}
+ patchShebangs ../node-pre-gyp
+ npm run install
+ '';
+ };
+ dtrace-provider = {
+ buildInputs = [ python nodePackages.node-gyp ];
+ postInstall = ''
+ npx node-gyp rebuild --tarball=${nodeHeaders}
+ '';
+ };
+ node-sass = {
+ buildInputs = [ libsass python ];
+ postInstall =
+ ''
+ node scripts/build.js --tarball=${nodeHeaders}
+ '';
+ };
+
+ sharp = {
+ buildInputs = [ python nodePackages.node-gyp ];
+ postInstall =
+ let
+ tarball = fetchurl {
+ url = "https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz";
+ sha256 = "0xqv61g6s6rkvc31zq9a3bf8rp56ijnpw0xhr91hc88asqprd5yh";