nix: use rust-overlay for nightly Rust
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I74b2d21496261a3178ce043a5990583d6a6a6964
This commit is contained in:
parent
9f62b28c58
commit
c310ca5635
9 changed files with 65 additions and 12 deletions
23
flake.lock
generated
23
flake.lock
generated
|
|
@ -34,7 +34,28 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770433312,
|
||||
"narHash": "sha256-IaiqGwmLBrR0z67t/oaS6GIFxv9V8mDY7dBTuYVTbKY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "9922ff9f99a6436756cbe6f5d11f9c3630e58cf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
19
flake.nix
19
flake.nix
|
|
@ -2,12 +2,17 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixpkgs-unstable";
|
||||
crane.url = "github:ipetkov/crane";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
crane,
|
||||
self,
|
||||
rust-overlay,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
|
|
@ -20,8 +25,16 @@
|
|||
};
|
||||
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
craneLib = crane.mkLib pkgs;
|
||||
pkgs = nixpkgs.legacyPackages.${system}.extend rust-overlay.overlays.default;
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain (p:
|
||||
# Build tools
|
||||
# We use the rust-overlay to get the stable Rust toolchain for various targets.
|
||||
# This is not exactly necessary, but it allows for compiling for various targets
|
||||
# with the least amount of friction.
|
||||
p.rust-bin.nightly.latest.default.override {
|
||||
extensions = ["rustfmt" "rust-analyzer" "clippy"];
|
||||
targets = [];
|
||||
});
|
||||
|
||||
src = let
|
||||
fs = lib.fileset;
|
||||
|
|
@ -97,8 +110,6 @@
|
|||
postgresql_18
|
||||
|
||||
taplo
|
||||
(rustfmt.override {asNightly = true;})
|
||||
clippy
|
||||
cargo-nextest
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-api-crud";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-auth-rbac";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-basic-api";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-e2e";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-features";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-service-startup";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, self}:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}:
|
||||
pkgs.testers.nixosTest {
|
||||
name = "fc-webhooks";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue