From 25f74ecc8bbb46284db08ce407feb0d77f5180f8 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 8 Sep 2017 22:45:08 +0200 Subject: [PATCH] c3d: fix darwin build --- pkgs/applications/graphics/c3d/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/c3d/default.nix b/pkgs/applications/graphics/c3d/default.nix index a254993a016b..74631e88ebfb 100644 --- a/pkgs/applications/graphics/c3d/default.nix +++ b/pkgs/applications/graphics/c3d/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchgit, cmake, itk }: +{ stdenv, fetchgit, cmake, itk, Cocoa }: stdenv.mkDerivation rec { - _name = "c3d"; - _version = "1.1.0"; - name = "${_name}-${_version}"; + name = "${pname}-${version}"; + pname = "c3d"; + version = "1.1.0"; src = fetchgit { url = "https://git.code.sf.net/p/c3d/git"; @@ -12,7 +12,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ itk ]; + buildInputs = [ itk ] + ++ stdenv.lib.optional stdenv.isDarwin Cocoa; meta = with stdenv.lib; { homepage = http://www.itksnap.org/c3d; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3006b8a95ac7..bae38f16f562 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -793,7 +793,9 @@ with pkgs; burpsuite = callPackage ../tools/networking/burpsuite {}; - c3d = callPackage ../applications/graphics/c3d {}; + c3d = callPackage ../applications/graphics/c3d { + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; cabal2nix = haskell.lib.overrideCabal haskellPackages.cabal2nix (drv: { isLibrary = false;