Skip to content

Commit 09d89d2

Browse files
authored
pot: use cargoRoot instead of sourceRoot to avoid hack (#407155)
2 parents 889b4dc + 52591a8 commit 09d89d2

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

pkgs/by-name/po/pot/package.nix

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ stdenv.mkDerivation (finalAttrs: {
3434
hash = "sha256-0Q1hf1AGAZv6jt05tV3F6++lzLpddvjhiykIhV40cPs=";
3535
};
3636

37-
sourceRoot = "${finalAttrs.src.name}/src-tauri";
38-
3937
postPatch = ''
4038
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
4139
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
@@ -46,11 +44,16 @@ stdenv.mkDerivation (finalAttrs: {
4644
hash = "sha256-iYQNGRWqXYBU+WIH/Xm8qndgOQ6RKYCtAyi93kb7xrQ=";
4745
};
4846

49-
pnpmRoot = "..";
47+
cargoRoot = "src-tauri";
48+
buildAndTestSubdir = "src-tauri";
5049

5150
cargoDeps = rustPlatform.fetchCargoVendor {
52-
inherit (finalAttrs) src;
53-
sourceRoot = "${finalAttrs.src.name}/src-tauri";
51+
inherit (finalAttrs)
52+
pname
53+
version
54+
src
55+
cargoRoot
56+
;
5457
hash = "sha256-dyXINRttgsqCfmgtZNXxr/Rl8Yn0F2AVm8v2Ao+OBsw=";
5558
};
5659

@@ -93,12 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
9396
}
9497
)}";
9598

96-
preConfigure = ''
97-
# pnpm.configHook has to write to .., as our sourceRoot is set to src-tauri
98-
# TODO: move frontend into its own drv
99-
chmod +w ..
100-
'';
101-
10299
meta = {
103100
description = "Cross-platform translation software";
104101
mainProgram = "pot";

0 commit comments

Comments
 (0)