Merge pull request #96509 from jtojnar/expo-cli
This commit is contained in:
commit
b7620817f6
4 changed files with 7643 additions and 1990 deletions
|
@ -59,6 +59,12 @@ let
|
|||
buildInputs = [ pkgs.phantomjs2 ];
|
||||
};
|
||||
|
||||
expo-cli = super."expo-cli".overrideNodeAttrs (attrs: {
|
||||
__acceptOverrideNodeAttrsCanBeDroppedAnytime = true;
|
||||
# The traveling-fastlane-darwin optional dependency aborts build on Linux.
|
||||
dependencies = builtins.filter (d: d.packageName != "@expo/traveling-fastlane-${if stdenv.isLinux then "darwin" else "linux"}") attrs.dependencies;
|
||||
});
|
||||
|
||||
git-ssb = super.git-ssb.override {
|
||||
buildInputs = [ self.node-gyp-build ];
|
||||
meta.broken = since "10";
|
||||
|
|
|
@ -372,8 +372,37 @@ let
|
|||
fi
|
||||
'';
|
||||
|
||||
# Derivations built with `buildNodePackage` can already be overriden with `override`, `overrideAttrs`, and `overrideDerivation`.
|
||||
# This function introduces `overrideNodeAttrs` and it overrides the call to `buildNodePackage`.
|
||||
#
|
||||
# THIS FUNCTION IS TEMPORARY until we have a better mechanism in place:
|
||||
# https://github.com/NixOS/nixpkgs/pull/96509#issuecomment-682381592
|
||||
# YOU SHOULD NOT USE IT UNLESS YOU ACCEPT THAT.
|
||||
makeOverridableNodePackage = f: origArgs:
|
||||
let
|
||||
ff = f origArgs;
|
||||
overrideWith = newArgs: origArgs // (
|
||||
let args = if stdenv.lib.isFunction newArgs then newArgs origArgs else newArgs;
|
||||
in
|
||||
assert stdenv.lib.assertMsg (args.__acceptOverrideNodeAttrsCanBeDroppedAnytime or false) ''
|
||||
overrideNodeAttrs is temporary function that will be removed once a better mechanism exists.
|
||||
Pass it `__acceptOverrideNodeAttrsCanBeDroppedAnytime = true;` to aknowledge the fact.
|
||||
'';
|
||||
builtins.removeAttrs args [ "__acceptOverrideNodeAttrsCanBeDroppedAnytime" ]
|
||||
);
|
||||
in
|
||||
if builtins.isAttrs ff then (ff // {
|
||||
overrideNodeAttrs = newArgs: makeOverridableNodePackage f (overrideWith newArgs);
|
||||
})
|
||||
else if builtins.isFunction ff then {
|
||||
overrideNodeAttrs = newArgs: makeOverridableNodePackage f (overrideWith newArgs);
|
||||
__functor = self: ff;
|
||||
}
|
||||
else ff;
|
||||
|
||||
|
||||
# Builds and composes an NPM package including all its dependencies
|
||||
buildNodePackage =
|
||||
buildNodePackage = makeOverridableNodePackage (
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
|
@ -443,7 +472,7 @@ let
|
|||
# Run post install hook, if provided
|
||||
runHook postInstall
|
||||
'';
|
||||
} // extraArgs);
|
||||
} // extraArgs));
|
||||
|
||||
# Builds a development shell
|
||||
buildNodeShell =
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
, "escape-string-regexp"
|
||||
, "eslint"
|
||||
, "eslint_d"
|
||||
, "expo-cli"
|
||||
, {"fast-cli": "1.x"}
|
||||
, "fkill-cli"
|
||||
, "forever"
|
||||
|
|
9593
pkgs/development/node-packages/node-packages.nix
generated
9593
pkgs/development/node-packages/node-packages.nix
generated
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue