44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
# SPDX-FileCopyrightText: 2026 Qyriad <qyriad@qyriad.me>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.1
|
|
|
|
{
|
|
pkgs ? import <nixpkgs> {
|
|
config = {
|
|
checkMeta = true;
|
|
allowAliases = false;
|
|
};
|
|
},
|
|
qpkgs ? let
|
|
src = fetchTarball "https://github.com/Qyriad/nur-packages/archive/main.tar.gz";
|
|
in import src { inherit pkgs; },
|
|
dynix ? import ./default.nix { inherit pkgs qpkgs; },
|
|
fenixLib ? let
|
|
src = fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz";
|
|
in import src { inherit pkgs; },
|
|
fenixBaseToolchain ? fenixLib.stable.withComponents [
|
|
"cargo"
|
|
"rustc"
|
|
"llvm-tools"
|
|
"rust-std"
|
|
"rust-docs"
|
|
"rust-src"
|
|
"rustc-dev"
|
|
"clippy"
|
|
],
|
|
fenixToolchain ? fenixLib.combine [
|
|
fenixBaseToolchain
|
|
# Rustfmt is very handy to have as nightly.
|
|
fenixLib.latest.rustfmt
|
|
],
|
|
}: let
|
|
inherit (pkgs) lib;
|
|
|
|
mkDevShell = dynix: qpkgs.callPackage dynix.mkDevShell { inherit fenixToolchain; };
|
|
devShell = mkDevShell dynix |> qpkgs.stdlib.mkStdenvPretty;
|
|
|
|
byStdenv = lib.mapAttrs (lib.const mkDevShell) dynix.byStdenv;
|
|
|
|
in devShell.overrideAttrs (prev: {
|
|
passthru = { inherit byStdenv; };
|
|
})
|