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