emacsPackages.lspce: simplify module renaming
Actually, there is only one module on darwin systems. So the loop is removed. In addition, the bash magic is replaced with nix's stdenv.hostPlatform.extensions.sharedLibrary.
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user