mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
58 lines
999 B
Nix
58 lines
999 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, zlib
|
|
, ninja
|
|
, meson
|
|
, pkg-config
|
|
, cmake
|
|
, libpng
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libspng";
|
|
version = "0.7.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "randy408";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-t5qVhRxepl1rOQk/F5GhcvU1nk9oGb+kWXmybP+iAfY=";
|
|
};
|
|
|
|
doCheck = true;
|
|
|
|
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" ];
|
|
|
|
nativeCheckInputs = [
|
|
cmake
|
|
libpng
|
|
];
|
|
|
|
buildInputs = [
|
|
zlib
|
|
];
|
|
|
|
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;
|
|
};
|
|
}
|