treewide: run treefmt with mdcr/nixfmt
This commit is contained in:
@@ -303,9 +303,7 @@ buildNpmPackage {
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
|
||||
npmDeps = importNpmLock {
|
||||
npmRoot = ./.;
|
||||
};
|
||||
npmDeps = importNpmLock { npmRoot = ./.; };
|
||||
|
||||
npmConfigHook = importNpmLock.npmConfigHook;
|
||||
}
|
||||
@@ -456,9 +454,7 @@ In case you are patching `package.json` or `pnpm-lock.yaml`, make sure to pass `
|
||||
`pnpm.configHook` supports adding additional `pnpm install` flags via `pnpmInstallFlags` which can be set to a Nix string array:
|
||||
|
||||
```nix
|
||||
{
|
||||
pnpm,
|
||||
}:
|
||||
{ pnpm }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "foo";
|
||||
@@ -470,9 +466,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
pnpmInstallFlags = [ "--shamefully-hoist" ];
|
||||
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (finalAttrs) pnpmInstallFlags;
|
||||
};
|
||||
pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) pnpmInstallFlags; };
|
||||
})
|
||||
```
|
||||
|
||||
@@ -699,9 +693,7 @@ It's important to use the `--offline` flag. For example if you script is `"build
|
||||
|
||||
```nix
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
nativeBuildInputs = [ writableTmpDirAsHomeHook ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
@@ -716,9 +708,7 @@ It's important to use the `--offline` flag. For example if you script is `"build
|
||||
The `distPhase` is packing the package's dependencies in a tarball using `yarn pack`. You can disable it using:
|
||||
|
||||
```nix
|
||||
{
|
||||
doDist = false;
|
||||
}
|
||||
{ doDist = false; }
|
||||
```
|
||||
|
||||
The configure phase can sometimes fail because it makes many assumptions which may not always apply. One common override is:
|
||||
@@ -837,8 +827,8 @@ It's recommended to ensure you're explicitly pinning the major version used, for
|
||||
|
||||
let
|
||||
yarn-berry = yarn-berry_4;
|
||||
in
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "foo";
|
||||
version = "0-unstable-1980-01-01";
|
||||
@@ -892,8 +882,8 @@ To compensate for this, the `yarn-berry-fetcher missing-hashes` subcommand can b
|
||||
|
||||
let
|
||||
yarn-berry = yarn-berry_4;
|
||||
in
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "foo";
|
||||
version = "0-unstable-1980-01-01";
|
||||
|
||||
Reference in New Issue
Block a user