Merge pull request #303215 from nh2/fix-potreeconverter-phases-master

potreeconverter: Don't unnecessarily override patchPhase/fixupPhase.
This commit is contained in:
Niklas Hambüchen 2024-04-11 01:35:38 +02:00 committed by GitHub
commit cf5251256f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
cmake cmake
]; ];
patchPhase = '' postPatch = ''
runHook prePatch runHook prePatch
substituteInPlace ./CMakeLists.txt \ substituteInPlace ./CMakeLists.txt \
@ -37,12 +37,12 @@ stdenv.mkDerivation rec {
# prevent inheriting permissions from /nix/store when copying # prevent inheriting permissions from /nix/store when copying
substituteInPlace Converter/src/main.cpp --replace \ substituteInPlace Converter/src/main.cpp --replace \
'fs::copy(templateDir, pagedir, fs::copy_options::overwrite_existing | fs::copy_options::recursive)' 'string cmd = "cp --no-preserve=mode -r " + templateDir + " " + pagedir; system(cmd.c_str());' 'fs::copy(templateDir, pagedir, fs::copy_options::overwrite_existing | fs::copy_options::recursive)' 'string cmd = "cp --no-preserve=mode -r " + templateDir + " " + pagedir; system(cmd.c_str());'
runHook postPatch
''; '';
# The upstream build system does not provide an install target.
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p $out/{bin,lib} mkdir -p $out/{bin,lib}
mv liblaszip.so $out/lib mv liblaszip.so $out/lib
mv PotreeConverter $out/bin mv PotreeConverter $out/bin
@ -56,10 +56,8 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
fixupPhase = '' postFixup = ''
runHook preFixup
ln -s $src/resources $out/bin/resources ln -s $src/resources $out/bin/resources
runHook postFixup
''; '';
meta = with lib; { meta = with lib; {