treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic formatting. The AST was verified to work with nixfmt only.
This commit is contained in:
committed by
Valentin Gagarin
parent
bc77c7a973
commit
fcc95ff817
@@ -112,13 +112,17 @@ stdenv.mkDerivation rec {
|
||||
If you'd like to build a different configuration than `release`:
|
||||
|
||||
```nix
|
||||
swiftpmBuildConfig = "debug";
|
||||
{
|
||||
swiftpmBuildConfig = "debug";
|
||||
}
|
||||
```
|
||||
|
||||
It is also possible to provide additional flags to `swift build`:
|
||||
|
||||
```nix
|
||||
swiftpmFlags = [ "--disable-dead-strip" ];
|
||||
{
|
||||
swiftpmFlags = [ "--disable-dead-strip" ];
|
||||
}
|
||||
```
|
||||
|
||||
The default `buildPhase` already passes `-j` for parallel building.
|
||||
@@ -132,7 +136,9 @@ Including `swiftpm` in your `nativeBuildInputs` also provides a default
|
||||
`checkPhase`, but it must be enabled with:
|
||||
|
||||
```nix
|
||||
doCheck = true;
|
||||
{
|
||||
doCheck = true;
|
||||
}
|
||||
```
|
||||
|
||||
This essentially runs: `swift test -c release`
|
||||
@@ -148,12 +154,14 @@ A special function `swiftpmMakeMutable` is available to replace the symlink
|
||||
with a writable copy:
|
||||
|
||||
```nix
|
||||
configurePhase = generated.configure ++ ''
|
||||
# Replace the dependency symlink with a writable copy.
|
||||
swiftpmMakeMutable swift-crypto
|
||||
# Now apply a patch.
|
||||
patch -p1 -d .build/checkouts/swift-crypto -i ${./some-fix.patch}
|
||||
'';
|
||||
{
|
||||
configurePhase = generated.configure ++ ''
|
||||
# Replace the dependency symlink with a writable copy.
|
||||
swiftpmMakeMutable swift-crypto
|
||||
# Now apply a patch.
|
||||
patch -p1 -d .build/checkouts/swift-crypto -i ${./some-fix.patch}
|
||||
'';
|
||||
}
|
||||
```
|
||||
|
||||
## Considerations for custom build tools {#ssec-swift-considerations-for-custom-build-tools}
|
||||
|
||||
Reference in New Issue
Block a user