[Nix-dev] fityk.nix, xylib.nix and wxGTK_3.0.1.nix
Thomas Strobel
ts468 at cam.ac.uk
Sun Aug 3 23:12:43 CEST 2014
Hi,
please find attached the .nix files for building fityk
(http://fityk.nieto.pl/). Hope it helps.
Best wishes,
Thomas
-------------- next part --------------
{ stdenv, fetchurl, boost, zlib, bzip2 }:
let
name = "xylib";
version = "1.3";
in
stdenv.mkDerivation {
name = "${name}-${version}";
src = fetchurl {
url = "https://github.com/wojdyr/xylib/releases/download/v${version}/${name}-${version}.tar.bz2";
sha256 = "09j426qjbg3damch1hfw16j992kn2hj8gs4lpvqgfqdw61kvqivh";
};
buildInputs = [boost zlib bzip2 ];
meta = {
description = "xylib is a portable library for reading files that contain x-y data from powder diffraction, spectroscopy and other experimental methods.";
license = "LGPL";
homepage = http://xylib.sourceforge.net/;
platforms = stdenv.lib.platforms.linux;
};
}
-------------- next part --------------
{ stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
, gstreamer, gst_plugins_base, GConf, setfile
, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true,
}:
assert withMesa -> mesa != null;
with stdenv.lib;
let
version = "3.0.1";
in
stdenv.mkDerivation {
name = "wxwidgets-${version}";
src = fetchurl {
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
sha256 = "1xf5s8cnq6xr0r6l0y9cn1pjg961xbycl4afhjrqzbsnxiwinrxx";
};
buildInputs =
[ gtk libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer
gst_plugins_base GConf ]
++ optional withMesa mesa
++ optional stdenv.isDarwin setfile;
nativeBuildInputs = [ pkgconfig ];
configureFlags =
[ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
(if compat24 then "--enable-compat24" else "--disable-compat24")
(if compat26 then "--enable-compat26" else "--disable-compat26") ]
++ optional unicode "--enable-unicode"
++ optional withMesa "--with-opengl"
++ optionals stdenv.isDarwin
# allow building on 64-bit
[ "--with-cocoa" "--enable-universal-binaries" ];
SEARCH_LIB = optionalString withMesa "${mesa}/lib";
preConfigure = "
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
substituteInPlace configure --replace /usr /no-such-path
" + optionalString stdenv.isDarwin ''
substituteInPlace configure --replace \
'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
'';
postInstall = "
(cd $out/include && ln -s wx-*/* .)
";
passthru = {inherit gtk compat24 compat26 unicode;};
enableParallelBuilding = true;
}
-------------- next part --------------
{ stdenv, fetchurl, wxGTK301, boost, lua, zlib, bzip2, xylib, readline, gnuplot }:
let
name = "fityk";
version = "1.2.9";
in
stdenv.mkDerivation {
name = "${name}-${version}";
src = fetchurl {
url = "https://github.com/wojdyr/fityk/releases/download/v${version}/${name}-${version}.tar.bz2";
sha256 = "1gl938nd2jyya8b3gzbagm1jab2mkc9zvr6zsg5d0vkfdqlk0pv1";
};
buildInputs = [wxGTK301 boost lua zlib bzip2 xylib readline gnuplot ];
meta = {
description = "Fityk -- curve fitting and peak fitting software";
license = "GPL2";
homepage = http://fityk.nieto.pl/;
platforms = stdenv.lib.platforms.linux;
};
}
More information about the nix-dev
mailing list