2024-07-09 07:21:42 +00:00
|
|
|
{
|
|
|
|
description = "High-performance, multiplayer code editor from the creators of Atom and Tree-sitter";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
2024-11-27 18:22:17 +00:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
2024-08-26 15:10:34 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-11-29 09:09:33 +00:00
|
|
|
crane.url = "github:ipetkov/crane";
|
2024-08-27 16:24:42 +00:00
|
|
|
flake-compat.url = "github:edolstra/flake-compat";
|
2024-07-09 07:21:42 +00:00
|
|
|
};
|
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
outputs =
|
2024-11-29 09:09:33 +00:00
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
rust-overlay,
|
|
|
|
crane,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-27 18:22:17 +00:00
|
|
|
let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
|
|
|
|
|
|
|
overlays = {
|
|
|
|
rust-overlay = rust-overlay.overlays.default;
|
|
|
|
rust-toolchain = final: prev: {
|
|
|
|
rustToolchain = final.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
|
|
};
|
|
|
|
zed-editor = final: prev: {
|
|
|
|
zed-editor = final.callPackage ./nix/build.nix {
|
2024-11-29 09:09:33 +00:00
|
|
|
crane = crane.mkLib final;
|
|
|
|
rustToolchain = final.rustToolchain;
|
2024-09-23 14:16:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
mkPkgs =
|
|
|
|
system:
|
|
|
|
import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = builtins.attrValues overlays;
|
|
|
|
};
|
2024-09-23 14:16:15 +00:00
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f (mkPkgs system));
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages = forAllSystems (pkgs: {
|
|
|
|
zed-editor = pkgs.zed-editor;
|
|
|
|
default = pkgs.zed-editor;
|
|
|
|
});
|
2024-08-26 15:10:34 +00:00
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = import ./nix/shell.nix { inherit pkgs; };
|
|
|
|
});
|
2024-08-26 15:10:34 +00:00
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-08-26 15:10:34 +00:00
|
|
|
|
2024-11-27 18:22:17 +00:00
|
|
|
overlays = overlays // {
|
2024-09-23 14:16:15 +00:00
|
|
|
default = nixpkgs.lib.composeManyExtensions (builtins.attrValues overlays);
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
2024-11-27 18:22:17 +00:00
|
|
|
};
|
2024-07-09 07:21:42 +00:00
|
|
|
}
|