clean both flake and non-flake API

This commit is contained in:
Clément DOUIN
2024-11-27 10:04:12 +01:00
parent 7806de626e
commit 6dc448b062
11 changed files with 154 additions and 302 deletions
+19 -10
View File
@@ -1,17 +1,26 @@
{ pkgs ? import <nixpkgs> { } }:
{ pkgs ? import <nixpkgs> { }
, fenix ? import (fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz") { }
, withNotmuch ? false
, withGpg ? false
, withOpenSsl ? false
}:
let
inherit (pkgs) lib;
fenix = import (fetchTarball "https://github.com/soywod/fenix/archive/main.tar.gz") { };
mkToolchain = import ./rust-toolchain.nix { inherit lib fenix; };
rust = mkToolchain.fromFile;
mkRustToolchain = import ./rust-toolchain.nix { inherit lib fenix; };
rust = mkRustToolchain.fromFile;
in
pkgs.mkShell {
buildInputs = with pkgs; [
nixd
nixpkgs-fmt
rust
];
buildInputs = [ ]
# Nix language
++ [ pkgs.nixd pkgs.nixpkgs-fmt ]
# Rust
++ [ rust ]
# Cargo features
++ lib.optional withNotmuch pkgs.notmuch
++ lib.optional withGpg pkgs.gpgme
++ lib.optional withOpenSsl pkgs.openssl;
}