Skip to content

Commit

Permalink
readme: Add an example of examples
Browse files Browse the repository at this point in the history
Closes #291.
  • Loading branch information
Patryk27 committed Jul 1, 2023
1 parent df10963 commit a8906d2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,23 @@ See: [./examples](./examples).

## Tips & Tricks

### Building a particular example

If you want to build only a particular example, use:

``` nix
naersk.buildPackage {
pname = "your-example-name";
src = ./.;
overrideMain = old: {
preConfigure = ''
cargo_build_options="$cargo_build_options --example your-example-name"
'';
};
}
```

### Using OpenSSL

If your application uses OpenSSL (making the build process fail), try:
Expand Down
17 changes: 17 additions & 0 deletions README.tpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,23 @@ See: [./examples](./examples).

## Tips & Tricks

### Building a particular example

If you want to build only a particular example, use:

``` nix
naersk.buildPackage {
pname = "your-example-name";
src = ./.;
overrideMain = old: {
preConfigure = ''
cargo_build_options="$cargo_build_options --example your-example-name"
'';
};
}
```

### Using OpenSSL

If your application uses OpenSSL (making the build process fail), try:
Expand Down

0 comments on commit a8906d2

Please sign in to comment.