mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
This commit is contained in:
parent
642a7528dd
commit
b7201d4a22
3 changed files with 34 additions and 22 deletions
30
README.md
30
README.md
|
|
@ -1,6 +1,7 @@
|
||||||
# Mill Scale
|
# Mill Scale
|
||||||
|
|
||||||
An opinionated rust module for [flakelight](https://github.com/nix-community/flakelight).
|
An opinionated rust module for
|
||||||
|
[flakelight](https://github.com/nix-community/flakelight).
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
@ -46,7 +47,8 @@ Included checks:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Additionally, dependencies for the following crates should be automatically detected
|
Additionally, dependencies for the following crates should be automatically
|
||||||
|
detected
|
||||||
|
|
||||||
- openssl
|
- openssl
|
||||||
- udev
|
- udev
|
||||||
|
|
@ -63,7 +65,8 @@ Additionally, dependencies for the following crates should be automatically dete
|
||||||
|
|
||||||
## Development tooling
|
## Development tooling
|
||||||
|
|
||||||
Development tools for working with the following crates are automatically added to the dev-shell when needed
|
Development tools for working with the following crates are automatically added
|
||||||
|
to the dev-shell when needed
|
||||||
|
|
||||||
- cargo-insta
|
- cargo-insta
|
||||||
- sqlx
|
- sqlx
|
||||||
|
|
@ -92,7 +95,9 @@ jobs:
|
||||||
|
|
||||||
This automatically creates one job per check, allowing them to run in parallel.
|
This automatically creates one job per check, allowing them to run in parallel.
|
||||||
|
|
||||||
This might be slower than running them all in the same runner depending on the time each check takes and the size of the intermediates that has to be downloaded from the cache.
|
This might be slower than running them all in the same runner depending on the
|
||||||
|
time each check takes and the size of the intermediates that has to be
|
||||||
|
downloaded from the cache.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: "CI"
|
name: "CI"
|
||||||
|
|
@ -109,7 +114,9 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: cachix/install-nix-action@v27
|
- uses: cachix/install-nix-action@v27
|
||||||
- id: set-matrix
|
- id: set-matrix
|
||||||
run: echo "matrix={\"check\":$(nix eval --json '.#checks.x86_64-linux' --apply 'builtins.attrNames')}" | tee -a $GITHUB_OUTPUT
|
run:
|
||||||
|
echo "matrix={\"check\":$(nix eval --json '.#checks.x86_64-linux'
|
||||||
|
--apply 'builtins.attrNames')}" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
checks:
|
checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -141,13 +148,16 @@ Cross-compiling can be enabled with the following
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This adds cross-compiled package with the same name as the target to the `packages`.
|
This adds cross-compiled package with the same name as the target to the
|
||||||
|
`packages`.
|
||||||
|
|
||||||
### Cross-compiling with GitHub Action
|
### Cross-compiling with GitHub Action
|
||||||
|
|
||||||
A `lib.crossMatrix` flake output is provided to help with setting up cross-compiling in CI.
|
A `lib.crossMatrix` flake output is provided to help with setting up
|
||||||
|
cross-compiling in CI.
|
||||||
|
|
||||||
This contains a list of targets and the binary suffix (e.g. `.exe`) for each target.
|
This contains a list of targets and the binary suffix (e.g. `.exe`) for each
|
||||||
|
target.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
@ -185,4 +195,6 @@ jobs:
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
This flake is based on [flakelight-rust](https://github.com/accelbread/flakelight-rust), credit for most ideas got to accelbread.
|
This flake is based on
|
||||||
|
[flakelight-rust](https://github.com/accelbread/flakelight-rust), credit for
|
||||||
|
most ideas got to accelbread.
|
||||||
|
|
|
||||||
24
flake.lock
generated
24
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742394900,
|
"lastModified": 1748970125,
|
||||||
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
|
"narHash": "sha256-UDyigbDGv8fvs9aS95yzFfOKkEjx1LO3PL3DsKopohA=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
|
"rev": "323b5746d89e04b22554b061522dfce9e4c49b18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -20,11 +20,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742215471,
|
"lastModified": 1750078272,
|
||||||
"narHash": "sha256-I/7CY1gd5R4b3rBlhcJyjCYcP+v/164g83uOT9HTfj0=",
|
"narHash": "sha256-Mbu2+ipXe1tAW3UjWXzlDE3wzyVDMOcW1z/PgGmq5T4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "flakelight",
|
"repo": "flakelight",
|
||||||
"rev": "e40a1a8c6d18c761659ed88d7536310a7e604f7f",
|
"rev": "38be6514d41071863d2a9a2f38f6f3b3433c69fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742069588,
|
"lastModified": 1749794982,
|
||||||
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
|
"narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
|
"rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -64,11 +64,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742697269,
|
"lastModified": 1750214276,
|
||||||
"narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=",
|
"narHash": "sha256-1kniuhH70q4TAC/xIvjFYH46aHiLrbIlcr6fdrRwO1A=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "01973c84732f9275c50c5f075dd1f54cc04b3316",
|
"rev": "f9b2b2b1327ff6beab4662b8ea41689e0a57b8d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flakelight ./. {
|
flakelight ./. {
|
||||||
imports = [flakelight.flakelightModules.flakelightModule];
|
imports = [flakelight.flakelightModules.extendFlakelight];
|
||||||
formatters = pkgs:
|
formatters = pkgs:
|
||||||
with pkgs; {
|
with pkgs; {
|
||||||
"*.nix" = pkgs.lib.getExe alejandra;
|
"*.nix" = pkgs.lib.getExe alejandra;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue