1{ lib
2, stdenv
3, fetchFromGitHub
4, boost
5, cmake
6, nasm
7, libpng
8}:
9
10stdenv.mkDerivation rec {
11 pname = "efficient-compression-tool";
12 version = "0.9.1";
13
14 src = fetchFromGitHub {
15 owner = "fhanau";
16 repo = "Efficient-Compression-Tool";
17 rev = "v${version}";
18 sha256 = "sha256-TSV5QXf6GuHAwQrde3Zo9MA1rtpAhtRg0UTzMkBnHB8=";
19 fetchSubmodules = true;
20 };
21
22 nativeBuildInputs = [ cmake nasm ];
23
24 patches = [ ./use-nixpkgs-libpng.patch ];
25
26 buildInputs = [ boost libpng ];
27
28 cmakeDir = "../src";
29
30 cmakeFlags = [ "-DECT_FOLDER_SUPPORT=ON" ];
31
32 CXXFLAGS = [
33 # GCC 13: error: 'uint32_t' does not name a type
34 "-include cstdint"
35 ];
36
37 meta = with lib; {
38 description = "Fast and effective C++ file optimizer";
39 homepage = "https://github.com/fhanau/Efficient-Compression-Tool";
40 license = licenses.asl20;
41 maintainers = [ maintainers.lunik1 ];
42 platforms = platforms.linux;
43 mainProgram = "ect";
44 };
45}