Skip to content

Commit 1a8edb8

Browse files
authored
Merge pull request #8 from baileyluTCD/1.4.1-docs-pass
1.4.1 docs pass
2 parents 0a63b84 + 9298d87 commit 1a8edb8

File tree

8 files changed

+36
-41
lines changed

8 files changed

+36
-41
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing to `bun2nix`
2+
3+
Thinking about contributing? - All pull requests and issues are welcome and I will work with you to attempt to resolve them in a resonable amount of time.
4+
5+
To help with that, here are some developer notes:
6+
7+
## Tests
8+
9+
All tests for this project are ran through `nix flake check` and are a good way of checking if the whole project works. To ensure this remains the case automatically, [garnix](https://garnix.io/) has been setup for the repository to run automatically on pull requests.
10+
11+
## Documentation
12+
13+
More documentation is always welcome, if you have any ideas for anything more which could be documented do make a contribution. For now, the documentation is an [mdbook](https://rust-lang.github.io/mdBook/) in `docs/`.
14+
15+
## Formatting
16+
17+
[Treefmt](https://github.com/numtide/treefmt-nix) has been setup for this repo to keep code styling clean and git diffs as small as possible, it is checked for automatically, but please remember to run `nix fmt` before making a pull request.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rinja = "0.3.5"
99

1010
[package]
1111
name = "bun2nix"
12-
version = "1.4.0"
12+
version = "1.4.1"
1313
edition = "2021"
1414

1515
[profile.release]

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
![Bun2Nix Logo](./docs/src/favicon.svg)
1+
<div align="center">
2+
<img alt="Bun2nix Logo" src="./docs/src/favicon.svg" alt="Bun2nix Logo" width="150" height="150">
3+
</div>
4+
5+
<div align="center">
6+
<a href="https://garnix.io/repo/baileyluTCD/bun2nix"><img alt="Built with Garnix" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgarnix.io%2Fapi%2Fbadges%2FbaileyluTCD%2Fbun2nix%3Fbranch%3Dmaster"></a>
7+
<a href="https://baileylutcd.github.io/bun2nix/"><img alt="GitHub Pages Deployment" src="https://github.com/baileyluTCD/bun2nix/actions/workflows/gh-pages.yml/badge.svg"></a>
8+
</div>
29

310
# Bun2Nix
411

docs/src/bun2nix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bun2Nix
22

33
<div style="display: flex; flex-direction: column; align-items: center; width: 100%;">
4-
<img src="./favicon.svg" alt="Bun2nix Logo" width="150" height="150">
4+
<img alt="Bun2nix Logo" src="./favicon.svg" alt="Bun2nix Logo" width="150" height="150">
55
</div>
66

77
Bun2nix is a fast rust based tool for converting lockfiles generated with the [JavaScript](https://en.wikipedia.org/wiki/JavaScript) [Bun](https://bun.sh/) (v1.2+) package manager files to [Nix](https://nixos.wiki/) expressions, which allows them to be consumed to build Bun packages reproducibly.

docs/src/flake-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ And place this in a file called `default.nix`
7474
```nix
7575
{ mkBunDerivation, ... }:
7676
mkBunDerivation {
77-
name = "bun2nix-example";
77+
pname = "bun2nix-example";
7878
version = "1.0.0";
7979
8080
src = ./.;

docs/src/using-the-command-line-tool.md

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,18 @@ The recommended way to use `bun2nix` is by adding it to your `package.json` to a
1212

1313
However, if you run without the `-o` flag it will produce a text output over stdout similar to other `lang2nix` tools, hence if you enforce formatting rules in your repository it is likely a good idea to pass it through a formatter before writing the file.
1414

15-
## Cache
16-
17-
`bun2nix` currently uses an sqlite cache for storing prefetched hashes which has to be cleared manually with `bun2nix cache clear`.
18-
19-
> This is likely to change soon, see [here](https://github.com/baileyluTCD/bun2nix/issues/2) for details.
20-
2115
## Options
2216

2317
Currently, the options available from the command line tool are as follows:
2418

2519
```
2620
Convert Bun (v1.2+) packages to Nix expressions
2721
28-
Usage: bun2nix [OPTIONS] [COMMAND]
29-
30-
Commands:
31-
cache Cache related subcommands
32-
help Print this message or the help of the given subcommand(s)
22+
Usage: bun2nix [OPTIONS]
3323
3424
Options:
35-
-l, --lock-file <LOCK_FILE>
36-
The Bun (v1.2+) lockfile to use to produce the Nix expression
37-
38-
[default: ./bun.lock]
39-
40-
-o, --output-file <OUTPUT_FILE>
41-
The output file to write to - if no file location is provided, print to stdout instead
42-
43-
-c, --cache-location <CACHE_LOCATION>
44-
The sqlite database to use as the cache - will be created if it does not exist.
45-
46-
Default value of <system cache directory>/bun2nix is assigned when no value is passed to `cache_location`.
47-
48-
[default: ~/.cache/bun2nix]
49-
50-
--disable-cache
51-
Disable usage of the cache entirely
52-
53-
-h, --help
54-
Print help (see a summary with '-h')
55-
56-
-V, --version
57-
Print version
25+
-l, --lock-file <LOCK_FILE> The Bun (v1.2+) lockfile to use to produce the Nix expression [default: ./bun.lock]
26+
-o, --output-file <OUTPUT_FILE> The output file to write to - if no file location is provided, print to stdout instead
27+
-h, --help Print help
28+
-V, --version Print version
5829
```

templates/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
This directory contains [askama](https://docs.rs/askama/latest/askama/) templates for constructing the output nix files for `bun2nix`.
1+
This directory contains [rinja](https://docs.rs/rinja/latest/rinja/) templates for constructing the output nix files for `bun2nix`.
22

3-
If you are looking for something like a template to create your project based on, please see the `examples/` folder instead.
3+
If you are looking for something like a template to create your project based on, please see the `nix/templates/` folder instead.

0 commit comments

Comments
 (0)