Files
nixpkgs/pkgs/development/mobile/webos/cmake-modules.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

45 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "cmake-modules-webos";
version = "19";
src = fetchFromGitHub {
owner = "openwebos";
repo = "cmake-modules-webos";
rev = "submissions/${version}";
sha256 = "1l4hpcmgc98kp9g1642sy111ki5qyk3q7j10xzkgmnvz8lqffnxp";
};
nativeBuildInputs = [ cmake ];
prePatch = ''
substituteInPlace CMakeLists.txt --replace "CMAKE_ROOT}/Modules" "CMAKE_INSTALL_PREFIX}/lib/cmake"
substituteInPlace webOS/webOS.cmake \
--replace ' ''${CMAKE_ROOT}/Modules' " $out/lib/cmake" \
--replace 'INSTALL_ROOT}/usr' 'INSTALL_ROOT}'
sed -i '/CMAKE_INSTALL_PREFIX/d' webOS/webOS.cmake
'';
setupHook = ./cmake-setup-hook.sh;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail "cmake_minimum_required(VERSION 2.8.7)" "cmake_minimum_required(VERSION 3.10)"
substituteInPlace webOS/webOS.cmake \
--replace-fail "cmake_minimum_required(VERSION 2.8.7)" "cmake_minimum_required(VERSION 3.10)"
'';
meta = {
description = "CMake modules needed to build Open WebOS components";
license = lib.licenses.asl20;
maintainers = [ ];
};
}