1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

yarn2nix: change yarnFlags to append by default

The main usecase for this variable is to append --production to yarn
which now got a whole lot easier because you no longer need to repeat
the defaults.
This commit is contained in:
Sandro Jäckel 2022-07-24 14:54:33 +02:00
parent 6d1b077c1b
commit 9bbc053f1a
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
4 changed files with 6 additions and 10 deletions

View file

@ -35,8 +35,6 @@ mkYarnPackage rec {
name = "uivonim-build-${version}";
inherit version src packageJSON yarnLock yarnNix yarnPreBuild distPhase;
yarnFlags = [ "--offline" ];
buildPhase = ''
yarn build:prod
'';
@ -47,7 +45,7 @@ mkYarnPackage rec {
};
# The --production flag disables the devDependencies.
yarnFlags = [ "--offline" "--production" ];
yarnFlags = [ "--production" ];
nativeBuildInputs = [ makeWrapper ];

View file

@ -14,7 +14,7 @@ mkYarnPackage rec {
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
yarnFlags = [ "--production" "--offline" ];
yarnFlags = [ "--production" ];
nativeBuildInputs = [ makeWrapper ];

View file

@ -69,7 +69,7 @@ in rec {
yarnLock,
yarnNix ? mkYarnNix { inherit yarnLock; },
offlineCache ? importOfflineCache yarnNix,
yarnFlags ? defaultYarnFlags,
yarnFlags ? [ ],
pkgConfig ? {},
preBuild ? "",
postBuild ? "",
@ -141,7 +141,7 @@ in rec {
${workspaceDependencyLinks}
yarn install ${lib.escapeShellArgs yarnFlags}
yarn install ${lib.escapeShellArgs (defaultYarnFlags ++ yarnFlags)}
${lib.concatStringsSep "\n" postInstall}
@ -241,7 +241,7 @@ in rec {
yarnLock ? src + "/yarn.lock",
yarnNix ? mkYarnNix { inherit yarnLock; },
offlineCache ? importOfflineCache yarnNix,
yarnFlags ? defaultYarnFlags,
yarnFlags ? [ ],
yarnPreBuild ? "",
yarnPostBuild ? "",
pkgConfig ? {},

View file

@ -55,9 +55,7 @@ stdenvNoCC.mkDerivation rec {
name = "${pname}-modules-${version}";
inherit pname version;
yarnFlags = yarn2nix-moretea.defaultYarnFlags ++ [
"--production"
];
yarnFlags = [ "--production" ];
pkgConfig = {
keytar = {