Update edit pkg with pull request changes

This commit is contained in:
Chris Toph 2025-06-11 02:54:14 -04:00
parent a900ced7b4
commit 97e68ea559

View file

@ -1,9 +1,11 @@
{ {
lib, lib,
stdenv,
rustPlatform, rustPlatform,
fetchFromGitHub, fetchFromGitHub,
versionCheckHook, versionCheckHook,
nix-update-script, nix-update-script,
icu,
}: }:
rustPlatform.buildRustPackage (finalAttrs: { rustPlatform.buildRustPackage (finalAttrs: {
pname = "microsoft-edit"; pname = "microsoft-edit";
@ -26,6 +28,22 @@ rustPlatform.buildRustPackage (finalAttrs: {
./write-filled-fix.patch ./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 # Disabled for now, microsoft/edit#194
doInstallCheck = false; doInstallCheck = false;
nativeInstallCheckInputs = [ versionCheckHook ]; nativeInstallCheckInputs = [ versionCheckHook ];
@ -47,5 +65,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
changelog = "https://github.com/microsoft/edit/releases/tag/v${finalAttrs.version}"; changelog = "https://github.com/microsoft/edit/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ RossSmyth ]; # https://github.com/NixOS/nixpkgs/pull/409075 maintainers = with lib.maintainers; [ RossSmyth ]; # https://github.com/NixOS/nixpkgs/pull/409075
platforms = lib.platforms.all;
}; };
}) })