@@ -1,7 +1,7 @@
11{ stdenv, pkgs, fetchurl }:
22
33stdenv.mkDerivation rec {
4− name = "${product}-${version}";
4+ name = "atomicparsley-${version}";
55 product = "AtomicParsley";
66 version = "0.9.0";
77
@@ -10,12 +10,20 @@ stdenv.mkDerivation rec {
1010 sha256 = "de83f219f95e6fe59099b277e3ced86f0430ad9468e845783092821dff15a72e";
1111 };
1212
13− buildInputs = with pkgs; [ unzip ];
13+ buildInputs = with pkgs; [ unzip ]
14+ ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
1415 patches = [ ./casts.patch ];
1516 setSourceRoot = "sourceRoot=${product}-source-${version}";
1617 buildPhase = "bash build";
1718 installPhase = "install -D AtomicParsley $out/bin/AtomicParsley";
1819
20+ postPatch = ''
21+ substituteInPlace build \
22+ --replace 'g++' 'c++'
23+ substituteInPlace AP_NSImage.mm \
24+ --replace '_NSBitmapImageFileType' 'NSBitmapImageFileType'
25+ '';
26+
1927 meta = with stdenv.lib; {
2028 description = ''
2129 A lightweight command line program for reading, parsing and