From b173c1c6e2257ec2bb44ab70dc49ddacf697552f Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Mon, 3 Apr 2023 12:48:48 +0100 Subject: potreeconverter: stop copy operation from inheriting permissions from store --- pkgs/applications/graphics/potreeconverter/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs/applications/graphics/potreeconverter') diff --git a/pkgs/applications/graphics/potreeconverter/default.nix b/pkgs/applications/graphics/potreeconverter/default.nix index 4255a12dbab2a..146c528604f82 100644 --- a/pkgs/applications/graphics/potreeconverter/default.nix +++ b/pkgs/applications/graphics/potreeconverter/default.nix @@ -29,8 +29,16 @@ stdenv.mkDerivation rec { ]; patchPhase = '' + runHook prePatch + substituteInPlace ./CMakeLists.txt \ --replace "find_package(TBB REQUIRED)" "" + + # prevent inheriting permissions from /nix/store when copying + 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());' + + runHook postPatch ''; installPhase = '' @@ -53,6 +61,7 @@ stdenv.mkDerivation rec { ln -s $src/resources $out/bin/resources runHook postFixup ''; + meta = with lib; { description = "Create multi res point cloud to use with potree"; homepage = "https://github.com/potree/PotreeConverter"; -- cgit 1.4.1