diff options
author | Tomas Krupka <6817216+krupkat@users.noreply.github.com> | 2023-07-13 17:17:18 +0200 |
---|---|---|
committer | Tomas Krupka <6817216+krupkat@users.noreply.github.com> | 2023-07-14 09:42:13 +0200 |
commit | 7843bd9b1c6ceb4368c5af8dcc3a09a544b8ae93 (patch) | |
tree | d17b79e8ecd0e15e3dccaca336f526c70cea9b5d /pkgs/applications/graphics | |
parent | 0938d80a8d8611499c3175748ee6f0b9390b62bc (diff) |
xpano: init at 0.16.1
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/xpano/default.nix | 66 | ||||
-rw-r--r-- | pkgs/applications/graphics/xpano/skip_prefix_check.patch | 18 |
2 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/xpano/default.nix b/pkgs/applications/graphics/xpano/default.nix new file mode 100644 index 0000000000000..a2ecaec7c37a2 --- /dev/null +++ b/pkgs/applications/graphics/xpano/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, ninja +, opencv +, SDL2 +, gtk3 +, catch2_3 +, spdlog +, exiv2 +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "xpano"; + version = "0.16.1"; + + src = fetchFromGitHub { + owner = "krupkat"; + repo = pname; + rev = "v${version}"; + sha256 = "1f95spf7bbbdvbr4gqfyrs161049jj1wnkvf5wgsd0ga3vb15mcj"; + fetchSubmodules = true; + }; + + patches = [ + # force install desktop + icon files + ./skip_prefix_check.patch + ]; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + opencv + SDL2 + gtk3 + spdlog + # exiv2 # TODO: enable when 0.28.0 is available + ]; + + checkInputs = [ + catch2_3 + ]; + + doCheck = true; + + cmakeFlags = [ + "-DBUILD_TESTING=ON" + ]; + + meta = with lib; { + description = "A panorama stitching tool"; + homepage = "https://krupkat.github.io/xpano/"; + changelog = "https://github.com/krupkat/xpano/releases/tag/v${version}"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ krupkat ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/graphics/xpano/skip_prefix_check.patch b/pkgs/applications/graphics/xpano/skip_prefix_check.patch new file mode 100644 index 0000000000000..496cbc718bef7 --- /dev/null +++ b/pkgs/applications/graphics/xpano/skip_prefix_check.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,7 +167,6 @@ install(FILES + TYPE BIN + ) + +-if(CMAKE_INSTALL_PREFIX MATCHES "^/usr.*|^/app.*") + install(FILES + "misc/build/linux/xpano.desktop" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications" +@@ -184,7 +183,6 @@ if(CMAKE_INSTALL_PREFIX MATCHES "^/usr.*|^/app.*") + "misc/build/linux/cz.krupkat.Xpano.metainfo.xml" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo" + ) +-endif() + + install(DIRECTORY + "${CMAKE_SOURCE_DIR}/misc/assets" |