Use fenix
This commit is contained in:
parent
12082258f5
commit
068d9bdfeb
2 changed files with 50 additions and 6 deletions
17
flake.nix
17
flake.nix
|
|
@ -3,19 +3,27 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
naersk = {
|
||||
url = "github:nmattia/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, naersk }:
|
||||
outputs = { self, nixpkgs, flake-utils, fenix, naersk }:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
naersk-lib = naersk.lib."${system}";
|
||||
rustToolchain = fenix.packages."${system}".stable.defaultToolchain;
|
||||
naersk-lib = naersk.lib.${system}.override {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
packages.azirevpn = naersk-lib.buildPackage {
|
||||
|
|
@ -30,11 +38,8 @@
|
|||
devShell = pkgs.mkShell {
|
||||
name = "azirevpn-env";
|
||||
buildInputs = [
|
||||
pkgs.cargo
|
||||
pkgs.clippy
|
||||
rustToolchain
|
||||
pkgs.rust-analyzer
|
||||
pkgs.rustc
|
||||
pkgs.rustfmt
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue