Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucperkins/nix-buf
An example Buf workspace powered by Nix
https://github.com/lucperkins/nix-buf
Last synced: about 1 month ago
JSON representation
An example Buf workspace powered by Nix
- Host: GitHub
- URL: https://github.com/lucperkins/nix-buf
- Owner: lucperkins
- Created: 2022-02-05T23:43:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T10:24:04.000Z (about 1 year ago)
- Last Synced: 2024-11-14T01:11:33.999Z (2 months ago)
- Language: Nix
- Size: 18.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Buf + Nix
An example [Buf] workspace that uses [Nix].
* The [Flakes] configuration is in [`flake.nix`](./flake.nix)
* The non-Flakes configuration is in [`default.nix`](./default.nix), with the non-Flakes shell config in [`shell.nix`](./shell.nix)
* Some configuration shared by both is in [`shared.nix`](./shared.nix)## Flakes
To run Buf commands using the Flakes configuration, preface them with `nix run . --`. Some examples:
```sh
nix run . -- build
nix run . -- generate
nix run . -- lint# Also possible:
alias buf='nix run . --'
buf build
# etc.
```## Original Nix (pre-Flakes)
To run Buf commands using the "old" Nix way, preface them with `nix-shell --pure --run`. Some examples:
```sh
nix-shell --pure --run "buf build"
nix-shell --pure --run "buf generate"
nix-shell --pure --run "buf lint"
# etc.
```[buf]: https://buf.build
[flakes]: https://nixos.wiki/wiki/Flakes
[nix]: https://nixos.org