2023-04-30 20:10:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
|
|
|
, libjpeg
|
|
|
|
, SDL2
|
|
|
|
, gdal
|
|
|
|
, octave
|
|
|
|
, rustPlatform
|
|
|
|
, cargo
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "vpv";
|
2023-06-11 18:28:40 +00:00
|
|
|
version = "0.8.2";
|
2023-04-30 20:10:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kidanger";
|
|
|
|
repo = "vpv";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2023-06-11 18:28:40 +00:00
|
|
|
sha256 = "sha256-mlBceYMfsAE7MI6J7xnkJHBJ8RInePooXH5YW9I47YM=";
|
2023-04-30 20:10:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoRoot = "src/fuzzy-finder";
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
src = finalAttrs.src;
|
|
|
|
sourceRoot = "source/src/fuzzy-finder";
|
|
|
|
hash = "sha256-CDKlmwA2Wj78xPaSiYPmIJ7xmiE5Co+oGGejZU3v1zI=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
libjpeg
|
|
|
|
SDL2
|
|
|
|
gdal
|
|
|
|
octave
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_GDAL=ON"
|
|
|
|
"-DUSE_OCTAVE=ON"
|
|
|
|
"-DVPV_VERSION=v${finalAttrs.version}"
|
|
|
|
"-DBUILD_TESTING=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/kidanger/vpv";
|
|
|
|
description = "Image viewer for image processing experts";
|
|
|
|
maintainers = [ lib.maintainers.kidanger ];
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
broken = stdenv.isDarwin; # the CMake expects the SDL2::SDL2main target for darwin
|
|
|
|
};
|
|
|
|
})
|