mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00
Merge pull request #157087 from paperdigits/pkg-hdrmerge
This commit is contained in:
commit
7740b3bb77
78
pkgs/applications/graphics/hdrmerge/default.nix
Normal file
78
pkgs/applications/graphics/hdrmerge/default.nix
Normal file
@ -0,0 +1,78 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, qtbase
|
||||
, wrapQtAppsHook
|
||||
, libraw
|
||||
, exiv2
|
||||
, zlib
|
||||
, alglib
|
||||
, pkg-config
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "hdrmerge";
|
||||
version = "unstable-2020-11-12";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jcelaya";
|
||||
repo = "hdrmerge";
|
||||
rev = "f5a2538cffe3e27bd9bea5d6a199fa211d05e6da";
|
||||
sha256 = "1bzf9wawbdvdbv57hnrmh0gpjfi5hamgf2nwh2yzd4sh1ssfa8jz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [ qtbase libraw exiv2 zlib alglib ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DALGLIB_DIR:PATH=${alglib}"
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# patch FindAlglib.cmake to respect ALGLIB_DIR
|
||||
# see https://github.com/jcelaya/hdrmerge/pull/213
|
||||
name = "patch-hdrmerge-CMake.patch";
|
||||
url = "https://github.com/mkroehnert/hdrmerge/commit/472b2dfe7d54856158aea3d5412a02d0bab1da4c.patch";
|
||||
sha256 = "0jc713ajr4w08pfbi6bva442prj878nxp1fpl9112i3xj34x9sdi";
|
||||
})
|
||||
];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "HDRMerge";
|
||||
genericName = "HDR raw image merge";
|
||||
desktopName = "HDRMerge";
|
||||
comment = meta.description;
|
||||
icon = "hdrmerge";
|
||||
exec = "@out@/bin/hdrmerge -F";
|
||||
categories = [ "Graphics" ];
|
||||
mimeTypes = [ "image/x-dcraw" "image/x-adobe-dng" ];
|
||||
terminal = false;
|
||||
})
|
||||
];
|
||||
|
||||
postInstallPhase = ''
|
||||
# Make a desktop item
|
||||
mkdir -p $out/share/icons/ $out/share/applications/
|
||||
cp ../data/images/logo.png $out/share/icons/hdrmerge.png
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jcelaya/hdrmerge";
|
||||
description = "Combines two or more raw images into an HDR";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.paperdigits ];
|
||||
};
|
||||
}
|
36
pkgs/development/libraries/alglib/default.nix
Normal file
36
pkgs/development/libraries/alglib/default.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ lib, stdenv, fetchurl, cmake, clang }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alglib3";
|
||||
version = "3.18.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.alglib.net/translator/re/alglib-${version}.cpp.gpl.tgz";
|
||||
sha256 = "0ag8dvcxzzp9riqvk4lhcbwhvh0lq54lbdnsbyr107rjfi2p1vlq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
clang
|
||||
];
|
||||
|
||||
patches = [
|
||||
./patch-alglib-CMakeLists.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Numerical analysis and data processing library";
|
||||
homepage = "https://www.alglib.net/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.paperdigits ];
|
||||
longDescription = ''
|
||||
ALGLIB is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Delphi) and several operating systems (Windows and POSIX, including Linux). ALGLIB features include:
|
||||
|
||||
* Data analysis (classification/regression, statistics)
|
||||
* Optimization and nonlinear solvers
|
||||
* Interpolation and linear/nonlinear least-squares fitting
|
||||
* Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers
|
||||
* Fast Fourier Transform and many other algorithms
|
||||
'';
|
||||
};
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,20 @@
|
||||
+cmake_minimum_required(VERSION 2.8)
|
||||
+
|
||||
+project(alglib3 CXX)
|
||||
+
|
||||
+file(GLOB_RECURSE sources src/*.cpp)
|
||||
+file(GLOB_RECURSE headers src/*.h)
|
||||
+
|
||||
+add_library(${PROJECT_NAME} STATIC ${sources} ${headers})
|
||||
+
|
||||
+install(
|
||||
+ TARGETS ${PROJECT_NAME}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+)
|
||||
+
|
||||
+install(
|
||||
+ FILES ${headers}
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alglib
|
||||
+)
|
@ -1290,6 +1290,8 @@ with pkgs;
|
||||
|
||||
aldo = callPackage ../applications/radio/aldo { };
|
||||
|
||||
alglib = callPackage ../development/libraries/alglib { };
|
||||
|
||||
almanah = callPackage ../applications/misc/almanah { };
|
||||
|
||||
alpine-make-vm-image = callPackage ../tools/virtualization/alpine-make-vm-image { };
|
||||
@ -25461,6 +25463,8 @@ with pkgs;
|
||||
|
||||
haruna = libsForQt5.callPackage ../applications/video/haruna { };
|
||||
|
||||
hdrmerge = libsForQt5.callPackage ../applications/graphics/hdrmerge { };
|
||||
|
||||
helix = callPackage ../applications/editors/helix { };
|
||||
|
||||
icesl = callPackage ../applications/misc/icesl { };
|
||||
|
Loading…
Reference in New Issue
Block a user