diff options
author | Nikolay Korotkiy <sikmir@disroot.org> | 2024-02-22 21:59:05 +0400 |
---|---|---|
committer | Nikolay Korotkiy <sikmir@disroot.org> | 2024-02-22 21:59:05 +0400 |
commit | f20dc05ea6293595c2944c84acf053ecb7e41df8 (patch) | |
tree | 443c024556cda9738d0b7549ee5150910a2200a0 /pkgs/by-name/op | |
parent | 6e7184b10f8f98d344aff0d355f9fb97c0dd0c6d (diff) | |
download | nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar.gz nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar.bz2 nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar.lz nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar.xz nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.tar.zst nixlib-f20dc05ea6293595c2944c84acf053ecb7e41df8.zip |
openorienteering-mapper: fix on darwin
Diffstat (limited to 'pkgs/by-name/op')
-rw-r--r-- | pkgs/by-name/op/openorienteering-mapper/package.nix | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/pkgs/by-name/op/openorienteering-mapper/package.nix b/pkgs/by-name/op/openorienteering-mapper/package.nix index 50c1f89459cc..eef5c0f91791 100644 --- a/pkgs/by-name/op/openorienteering-mapper/package.nix +++ b/pkgs/by-name/op/openorienteering-mapper/package.nix @@ -32,6 +32,13 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "find_package(ClangTidy" "#find_package(ClangTidy" + substituteInPlace packaging/custom_install.cmake.in \ + --replace "fixup_bundle_portable(" "#fixup_bundle_portable(" + ''; + nativeBuildInputs = [ cmake doxygen @@ -54,26 +61,25 @@ stdenv.mkDerivation rec { cmakeFlags = [ # Building the manual and bundling licenses fails # See https://github.com/NixOS/nixpkgs/issues/85306 - "-DLICENSING_PROVIDER:BOOL=OFF" - "-DMapper_MANUAL_QTHELP:BOOL=OFF" + (lib.cmakeBool "LICENSING_PROVIDER" false) + (lib.cmakeBool "Mapper_MANUAL_QTHELP" false) ] ++ lib.optionals stdenv.isDarwin [ # FindGDAL is broken and always finds /Library/Framework unless this is # specified - "-DGDAL_INCLUDE_DIR=${gdal}/include" - "-DGDAL_CONFIG=${gdal}/bin/gdal-config" - "-DGDAL_LIBRARY=${gdal}/lib/libgdal.dylib" + (lib.cmakeFeature "GDAL_INCLUDE_DIR" "${gdal}/include") + (lib.cmakeFeature "GDAL_CONFIG" "${gdal}/bin/gdal-config") + (lib.cmakeFeature "GDAL_LIBRARY" "${gdal}/lib/libgdal.dylib") # Don't bundle libraries - "-DMapper_PACKAGE_PROJ=0" - "-DMapper_PACKAGE_QT=0" - "-DMapper_PACKAGE_ASSISTANT=0" - "-DMapper_PACKAGE_GDAL=0" + (lib.cmakeBool "Mapper_PACKAGE_PROJ" false) + (lib.cmakeBool "Mapper_PACKAGE_QT" false) + (lib.cmakeBool "Mapper_PACKAGE_ASSISTANT" false) + (lib.cmakeBool "Mapper_PACKAGE_GDAL" false) ]; postInstall = with stdenv; lib.optionalString isDarwin '' - mkdir -p $out/Applications + mkdir -p $out/{Applications,bin} mv $out/Mapper.app $out/Applications - mkdir -p $out/bin - ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper + ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/Mapper ''; meta = with lib; { @@ -83,7 +89,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ mpickering sikmir ]; platforms = with platforms; unix; - broken = stdenv.isDarwin; mainProgram = "Mapper"; }; } |