fix: add Makefile

This commit is contained in:
Elijah McMorris 2024-10-02 12:50:16 -07:00
parent 4a935992b0
commit d1379df604
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
6 changed files with 288 additions and 332 deletions

View file

@ -29,7 +29,7 @@
"type": "volume" "type": "volume"
}, },
{ {
"source": "nix-store", "source": "nix-store-${containerWorkspaceFolderBasename}",
"target": "/nix/store", "target": "/nix/store",
"type": "volume" "type": "volume"
} }

View file

@ -1,6 +1,5 @@
# Contributing code # Contributing code
- Make sure the test pass - Run `make precommit` or `make check` if using nix flakes
- Run `cargo clippy --fix --allow-dirty`
# License # License
All code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer. All code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer.

558
Cargo.lock generated

File diff suppressed because it is too large Load diff

14
Makefile Normal file
View file

@ -0,0 +1,14 @@
precommit:
rustup update
cargo update
cargo check
cargo fmt
cargo t
cargo clippy --fix --allow-dirty
check:
rustup update
cargo update
nix flake update
nix flake check
cargo clippy --fix --allow-dirty

35
flake.lock generated
View file

@ -3,11 +3,11 @@
"advisory-db": { "advisory-db": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1717596017, "lastModified": 1727881133,
"narHash": "sha256-LHjTqlOLgtv43GVkeM7Hb5HcZG5i/vNHnWgYaUzu+Jg=", "narHash": "sha256-nnfwJjLA0uVIBgrGNYt9ButjBQFyj/I6MohQUHhJ78A=",
"owner": "rustsec", "owner": "rustsec",
"repo": "advisory-db", "repo": "advisory-db",
"rev": "af76d4423761499f954411bb3071dcc72e6b0450", "rev": "a68ca4a1ec3950da7c82c522e8cfc424e28ca7f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,17 +17,12 @@
} }
}, },
"crane": { "crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1718078026, "lastModified": 1727824512,
"narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=", "narHash": "sha256-DvFQd58W20BEqh0BUt33eZhzPKBXGO/r9aiSFIVMaWU=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892", "rev": "a376dd1efac7bce448857c62961c6311be26cb09",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -44,11 +39,11 @@
"rust-analyzer-src": [] "rust-analyzer-src": []
}, },
"locked": { "locked": {
"lastModified": 1717827974, "lastModified": 1727850840,
"narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=", "narHash": "sha256-i6lz63lPiRnInxCB19UGd2IkHo/SNE1kNq2M+jTRpLQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8", "rev": "b85dddb88366113db4616a64925a8b2a23854f98",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -62,11 +57,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -77,11 +72,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718276985, "lastModified": 1727811607,
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=", "narHash": "sha256-2ByOBflaIUJKeF9q6efVcYHljZXGZ7MnCWtseRvmpm8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb", "rev": "1839883cd0068572aed75fb9442b508bbd9ef09c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,10 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane = { crane.url = "github:ipetkov/crane";
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
fenix = { fenix = {
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
@ -126,7 +123,8 @@
packages = { packages = {
default = my-crate; default = my-crate;
dockerImage = dockerImage; inherit my-crate
dockerImage;
}; };
apps.default = flake-utils.lib.mkApp { apps.default = flake-utils.lib.mkApp {