40 unwrapped = stdenv.mkDerivation {
41 pname = "${pname}-unwrapped";
42 inherit version src meta;
44 nativeBuildInputs = [ autoPatchelfHook ];
77 # Don't wrap the Qt apps; upstream has its own wrapper scripts.
78 dontWrapQtApps = true;
81 rm -r lib/plugins lib/libQt6* lib/libssl* lib/libicu* lib/libcrypto*
87 addAutoPatchelfSearchPath $out/lib
88 ln -s "${qtbase}/${qtbase.qtPluginPrefix}" $out/lib/plugins
92 patchelf --clear-symbol-version close $out/bin/p4{v,admin}.bin
97 inherit pname version;
99 # Build a "clean" version of the package so that we don't add extra ".bin" or
100 # configuration files to users' PATHs. We can't easily put the unwrapped
101 # package files in libexec (where they belong, probably) because the upstream
102 # wrapper scripts have the bin directory hardcoded.
105 for f in p4admin p4merge p4v p4vc; do
106 ln -s ${unwrapped}/bin/$f $out/bin
109 preferLocalBuild = true;
111 inherit (unwrapped) meta passthru;