2020-01-15 19:03:12 +00:00
|
|
|
{
|
2022-07-09 10:08:57 +00:00
|
|
|
description = "Build Rust projects with ease. No configuration, no code generation; IFD and sandbox friendly.";
|
2020-01-15 19:03:12 +00:00
|
|
|
|
2020-10-25 02:53:21 +00:00
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
2021-07-08 17:12:09 +00:00
|
|
|
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "x86_64-darwin" "i686-linux" "aarch64-linux" "aarch64-darwin" ];
|
2022-07-09 10:08:57 +00:00
|
|
|
|
|
|
|
in rec {
|
2020-10-25 02:53:21 +00:00
|
|
|
lib = forAllSystems (system: nixpkgs.legacyPackages."${system}".callPackage ./default.nix { });
|
2022-07-09 10:08:57 +00:00
|
|
|
|
|
|
|
# Useful when composing with other flakes:
|
2020-10-25 02:53:21 +00:00
|
|
|
overlay = import ./overlay.nix;
|
2021-03-25 04:26:11 +00:00
|
|
|
|
|
|
|
defaultTemplate = templates.hello-world;
|
2022-07-09 10:08:57 +00:00
|
|
|
|
2021-03-25 04:26:11 +00:00
|
|
|
templates = {
|
|
|
|
hello-world = {
|
|
|
|
path =
|
|
|
|
builtins.filterSource (path: type: baseNameOf path == "flake.nix")
|
|
|
|
./examples/hello-world;
|
|
|
|
};
|
2022-07-09 10:08:57 +00:00
|
|
|
|
2021-03-25 04:26:11 +00:00
|
|
|
cross-windows = {
|
|
|
|
path =
|
|
|
|
builtins.filterSource (path: type: baseNameOf path == "flake.nix")
|
|
|
|
./examples/cross-windows;
|
|
|
|
};
|
2022-07-09 10:08:57 +00:00
|
|
|
|
2021-03-25 04:26:11 +00:00
|
|
|
static-musl = {
|
|
|
|
path =
|
|
|
|
builtins.filterSource (path: type: baseNameOf path == "flake.nix")
|
|
|
|
./examples/static-musl;
|
|
|
|
};
|
2022-07-09 10:08:57 +00:00
|
|
|
|
2021-03-25 04:26:11 +00:00
|
|
|
multi-target = {
|
|
|
|
path =
|
|
|
|
builtins.filterSource (path: type: baseNameOf path == "flake.nix")
|
|
|
|
./examples/multi-target;
|
|
|
|
};
|
|
|
|
};
|
2020-10-25 02:53:21 +00:00
|
|
|
};
|
2020-01-15 19:03:12 +00:00
|
|
|
}
|