!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

519 Members
Rust116 Servers

Load older messages


SenderMessageTime
29 Dec 2024
@luke:vuksta.comLuke I solved my issue using stable anyways - was looking for a window iterator, and thought I needed the nightly feature until I saw Vec has this feature 06:32:44
@tumble1999:matrix.orgTumbleRedacted or Malformed Event09:21:31
@tumble1999:matrix.orgTumblesorry wrong chat, i thought i clicked on regular nix chat09:22:23
30 Dec 2024
@cpick:matrix.orgcpick joined the room.04:01:40
@raitobezarius:matrix.orgraitobezarius changed their display name from raitobezarius (DECT: 3538 / EPVPN 2681) to raitobezarius.16:28:53
31 Dec 2024
@tilpner:tx0.cotilpner changed their display name from tilpner (38c3 3209) to tilpner.10:55:11
@getchoo:matrix.orggetchoo changed their profile picture.12:38:41
@tanja:catgirl.cloudTanja (she/her) changed their display name from Tanja (she/her) [DECT 6929] to Tanja (she/her).20:59:03
1 Jan 2025
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.14:26:31
2 Jan 2025
@antrz:matrix.organtrz joined the room.19:37:52
@antrz:matrix.organtrzHi19:38:01
@antrz:matrix.organtrzcan anyone help me install zed-editor preview with overrideAttrs?19:38:15
@niklaskorz:korz.devNiklas Korz
In reply to @antrz:matrix.org
can anyone help me install zed-editor preview with overrideAttrs?
You have to override version, src and cargoHash
19:41:37
@antrz:matrix.organtrz

Here's what i did:

    package = pkgs.zed-editor.overrideAttrs (old: rec {
      pname = "zed-editor";
      version = "0.168.0";

      src = pkgs.fetchFromGitHub {
        owner = "zed-industries";
        repo = "zed";
        tag = "v0.168.0-pre";
        hash = "sha256-GcsK64tJrEp1QVcLJV2xTWAzupmNXsMgzzW5KOEFqTI=";
      };

      cargoDeps = old.cargoDeps.overrideAttrs (
        lib.const {
          inherit src;
          name = "${pname}-x86_64.tar.gz";
          outputHash = "sha256-GcsK64tJrEp1QVcLJV2xTWAzupmNXsMgzzW5KOEFqTI=";
        }
      );
    });

19:42:28
@niklaskorz:korz.devNiklas KorzAre you on unstable or 24.11?19:42:55
@niklaskorz:korz.devNiklas Korz I think the install check will still fail though 19:43:19
@antrz:matrix.organtrzunstable19:43:20
@niklaskorz:korz.devNiklas KorzBecause we pass the version as an env var19:43:28
@niklaskorz:korz.devNiklas Korz And buildRustPackage has no finalAttrs unfortunately 19:43:40
@antrz:matrix.organtrzI see19:44:17
@niklaskorz:korz.devNiklas Korz
In reply to @antrz:matrix.org
unstable
In that case remove the cargoDeps and set cargoHash
19:44:35
@antrz:matrix.organtrzLet me show you what i get when i do that19:45:06
@antrz:matrix.organtrz
error: builder for '/nix/store/wyarz7bbc2565kna21g3ixc7x3fvb0na-zed-editor-0.168.0.drv' failed with exit code 1;
       last 25 log lines:
       > 16812c16536
       > <  "syn 2.0.90",
       > ---
       > >  "syn 2.0.87",
       > 16824c16548
       > <  "syn 2.0.90",
       > ---
       > >  "syn 2.0.87",
       > 16837,16838c16561,16562
       > <  "syn 2.0.90",
       > <  "winnow",
       > ---
       > >  "syn 2.0.87",
       > >  "winnow 0.6.20",
       >
       > ERROR: cargoHash or cargoSha256 is out of date
       >
       > Cargo.lock is not the same in /build/zed-editor-0.166.2-vendor
       >
       > To fix the issue:
       > 1. Set cargoHash/cargoSha256 to an empty string: `cargoHash = "";`
       > 2. Build the derivation and wait for it to fail with a hash mismatch
       > 3. Copy the "got: sha256-..." value back into the cargoHash field
       >    You should have: cargoHash = "sha256-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=";
       >
       For full logs, run 'nix log /nix/store/wyarz7bbc2565kna21g3ixc7x3fvb0na-zed-editor-0.168.0.drv'.
error: 1 dependencies of derivation '/nix/store/w1gz7g0h8ma6ay84dglc7jwwc9i6id76-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5m3xb2jfvafnl7dq55clp33kjcr3difh-home-manager-generation.drv' failed to build
19:46:48
@antrz:matrix.organtrz That's why i tried cargoDeps because neither the version nor the cargo hash were being set 19:47:39
@antrz:matrix.organtrz Niklas Korz 19:47:51
@antrz:matrix.organtrz Niklas Korz: any ideas? 19:57:32
@tomasajt:matrix.orgToma I recommend just copying the entire expression and updating the version there, since version is used in a lot of places in the derivation, which cannot be overrideAttrs-ed. 20:30:44
@antrz:matrix.organtrzLike copy the entire derivation? can you give me an example? I'm a newbie to nixos20:33:05
@tomasajt:matrix.orgToma copy the entire package.nix file to somewhere next to your config, and then instead of writing pkgs.zed-editor you write (pkgs.callPackage ./the-copied-file.nix {}) 20:35:21
@tomasajt:matrix.orgTomaand of course, don't forget to update all hashes.20:35:46

Show newer messages


Back to Room ListRoom Version: 6