heatshrink: add cmake build script

Wanted by prusa-slicer and libbgcode
This commit is contained in:
Yaroslav Bolyukin 2023-11-25 14:14:49 +01:00 committed by Maciej Krüger
parent bd9c192fc0
commit fa36136cee
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F

View File

@ -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 = ''