Comments (11)
You should note that just because it compiles does not mean it's ready. See
https://github.com/zed-industries/zed/issues/7015
That's why I thought It would belong here because it's chaotic. Right now I'm fighting with rust development on Nix so I hope I will make it work :)
from nyx.
On https://aur.archlinux.org/packages/zed-editor I see that they managed to build it so I will test if it works now
from nyx.
So I guess It's a great opportunity to improve Nix knowledge because I've never done it before. I'll let you know when I manage to do it.
from nyx.
If it compiles, it looks enough to have it here 😄
from nyx.
Okay after some digging i have a good news and bad news. Good news is that (i think) I created working Nix expression to build it. Bad news is that it is not actually working but not because of me but there is an issue with linux build in general.
zed-industries/zed#7015 <---- there is current Linux support status.
https://aur.archlinux.org/packages/zed-editor <----- and there is AUR repo with exactly same problem that i have.
The problem is "protoc failed: Could not make proto path relative: protocol/livekit_room.proto: No such file or directory\n""
It seems that this livekit is not cross-platform so no linux support yet...
Anyway I want to send what I created with Nix and If someone want to bother I would really appreciate feedback.
I know that this code is probably terrible. However, it's encouraging to see that I reached the same moment as AUR.
Flake.nix
{
description = "A flake for the Zed Code Editor";
# Specifies the Nix flake inputs
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
# Utilizes flake-utils to simplify flake creation for multiple systems
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
# Your package as a function that accepts nixpkgs as an argument
zed = pkgs.callPackage ./default.nix { pkgs;};
in
{
packages.zed = zed;
defaultPackage = zed;
devShell = pkgs.mkShell {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ zed pkgs.openssl ];
};
});
}
default.nix
{ lib, fetchFromGitHub, rustPlatform, nixpkgs, pkgs }:
rustPlatform.buildRustPackage rec {
pname = "zed";
version = "v0.122.2";
src = fetchFromGitHub {
owner = "zed-industries";
repo = pname;
rev = version;
hash = "sha256-9yrlRhifOCSv++14ZHcKZCfLja3H2oc3Ttx3ltkLUvQ=";
};
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};
nativeBuildInputs = [ pkgs.pkg-config pkgs.wayland pkgs.cmake pkgs.fontconfig pkgs.alsa-lib pkgs.vulkan-validation-layers pkgs.libxkbcommon pkgs.protobuf ];
buildInputs = [ pkgs.openssl pkgs.wayland pkgs.cmake pkgs.fontconfig pkgs.alsa-lib pkgs.vulkan-validation-layers pkgs.libxkbcommon pkgs.protobuf ];
meta = with lib; {
description = "Zed Code Editor";
homepage = "https://zed.dev";
license = licenses.unlicense;
maintainers = [];
};
}
from nyx.
FYI, Zed has been merged in nixpkgs : NixOS/nixpkgs#284010
from nyx.
It has a Cargo.lock
, and by looking at the Dockerfile
cargo is all it needs to build (and libcurl).
If you can make it work with buildRustPackage
, post the code here. And then I'll make sure it builds a fresh version every day.
from nyx.
You should note that just because it compiles does not mean it's ready. See https://github.com/zed-industries/zed/issues/7015
from nyx.
Okay so I had some progress. I managed to build Livekit Protocol from source with this.
{ lib, fetchFromGitHub, pkgs, buildGoModule }:
buildGoModule rec {
pname = "protocol";
version = "a2f6423fd17cb73d1b19a1161f2daa7869f1391d";
src = fetchFromGitHub {
owner = "livekit";
repo = pname;
rev = version;
hash = "sha256-2NzCBIDbm8PiDHjDiQEEH1p+CxMvRzinM0hnyAG+kgE=";
};
vendorHash = "sha256-fBGJjeXJa8Wtx1yTO56r+3tm+6IPoG+4Vh0TRORwzsQ=";
meta = with lib; {
description = "Livekit Protocol";
homepage = "https://github.com/livekit/protocol/";
license = licenses.unlicense;
maintainers = [];
};
}
PKGBUILD from aur replaces default Livekit with the one built from source(If I understand it correctly). So I guess the only thing to do is to replace it in default.nix file... but I have no idea how to do it right now.
On aur they do something like this
cd "$_archive"
rm -r crates/live_kit_server/protocol
ln -sT "$srcdir/protocol-${_tags[protocol]}" crates/live_kit_server/protocol
I already have this protocol built but I don't know how to use it to replace this crates/live_kit_server/protocol file.
If someone could help I'll be glad but I will still investigate it in my free-time.
from nyx.
I need to rewrite my generic git update script to properly account cargo hashes, maven hashes, and Cargo lock bumps.
from nyx.
Done. Going to bump the hashes by hand, but rust compilation is slow so it will take some time to cache.
from nyx.
Related Issues (20)
- [Request] Distrobox-git
- [Request] linux-cachyos-rc HOT 1
- [Bug] Issue running latencyflex from this repo HOT 7
- [Request] SurrealDB-nightly HOT 1
- [Request] Jovian-NixOS HOT 3
- [Bug] No i915 gallium driver on mesa-git HOT 2
- [Request] Enable intel xe kmd for mesa HOT 8
- [Request] Instead of setting linux_cachyos, assert AMD_PRIVATE_COLOR for HDR HOT 4
- [Bug] Kernel 6.8.1 bpf missing HOT 4
- [Support Request] Sync scx to remote HEAD HOT 6
- [Bug Report] scx_lavd failed to run HOT 6
- [Bug] linuxPackages_cachyos-lto.nvidia_x11 fails to build (fix included) HOT 6
- [Bug] linux-cachyos iwlwifi crashes HOT 7
- [Request] Make linux-cachyos also part of pkgsx86_64_v3-core HOT 1
- [Request] picom - X11 Compositor HOT 1
- [Request] HOT 1
- [Request] ollama HOT 1
- [Request] open-webui HOT 1
- [Bug] readline build failure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nyx.