Merge pull request #335460 from linj-fork/pr/improve-lspce-rename

emacsPackages.lspce: simplify module renaming
This commit is contained in:
adisbladis 2024-08-18 15:12:56 +12:00 committed by GitHub
commit e95195e3fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,8 +2,12 @@
lib,
fetchFromGitHub,
rustPlatform,
stdenv,
}:
let
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
in
rustPlatform.buildRustPackage {
pname = "lspce-module";
version = "1.1.0-unstable-2024-07-14";
@ -22,13 +26,8 @@ rustPlatform.buildRustPackage {
"--skip=msg::tests::serialize_request_with_null_params"
];
# rename module without changing either suffix or location
# use for loop because there seems to be two modules on darwin systems
# https://github.com/zbelial/lspce/issues/7#issue-1783708570
postInstall = ''
for f in $out/lib/*; do
mv --verbose $f $out/lib/lspce-module.''${f##*.}
done
mv --verbose $out/lib/liblspce_module${libExt} $out/lib/lspce-module${libExt}
'';
meta = {