chore(flake): cleanup

This commit is contained in:
Muhammad Nauman Raza 2024-03-13 21:07:42 +00:00
parent 69c27f0f88
commit 29a7409d73
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -1,6 +1,4 @@
{ {
description = "Rust development environment for Ambition using fenix";
inputs = { inputs = {
fenix = { fenix = {
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
@ -27,20 +25,15 @@
toolchain = pkgs.fenix.complete; toolchain = pkgs.fenix.complete;
in rec in rec
{ {
# Executed by `nix build`
packages.default = packages.default =
(pkgs.makeRustPlatform { (pkgs.makeRustPlatform {
# Use nightly rustc and cargo provided by fenix for building
inherit (toolchain) cargo rustc; inherit (toolchain) cargo rustc;
}) })
.buildRustPackage { .buildRustPackage {
pname = "vaporise"; pname = "vaporise";
version = "0.1.0"; version = "0.2.0";
src = ./.; src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
# For other makeRustPlatform features see:
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#cargo-features-cargo-features
}; };
# Executed by `nix run` # Executed by `nix run`
@ -48,14 +41,8 @@
# Used by `nix develop` # Used by `nix develop`
devShells.default = pkgs.mkShell rec { devShells.default = pkgs.mkShell rec {
# Use nightly cargo & rustc provided by fenix. Add for packages for the dev shell here buildInputs = with pkgs.toolchain; [
buildInputs = with pkgs; [ cargo rustc rust-src clippy rustfmt # rust components
(with toolchain; [
cargo rustc rust-src clippy rustfmt # rust components
])
mold
clang
pkg-config
]; ];
# Specify the rust-src path (many editors rely on this) # Specify the rust-src path (many editors rely on this)
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";