git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #19437 from gnidorah/master

pakcs: fixed for darwin

commit3e2fe0127b824b103f2edfa0675c27b37ef8ef95 authorDaniel Peebles <copumpkin@users.noreply.github.com> dateThu 13 Oct 2016, 08:08 (10 years ago) parentd5316881fa5ace
5 files changed+45−7
pkgs/development/compilers/pakcs/case-insensitive.patch+19 pkgs/development/compilers/pakcs/default.nix+5−2 pkgs/development/compilers/swi-prolog/default.nix+16−3 pkgs/development/libraries/unixODBC/default.nix+1−1 pkgs/top-level/all-packages.nix+4−1
pkgs/development/compilers/pakcs/case-insensitive.patchnew file+19
@@ -0,0 +1,19 @@
1+--- www/Makefile.orig 2016-10-10 21:04:36.000000000 +0300
2++++ pakcs-1.14.0/www/Makefile 2016-10-10 21:07:56.000000000 +0300
3+@@ -6,7 +6,7 @@ all: submitform Registry
4+ submitform: SubmitForm.curry $(LIBDIR)/HtmlCgi.curry \
5+ $(LIBDIR)/NamedSocket.curry $(LIBDIR)/CPNS.curry
6+ $(REPL) $(REPL_OPTS) :load SubmitForm :save :q
7+- mv SubmitForm submitform
8++ mv SubmitForm submitform.orig && mv submitform.orig submitform
9+
10+ Registry: Registry.curry $(LIBDIR)/HtmlCgi.curry
11+ $(REPL) $(REPL_OPTS) :load Registry :save :q
12+--- currytools/erd2curry/Makefile.orig 2016-10-10 21:13:49.000000000 +0300
13++++ pakcs-1.14.0/currytools/erd2curry/Makefile 2016-10-10 21:21:14.000000000 +0300
14+@@ -32,4 +32,4 @@ uninstall: clean
15+ erd2curry: $(DEPS)
16+ # create saved state for top-level function "main":
17+ $(REPL) $(REPL_OPTS) :load ERD2Curry :save "main \"$(CURDIR)\"" :q
18+- mv ERD2Curry $@
19++ mv ERD2Curry $@.orig && mv $@.orig $@
pkgs/development/compilers/pakcs/default.nix+5−2
@@ -82,7 +82,10 @@ stdenv.mkDerivation rec {
8282
8383 buildInputs = [ swiPrologLocked makeWrapper glibcLocales rlwrap tk which ];
8484
85− patches = [ ./adjust-buildsystem.patch ];
85+ patches = [
86+ ./adjust-buildsystem.patch
87+ ./case-insensitive.patch
88+ ];
8689
8790 configurePhase = ''
8891 # Phony HOME.
@@ -151,6 +154,6 @@ stdenv.mkDerivation rec {
151154 '';
152155
153156 maintainers = [ stdenv.lib.maintainers.gnidorah ];
154− platforms = stdenv.lib.platforms.linux;
157+ platforms = stdenv.lib.platforms.unix;
155158 };
156159}
pkgs/development/compilers/swi-prolog/default.nix+16−3
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib
22, libXinerama, libXft, libXpm, libSM, libXt, freetype, pkgconfig
3−, fontconfig
3+, fontconfig, makeWrapper ? stdenv.isDarwin
44}:
55
66let
@@ -15,7 +15,8 @@ stdenv.mkDerivation {
1515 };
1616
1717 buildInputs = [ gmp readline openssl libjpeg unixODBC libXinerama
18− libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ];
18+ libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ]
19+ ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
1920
2021 hardeningDisable = [ "format" ];
2122
@@ -23,12 +24,24 @@ stdenv.mkDerivation {
2324
2425 buildFlags = "world";
2526
27+ # For macOS: still not fixed in upstream: "abort trap 6" when called
28+ # through symlink, so wrap binary.
29+ # We reinvent wrapProgram here but omit argv0 pass in order to not
30+ # break PAKCS package build. This is also safe for SWI-Prolog, since
31+ # there is no wrapping environment and hence no need to spoof $0
32+ postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
33+ local prog="$out/bin/swipl"
34+ local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
35+ mv $prog $hidden
36+ makeWrapper $hidden $prog
37+ '';
38+
2639 meta = {
2740 homepage = http://www.swi-prolog.org/;
2841 description = "A Prolog compiler and interpreter";
2942 license = "LGPL";
3043
31− platforms = stdenv.lib.platforms.linux;
44+ platforms = stdenv.lib.platforms.unix;
3245 maintainers = [ stdenv.lib.maintainers.peti ];
3346 };
3447}
pkgs/development/libraries/unixODBC/default.nix+1−1
@@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
1515 description = "ODBC driver manager for Unix";
1616 homepage = http://www.unixodbc.org/;
1717 license = licenses.lgpl2;
18− platforms = platforms.linux;
18+ platforms = platforms.unix;
1919 };
2020}
pkgs/top-level/all-packages.nix+4−1
@@ -5287,7 +5287,10 @@ in
52875287 erlangR16 = callPackage ../development/interpreters/erlang/R16.nix {
52885288 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
52895289 };
5290− erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix { odbcSupport = true; };
5290+ erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix {
5291+ inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
5292+ odbcSupport = true;
5293+ };
52915294 erlangR17 = callPackage ../development/interpreters/erlang/R17.nix {
52925295 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
52935296 };