From 78cb479f73cff37ddd6a214d6a8d726f703fd2d1 Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Thu, 28 Nov 2013 23:23:40 +0100 Subject: [PATCH] Chicken: Set PLATFORM for all supported platforms. Signed-off-by: Moritz Ulrich --- pkgs/development/compilers/chicken/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/chicken/default.nix b/pkgs/development/compilers/chicken/default.nix index 6032c7602cf..8343dbc3fef 100644 --- a/pkgs/development/compilers/chicken/default.nix +++ b/pkgs/development/compilers/chicken/default.nix @@ -12,6 +12,12 @@ let url = "http://code.call-cc.org/dev-snapshots/2013/08/08/chicken-4.8.2.tar.gz"; sha256 = "01g7h0664342nl536mnri4c72kwj4z40vmv1250xfndlr218qdqg"; }; + platform = with stdenv; + if isDarwin then "osx" + else if isCygwin then "cygwin" + else if isBSD then "bsd" + else if isSunOS then "solaris" + else "linux"; # Should be a sane default in stdenv.mkDerivation { name = "chicken-${version}"; @@ -20,8 +26,8 @@ stdenv.mkDerivation { then srcDev else srcRelease; - buildFlags = "PLATFORM=linux PREFIX=$(out) VARDIR=$(out)/var/lib"; - installFlags = "PLATFORM=linux PREFIX=$(out) VARDIR=$(out)/var/lib"; + buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib"; + installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib"; meta = { homepage = http://www.call-cc.org/;