This PR adds a Nix/NixOS development-shell (`shell.nix`), which is based on the upstream [nixpkgs](https://github.com/NixOS/nixpkgs/blob/c5d4d458115263ec3ee0efd974e6aeb2f787a0ed/pkgs/by-name/ze/zed-editor/package.nix), as well as its corresponding `flake.nix` file. To use it, run either the `nix-shell` command (uses the `shell.nix` file), or the newer but experimental `nix develop` command (uses `flake.nix`) ~~This has not been tested on macOS, tho preliminary code is there to try and support it, feel free to report any issues.~~ Zed unfortunately doesn't build on nix-darwin (see https://github.com/NixOS/nixpkgs/issues/320084), so this PR doesn't aim to add darwin support. --- Release Notes: - N/A --------- Signed-off-by: xtrm <oss@xtrm.me> Co-authored-by: Niklas Korz <niklas@niklaskorz.de>
32 lines
669 B
Nix
32 lines
669 B
Nix
{
|
|
description = "High-performance, multiplayer code editor from the creators of Atom and Tree-sitter";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
inherit (self) outputs;
|
|
systems = [
|
|
"aarch64-linux"
|
|
"x86_64-linux"
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
];
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
in
|
|
{
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
default = import ./shell.nix { inherit pkgs; };
|
|
}
|
|
);
|
|
};
|
|
}
|