Skip to content

Commit

Permalink
chore: no longer patch rime-data into librime, remove makeWrapper
Browse files Browse the repository at this point in the history
Currently rime-data is only used to pass checkPhase.
Users may need to set RIME_DATA_DIR and configure editors themselves.
  • Loading branch information
definfo committed Oct 28, 2024
1 parent 312250d commit 050d0b4
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions pkgs/by-name/ri/rime-ls/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
rustPlatform,
fetchFromGitHub,
pkg-config,
makeWrapper,
librime,
rime-data,
symlinkJoin,
Expand All @@ -15,11 +14,6 @@ let
name = "rime_ls-rime-data";
paths = rimeDataPkgs;
};
librime' = librime.overrideAttrs (old: {
postInstall = ''
cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data
'';
});
in
rustPlatform.buildRustPackage rec {
pname = "rime-ls";
Expand All @@ -42,18 +36,12 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
makeWrapper
];

buildInputs = [ librime' ];
buildInputs = [ librime ];

# Set RIME_DATA_DIR to work around test_get_candidates during checkPhase
env.RIME_DATA_DIR = "${librime'}/share/rime-data";

postInstall = ''
wrapProgram $out/bin/rime_ls \
--set RIME_DATA_DIR ${librime'}/share/rime-data
'';
env.RIME_DATA_DIR = "${rimeDataDrv}/share/rime-data";

passthru.updateScript = gitUpdater { };

Expand Down

0 comments on commit 050d0b4

Please sign in to comment.