qmake2cmake: init at 1.0.2
This commit is contained in:
parent
c6a66632f9
commit
7b19e25b87
3 changed files with 78 additions and 0 deletions
40
pkgs/tools/misc/qmake2cmake/default.nix
Normal file
40
pkgs/tools/misc/qmake2cmake/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchgit
|
||||
, packaging
|
||||
, portalocker
|
||||
, sympy
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qmake2cmake";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://codereview.qt-project.org/qt/qmake2cmake";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Ibi7tIaMI44POfoRfKsgTMR3u+Li5UzeHBUNylnc9dw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-locations.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
packaging
|
||||
portalocker
|
||||
sympy
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to convert qmake .pro files to CMakeLists.txt";
|
||||
homepage = "https://wiki.qt.io/Qmake2cmake";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ wegank ];
|
||||
};
|
||||
}
|
36
pkgs/tools/misc/qmake2cmake/fix-locations.patch
Normal file
36
pkgs/tools/misc/qmake2cmake/fix-locations.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
diff --git a/src/qmake2cmake/condition_simplifier_cache.py b/src/qmake2cmake/condition_simplifier_cache.py
|
||||
index 86c8e83..9d1ac00 100755
|
||||
--- a/src/qmake2cmake/condition_simplifier_cache.py
|
||||
+++ b/src/qmake2cmake/condition_simplifier_cache.py
|
||||
@@ -29,8 +29,7 @@ def get_current_file_path() -> str:
|
||||
|
||||
|
||||
def get_cache_location() -> str:
|
||||
- this_file = get_current_file_path()
|
||||
- dir_path = os.path.dirname(this_file)
|
||||
+ dir_path = os.getcwd()
|
||||
cache_path = os.path.join(dir_path, ".pro2cmake_cache", "cache.json")
|
||||
return cache_path
|
||||
|
||||
diff --git a/src/qmake2cmake/run_pro2cmake.py b/src/qmake2cmake/run_pro2cmake.py
|
||||
index fd3e11a..bdbadb0 100755
|
||||
--- a/src/qmake2cmake/run_pro2cmake.py
|
||||
+++ b/src/qmake2cmake/run_pro2cmake.py
|
||||
@@ -194,7 +194,6 @@ def run(all_files: typing.List[str], pro2cmake: str, args: argparse.Namespace) -
|
||||
) -> typing.Tuple[int, str, str]:
|
||||
filename, index, total = data
|
||||
pro2cmake_args = []
|
||||
- pro2cmake_args.append(sys.executable)
|
||||
pro2cmake_args.append(pro2cmake)
|
||||
if args.min_qt_version:
|
||||
pro2cmake_args += ["--min-qt-version", args.min_qt_version]
|
||||
@@ -257,8 +256,7 @@ def run(all_files: typing.List[str], pro2cmake: str, args: argparse.Namespace) -
|
||||
def main() -> None:
|
||||
args = parse_command_line()
|
||||
|
||||
- script_path = os.path.dirname(os.path.abspath(__file__))
|
||||
- pro2cmake = os.path.join(script_path, "pro2cmake.py")
|
||||
+ pro2cmake = os.path.join(os.path.dirname(sys.argv[0]), "qmake2cmake")
|
||||
base_path = args.path
|
||||
|
||||
all_files = find_all_pro_files(base_path, args)
|
|
@ -37587,6 +37587,8 @@ with pkgs;
|
|||
|
||||
qMasterPassword = qt6Packages.callPackage ../applications/misc/qMasterPassword { };
|
||||
|
||||
qmake2cmake = python3Packages.callPackage ../tools/misc/qmake2cmake { };
|
||||
|
||||
qtrvsim = libsForQt5.callPackage ../applications/science/computer-architecture/qtrvsim { };
|
||||
|
||||
qdl = callPackage ../tools/misc/qdl { };
|
||||
|
|
Loading…
Reference in a new issue