From fa36136ceed0e2c58e0c9e21492a7e60c3a64470 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sat, 25 Nov 2023 14:14:49 +0100 Subject: [PATCH] heatshrink: add cmake build script Wanted by prusa-slicer and libbgcode --- pkgs/tools/compression/heatshrink/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/compression/heatshrink/default.nix b/pkgs/tools/compression/heatshrink/default.nix index 49ef7354cbc9..b5cfb92247af 100644 --- a/pkgs/tools/compression/heatshrink/default.nix +++ b/pkgs/tools/compression/heatshrink/default.nix @@ -1,6 +1,8 @@ { lib , stdenv , fetchFromGitHub +, cmake +, fetchpatch }: stdenv.mkDerivation rec { @@ -14,14 +16,17 @@ stdenv.mkDerivation rec { hash = "sha256-Nm9/+JFMDXY1N90hmNFGh755V2sXSRQ4VBN9f8TcsGk="; }; - makeFlags = [ "PREFIX=$(out)" ]; + patches = [ + # Add CMake build script, wanted by prusa-slicer and libbgcode, which are the only users of this library. + (fetchpatch { + url = "https://github.com/atomicobject/heatshrink/commit/0886e9ca76552b8e325841e2b820b4563e5d5aba.patch"; + hash = "sha256-13hy4+/RDaaKgQcdaSbACvMfElUIskvJ+owXqm40feY="; + }) + ]; - preInstall = '' - mkdir -p $out/{bin,lib,include} - ''; - - doCheck = true; - checkTarget = "test"; + nativeBuildInputs = [ + cmake + ]; doInstallCheck = true; installCheckPhase = ''