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";
|
|
|
|
};
|
|
|
|
crane = {
|
|
|
|
url = "github:ipetkov/crane";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
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
|
|
|
|
forAllSystems = function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
2024-07-09 07:21:42 +00:00
|
|
|
"x86_64-linux"
|
2024-08-26 15:10:34 +00:00
|
|
|
"aarch64-linux"
|
|
|
|
] (system:
|
|
|
|
function (import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [fenix.overlays.default];
|
|
|
|
}));
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (pkgs: let
|
|
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain (p: p.fenix.stable.toolchain);
|
2024-08-27 16:24:42 +00:00
|
|
|
rustPlatform = pkgs.makeRustPlatform {
|
|
|
|
inherit (pkgs.fenix.stable.toolchain) cargo rustc;
|
|
|
|
};
|
2024-08-26 15:10:34 +00:00
|
|
|
nightlyBuild = pkgs.callPackage ./nix/build.nix {
|
2024-08-27 16:24:42 +00:00
|
|
|
inherit craneLib rustPlatform;
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
zed-editor = nightlyBuild;
|
|
|
|
default = nightlyBuild;
|
|
|
|
});
|
|
|
|
|
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = import ./nix/shell.nix {inherit pkgs;};
|
|
|
|
});
|
|
|
|
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
|
|
|
|
2024-08-27 16:24:42 +00:00
|
|
|
overlays.default = final: prev: {
|
2024-08-26 15:10:34 +00:00
|
|
|
zed-editor = final.callPackage ./nix/build.nix {
|
|
|
|
craneLib = (crane.mkLib final).overrideToolchain (p: p.fenix.stable.toolchain);
|
2024-08-27 16:24:42 +00:00
|
|
|
rustPlatform = final.makeRustPlatform {
|
|
|
|
inherit (final.fenix.stable.toolchain) cargo rustc;
|
|
|
|
};
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
2024-07-09 07:21:42 +00:00
|
|
|
};
|
2024-08-26 15:10:34 +00:00
|
|
|
};
|
2024-07-09 07:21:42 +00:00
|
|
|
}
|