about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-18 00:57:06 +0200
committerGitHub <noreply@github.com>2023-10-18 00:57:06 +0200
commit190a5a5b423fc913a6ebcd654071925679189bb0 (patch)
treed199d86f5db3c5e0e562554993a4e81bb3dab185 /pkgs/applications/graphics
parent73eeafc1a1622a523d6b3423d3e45342abbb18b2 (diff)
parent90c8c1bd406af93ca247bb8bc22a0b3ba1270448 (diff)
downloadnixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar.gz
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar.bz2
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar.lz
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar.xz
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.tar.zst
nixlib-190a5a5b423fc913a6ebcd654071925679189bb0.zip
Merge pull request #261492 from wegank/panotools-refactor
panotools: refactor
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/panotools/default.nix42
1 files changed, 30 insertions, 12 deletions
diff --git a/pkgs/applications/graphics/panotools/default.nix b/pkgs/applications/graphics/panotools/default.nix
index 9448e0b17213..365996aaf591 100644
--- a/pkgs/applications/graphics/panotools/default.nix
+++ b/pkgs/applications/graphics/panotools/default.nix
@@ -1,25 +1,43 @@
-{ fetchurl, lib, stdenv, libjpeg, libpng, libtiff, perl, cmake }:
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, libjpeg
+, libpng
+, libtiff
+, perl
+, darwin
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libpano13";
   version = "2.9.22";
 
   src = fetchurl {
-    url = "mirror://sourceforge/panotools/${pname}-${version}.tar.gz";
-    sha256 = "sha256-r/xoMM2+ccKNJzHcv43qKs2m2f/UYJxtvzugxoRAqOM=";
+    url = "mirror://sourceforge/panotools/libpano13-${finalAttrs.version}.tar.gz";
+    hash = "sha256-r/xoMM2+ccKNJzHcv43qKs2m2f/UYJxtvzugxoRAqOM=";
   };
 
-  buildInputs = [ perl libjpeg libpng libtiff ];
-  nativeBuildInputs = [ cmake ];
+  strictDeps = true;
 
-  # one of the tests succeeds on my machine but fails on Hydra (no idea why)
-  #doCheck = true;
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    libjpeg
+    libpng
+    libtiff
+    perl
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Carbon
+  ];
 
   meta = {
-    homepage = "https://panotools.sourceforge.net/";
     description = "Free software suite for authoring and displaying virtual reality panoramas";
+    homepage = "https://panotools.sourceforge.net/";
     license = lib.licenses.gpl2Plus;
-
-    platforms = lib.platforms.gnu ++ lib.platforms.linux;  # arbitrary choice
+    maintainers = [ lib.maintainers.wegank ];
+    platforms = lib.platforms.unix;
   };
-}
+})