From 97e68ea559a48853750de75c70b3acbdcd54816c Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Wed, 11 Jun 2025 02:54:14 -0400 Subject: [PATCH] Update edit pkg with pull request changes --- pkgs/microsoft-edit/package.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/microsoft-edit/package.nix b/pkgs/microsoft-edit/package.nix index 2414a28..2f17c3f 100644 --- a/pkgs/microsoft-edit/package.nix +++ b/pkgs/microsoft-edit/package.nix @@ -1,9 +1,11 @@ { lib, + stdenv, rustPlatform, fetchFromGitHub, versionCheckHook, nix-update-script, + icu, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "microsoft-edit"; @@ -26,6 +28,22 @@ rustPlatform.buildRustPackage (finalAttrs: { ./write-filled-fix.patch ]; + buildInputs = [ + icu + ]; + + postFixup = + let + rpathAppend = lib.makeLibraryPath [ icu ]; + in + lib.optionalString stdenv.hostPlatform.isElf '' + patchelf $out/bin/edit \ + --add-rpath ${rpathAppend} + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + ${stdenv.cc.targetPrefix}install_name_tool -add_rpath ${rpathAppend} $out/bin/edit + ''; + # Disabled for now, microsoft/edit#194 doInstallCheck = false; nativeInstallCheckInputs = [ versionCheckHook ]; @@ -47,5 +65,6 @@ rustPlatform.buildRustPackage (finalAttrs: { changelog = "https://github.com/microsoft/edit/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ RossSmyth ]; # https://github.com/NixOS/nixpkgs/pull/409075 + platforms = lib.platforms.all; }; })