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-08-26 15:10:34 +00:00
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-18 02:09:59 +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-08-26 15:10:34 +00:00
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
crane,
|
|
|
|
fenix,
|
|
|
|
...
|
|
|
|
}: let
|
2024-09-23 14:16:15 +00:00
|
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
|
|
|
|
|
|
|
overlays = {
|
|
|
|
fenix = fenix.overlays.default;
|
|
|
|
rust-toolchain = final: prev: {
|
|
|
|
rustToolchain = final.fenix.stable.toolchain;
|
2024-08-27 16:24:42 +00:00
|
|
|
};
|
2024-09-23 14:16:15 +00:00
|
|
|
zed-editor = final: prev: {
|
|
|
|
zed-editor = final.callPackage ./nix/build.nix {
|
|
|
|
craneLib = (crane.mkLib final).overrideToolchain final.rustToolchain;
|
|
|
|
rustPlatform = final.makeRustPlatform {
|
|
|
|
inherit (final.rustToolchain) cargo rustc;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mkPkgs = system:
|
|
|
|
import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = builtins.attrValues overlays;
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
2024-09-23 14:16:15 +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
|
|
|
});
|
|
|
|
|
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = import ./nix/shell.nix {inherit pkgs;};
|
|
|
|
});
|
|
|
|
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
|
|
|
|
2024-09-23 14:16:15 +00:00
|
|
|
overlays =
|
|
|
|
overlays
|
|
|
|
// {
|
|
|
|
default = nixpkgs.lib.composeManyExtensions (builtins.attrValues overlays);
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
|
|
|
};
|
2024-07-09 07:21:42 +00:00
|
|
|
}
|