flake: use rust-overlay

This commit is contained in:
Daniël de Kok 2024-08-09 13:02:57 +00:00
parent 6ee7e2e208
commit 9f039ad4b3
2 changed files with 37 additions and 4 deletions

View File

@ -56,9 +56,31 @@
"tgi-nix", "tgi-nix",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay",
"tgi-nix": "tgi-nix" "tgi-nix": "tgi-nix"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"tgi-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1723170066,
"narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View File

@ -3,12 +3,17 @@
tgi-nix.url = "github:danieldk/tgi-nix"; tgi-nix.url = "github:danieldk/tgi-nix";
nixpkgs.follows = "tgi-nix/nixpkgs"; nixpkgs.follows = "tgi-nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "tgi-nix/nixpkgs";
};
}; };
outputs = outputs =
{ {
self, self,
nixpkgs, nixpkgs,
flake-utils, flake-utils,
rust-overlay,
tgi-nix, tgi-nix,
}: }:
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
@ -20,7 +25,10 @@
}; };
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit config system; inherit config system;
overlays = [ tgi-nix.overlay ]; overlays = [
rust-overlay.overlays.default
tgi-nix.overlay
];
}; };
in in
{ {
@ -29,11 +37,14 @@
mkShell { mkShell {
buildInputs = buildInputs =
[ [
cargo
clippy
openssl.dev openssl.dev
pkg-config pkg-config
rustfmt (rust-bin.stable.latest.default.override {
extensions = [
"rust-analyzer"
"rust-src"
];
})
] ]
++ (with python3.pkgs; [ ++ (with python3.pkgs; [
venvShellHook venvShellHook