Skip to content

Commit

Permalink
docs: add optional linux/macos packages installation snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar authored Aug 9, 2023
1 parent b4ce82b commit 507bdca
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/common-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ in {
'';
}
```

# How to install packages only on Linux or macOS?

```nix
{ pkgs, lib, ... }: {
packages = [
pkgs.ncdu
] ++ lib.optionals pkgs.stdenv.isLinux [
pkgs.inotify-tools
] ++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.Security
];
}
```

0 comments on commit 507bdca

Please sign in to comment.