Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charls: init at 2.4.1 #210399

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions pkgs/development/libraries/charls/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ lib, stdenv, fetchFromGitHub, cmake }:

stdenv.mkDerivation rec {
pname = "charls";
version = "2.4.1";

src = fetchFromGitHub {
owner = "team-charls";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-l0qcJeQfRqpwR7vNmYZx00kGlPkK7nEYuslydjxj7ss=";
};

postPatch = ''
substituteInPlace src/charls-template.pc \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';

nativeBuildInputs = [ cmake ];

cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];

# note this only runs some basic tests, not the full test suite,
# but the recommended `charlstest -unittest` fails with an inscrutable C++ IO error
doCheck = true;

meta = with lib; {
homepage = "https://github.com/team-charls/charls";
description = "A JPEG-LS library implementation in C++";
maintainers = with maintainers; [ bcdarwin ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18865,6 +18865,8 @@ with pkgs;

cgui = callPackage ../development/libraries/cgui {};

charls = callPackage ../development/libraries/charls { };

check = callPackage ../development/libraries/check {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
Expand Down