mirror of
https://github.com/oxalica/rust-overlay.git
synced 2025-10-06 00:02:40 +02:00
Tweak flake outputs and README
This commit is contained in:
27
flake.nix
27
flake.nix
@@ -1,7 +1,7 @@
|
||||
{
|
||||
description = ''
|
||||
Pure and reproducible overlay for binary distributed rust toolchains.
|
||||
A better replacement for github:mozilla/nixpkgs-mozilla
|
||||
A compatible but better replacement for rust overlay of github:mozilla/nixpkgs-mozilla.
|
||||
'';
|
||||
|
||||
inputs = {
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }@inputs: let
|
||||
inherit (nixpkgs) lib;
|
||||
overlay = import ./default.nix;
|
||||
|
||||
overlay = import ./.;
|
||||
|
||||
allSystems = [
|
||||
"aarch64-linux"
|
||||
@@ -23,20 +24,32 @@
|
||||
];
|
||||
|
||||
in {
|
||||
|
||||
overlay = final: prev: overlay final prev;
|
||||
|
||||
} // flake-utils.lib.eachSystem allSystems (system: let
|
||||
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
|
||||
in rec {
|
||||
# `defaultApp`, `defaultPackage` and `packages` are for human only.
|
||||
# They are subject to change and **DO NOT** depend on them in your flake.
|
||||
# Please use `overlay` instead.
|
||||
|
||||
defaultApp = {
|
||||
type = "app";
|
||||
program = "${defaultPackage}/bin/rustc";
|
||||
};
|
||||
defaultPackage = packages.rust-stable;
|
||||
packages = {
|
||||
rust-stable = pkgs.latest.rustChannels.stable.rust;
|
||||
rust-nightly = pkgs.latest.rustChannels.nightly.rust;
|
||||
};
|
||||
defaultPackage = packages.rust;
|
||||
|
||||
# FIXME: We can only directly provide derivations here without nested set.
|
||||
# Currently we only provide stable releases. Some nightly versions have components missing
|
||||
# on some platforms, which makes `nix flake check` to be failed.
|
||||
packages =
|
||||
lib.mapAttrs' (version: comps: {
|
||||
name = "rust-${lib.replaceStrings ["."] ["-"] version}";
|
||||
value = comps.rust;
|
||||
}) pkgs.rust-bin.stable // {
|
||||
rust = packages.rust-latest;
|
||||
};
|
||||
|
||||
checks = {
|
||||
kind2 = (pkgs.rustChannelOf { channel = "1.48.0"; }).rust;
|
||||
|
Reference in New Issue
Block a user