depot/third_party/nixpkgs/pkgs/development/libraries/libspng/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

59 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, stdenv
, zlib
, ninja
, meson
, pkg-config
, cmake
, libpng
}:
stdenv.mkDerivation rec {
pname = "libspng";
version = "0.7.4";
src = fetchFromGitHub {
owner = "randy408";
repo = pname;
rev = "v${version}";
sha256 = "sha256-BiRuPQEKVJYYgfUsglIuxrBoJBFiQ0ygQmAFrVvCz4Q=";
};
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
mesonBuildType = "release";
mesonFlags = [
# this is required to enable testing
# https://github.com/randy408/libspng/blob/bc383951e9a6e04dbc0766f6737e873e0eedb40b/tests/README.md#testing
"-Ddev_build=true"
];
outputs = [ "out" "dev" ];
strictDeps = true;
nativeCheckInputs = [
cmake
];
buildInputs = [
zlib
libpng
];
nativeBuildInputs = [
ninja
meson
pkg-config
];
meta = with lib; {
description = "Simple, modern libpng alternative";
homepage = "https://libspng.org/";
license = with licenses; [ bsd2 ];
maintainers = with maintainers; [ humancalico ];
platforms = platforms.all;
};
}