Merge pull request #261492 from wegank/panotools-refactor

panotools: refactor

authored by Weijia Wang and committed by GitHub 190a5a5b 73eeafc1

+30 -12
+30 -12
pkgs/applications/graphics/panotools/default.nix
··· 1 - { fetchurl, lib, stdenv, libjpeg, libpng, libtiff, perl, cmake }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , cmake 5 + , libjpeg 6 + , libpng 7 + , libtiff 8 + , perl 9 + , darwin 10 + }: 2 11 3 - stdenv.mkDerivation rec { 12 + stdenv.mkDerivation (finalAttrs: { 4 13 pname = "libpano13"; 5 14 version = "2.9.22"; 6 15 7 16 src = fetchurl { 8 - url = "mirror://sourceforge/panotools/${pname}-${version}.tar.gz"; 9 - sha256 = "sha256-r/xoMM2+ccKNJzHcv43qKs2m2f/UYJxtvzugxoRAqOM="; 17 + url = "mirror://sourceforge/panotools/libpano13-${finalAttrs.version}.tar.gz"; 18 + hash = "sha256-r/xoMM2+ccKNJzHcv43qKs2m2f/UYJxtvzugxoRAqOM="; 10 19 }; 11 20 12 - buildInputs = [ perl libjpeg libpng libtiff ]; 13 - nativeBuildInputs = [ cmake ]; 21 + strictDeps = true; 14 22 15 - # one of the tests succeeds on my machine but fails on Hydra (no idea why) 16 - #doCheck = true; 23 + nativeBuildInputs = [ 24 + cmake 25 + ]; 26 + 27 + buildInputs = [ 28 + libjpeg 29 + libpng 30 + libtiff 31 + perl 32 + ] ++ lib.optionals stdenv.isDarwin [ 33 + darwin.apple_sdk.frameworks.Carbon 34 + ]; 17 35 18 36 meta = { 37 + description = "Free software suite for authoring and displaying virtual reality panoramas"; 19 38 homepage = "https://panotools.sourceforge.net/"; 20 - description = "Free software suite for authoring and displaying virtual reality panoramas"; 21 39 license = lib.licenses.gpl2Plus; 22 - 23 - platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice 40 + maintainers = [ lib.maintainers.wegank ]; 41 + platforms = lib.platforms.unix; 24 42 }; 25 - } 43 + })