Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ApplicationServices for Darwin build Clean up comments
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ stdenv, fetchurl }: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "autofig-0.1"; | ||
|
||
src = fetchurl { | ||
url = "http://autotrace.sourceforge.net/tools/autofig.tar.gz"; | ||
sha256 = "11cs9hdbgcl3aamcs3149i8kvyyldmnjf6yq81kbcf8fdmfk2zdq"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ stdenv, fetchurl, callPackage, libpng12, imagemagick, | ||
autoreconfHook, glib, pstoedit, pkgconfig, gettext, darwin }: | ||
|
||
# TODO: Solve that it cannot find pstoedit (as it is unable to find | ||
# pstoedit-config) | ||
|
||
# TODO: Figure out why the resultant binary is somehow linked against | ||
# libpng16.so.16 rather than libpng12. | ||
|
||
stdenv.mkDerivation rec { | ||
name = "autotrace-${version}"; | ||
version = "0.31.1"; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/autotrace/AutoTrace/0.31.1/${name}.tar.gz"; | ||
sha256 = "1xmgja5fv48mdbsa51inf7ksz36nqd6bsaybrk5xgprm6cy946js"; | ||
}; | ||
|
||
# The below commented out part is for an identically-named project | ||
# on GitHub which appears to derive somehow from the Sourceforge | ||
# version, but I have no idea what the lineage is of this project. | ||
# It will build, but it segfaults when I attempt to run -centerline. | ||
# Someone may need this for some reason, so I've left it here. | ||
# | ||
#src = fetchFromGitHub { | ||
# owner = "autotrace"; | ||
# repo = "autotrace"; | ||
# rev = "b3ac8818d86943102cb4f13734e0b527c42dc45a"; | ||
# sha256 = "0z5h2mvxwckk2msi361zk1nc9fdcvxyimyc2hlyqd6h8k3p7zdi4"; | ||
#}; | ||
#postConfigure = '' | ||
# sed -i -e "s/at_string/gchar */g" *.c | ||
# sed -i -e "s/at_address/gpointer/g" *.c | ||
# sed -i -e "s/at_bitmap_type/struct _at_bitmap/g" *.c | ||
# sed -i -e "s/AT_BITMAP_BITS(bitmap)/AT_BITMAP_BITS(\&bitmap)/g" input-magick.c | ||
#''; | ||
|
||
autofig = callPackage ./autofig.nix {}; | ||
nativeBuildInputs = [ autoreconfHook glib autofig pkgconfig gettext ]; | ||
buildInputs = [ libpng12 imagemagick pstoedit ] | ||
++ stdenv.lib.optionals stdenv.isDarwin | ||
(with darwin.apple_sdk.frameworks; [ApplicationServices]); | ||
|
||
postUnpack = '' | ||
pushd $sourceRoot | ||
autofig autotrace-config.af | ||
popd | ||
''; | ||
|
||
# This complains about various m4 files, but it appears to not be an | ||
# actual error. | ||
preConfigure = "glib-gettextize --copy --force"; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://autotrace.sourceforge.net/; | ||
description = "Utility for converting bitmap into vector graphics"; | ||
platforms = platforms.unix; | ||
maintainers = with maintainers; [ hodapp ]; | ||
license = licenses.gpl2; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters