Skip to content

Commit c01fcc7

Browse files
committed
feat(nix): Add nix build
Signed-off-by: dark0dave <[email protected]>
1 parent 88f3d77 commit c01fcc7

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.swp
44
target/
55
dist/
6+
result

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,19 @@ RUST_LOG=TRACE mod_installer [OPTIONS]
244244
```
245245

246246
For more information on logging visit the rust crate [`log`](https://crates.io/crates/log).
247+
248+
### Building
249+
250+
We offer two ways of building the mod_installer. Nix or cargo directly.
251+
252+
#### Cargo
253+
254+
```sh
255+
cargo build --release
256+
```
257+
258+
#### Nix
259+
260+
```sh
261+
nix build -f default.nix
262+
```

default.nix

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs ? import <nixpkgs> { } }:
2+
pkgs.rustPlatform.buildRustPackage rec {
3+
pname = "mod_installer";
4+
version = "9.2.1";
5+
cargoLock.lockFile = ./Cargo.lock;
6+
src = pkgs.lib.cleanSource ./.;
7+
}

0 commit comments

Comments
 (0)