nixpkgs/pkgs/by-name/vp/vpv/package.nix
Alyssa Ross c368e3cb07
treewide: migrate to fetchCargoVendor, batch 3
Cargo 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.

It should be possible to reproduce this diff.  To do so, get the list
of files changed by this commit, e.g. with git diff --name-only, then
run the following two commands, each with that list of files as their
standard input:

	xargs sed -i 's/fetchCargoTarball/fetchCargoVendor/'
	cut -d / -f 4 | xargs -n 1 nix-update --version=skip

This will take a long time.  It might be possible to parallelize it
using xargs' -P option.  I haven't tested it.
2025-01-23 14:35:41 +01:00

66 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
libpng,
libtiff,
libjpeg,
SDL2,
gdal,
octave,
rustPlatform,
cargo,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vpv";
version = "0.8.2";
src = fetchFromGitHub {
owner = "kidanger";
repo = "vpv";
rev = "v${finalAttrs.version}";
sha256 = "sha256-mlBceYMfsAE7MI6J7xnkJHBJ8RInePooXH5YW9I47YM=";
};
cargoRoot = "src/fuzzy-finder";
cargoDeps = rustPlatform.fetchCargoVendor {
src = finalAttrs.src;
sourceRoot = "${finalAttrs.src.name}/src/fuzzy-finder";
hash = "sha256-5QjKvndExImVn+w6OZNSD5n7K3C+tmN2jJOcDCVEW8I=";
};
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.hostPlatform.isDarwin; # the CMake expects the SDL2::SDL2main target for darwin
mainProgram = "vpv";
};
})