nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 35 lines 1.0 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "charls"; 5 version = "2.4.2"; 6 7 src = fetchFromGitHub { 8 owner = "team-charls"; 9 repo = pname; 10 rev = "refs/tags/${version}"; 11 hash = "sha256-c1wrk6JLcAH7TFPwjARlggaKXrAsLWyUQF/3WHlqoqg="; 12 }; 13 14 postPatch = '' 15 substituteInPlace src/charls-template.pc \ 16 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \ 17 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ 18 ''; 19 20 nativeBuildInputs = [ cmake ]; 21 22 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; 23 24 # note this only runs some basic tests, not the full test suite, 25 # but the recommended `charlstest -unittest` fails with an inscrutable C++ IO error 26 doCheck = true; 27 28 meta = with lib; { 29 homepage = "https://github.com/team-charls/charls"; 30 description = "A JPEG-LS library implementation in C++"; 31 maintainers = with maintainers; [ bcdarwin ]; 32 license = licenses.bsd3; 33 platforms = platforms.unix; 34 }; 35}