pot: use cargoRoot instead of sourceRoot to avoid hack
This commit is contained in:
parent
851c8b9a53
commit
52591a80f4
@ -34,8 +34,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-0Q1hf1AGAZv6jt05tV3F6++lzLpddvjhiykIhV40cPs=";
|
hash = "sha256-0Q1hf1AGAZv6jt05tV3F6++lzLpddvjhiykIhV40cPs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "${finalAttrs.src.name}/src-tauri";
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
|
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
|
||||||
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
|
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
|
||||||
@ -46,11 +44,16 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-iYQNGRWqXYBU+WIH/Xm8qndgOQ6RKYCtAyi93kb7xrQ=";
|
hash = "sha256-iYQNGRWqXYBU+WIH/Xm8qndgOQ6RKYCtAyi93kb7xrQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pnpmRoot = "..";
|
cargoRoot = "src-tauri";
|
||||||
|
buildAndTestSubdir = "src-tauri";
|
||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
inherit (finalAttrs) src;
|
inherit (finalAttrs)
|
||||||
sourceRoot = "${finalAttrs.src.name}/src-tauri";
|
pname
|
||||||
|
version
|
||||||
|
src
|
||||||
|
cargoRoot
|
||||||
|
;
|
||||||
hash = "sha256-dyXINRttgsqCfmgtZNXxr/Rl8Yn0F2AVm8v2Ao+OBsw=";
|
hash = "sha256-dyXINRttgsqCfmgtZNXxr/Rl8Yn0F2AVm8v2Ao+OBsw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,12 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
}
|
}
|
||||||
)}";
|
)}";
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
# pnpm.configHook has to write to .., as our sourceRoot is set to src-tauri
|
|
||||||
# TODO: move frontend into its own drv
|
|
||||||
chmod +w ..
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Cross-platform translation software";
|
description = "Cross-platform translation software";
|
||||||
mainProgram = "pot";
|
mainProgram = "pot";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user