diff --git a/maintainers/scripts/nixpkgs-lint.pl b/maintainers/scripts/nixpkgs-lint.pl index baf2cbf8ba7..d74f5c740f5 100755 --- a/maintainers/scripts/nixpkgs-lint.pl +++ b/maintainers/scripts/nixpkgs-lint.pl @@ -44,6 +44,7 @@ my $info = XMLin($xml, KeyAttr => { 'item' => '+attrPath', 'meta' => 'name' }, F print "=== Package meta information ===\n\n"; my $nrBadNames = 0; my $nrMissingMaintainers = 0; +my $nrMissingPlatforms = 0; my $nrMissingDescriptions = 0; my $nrBadDescriptions = 0; my $nrMissingLicenses = 0; @@ -77,6 +78,12 @@ foreach my $attr (sort keys %{$info->{item}}) { $nrMissingMaintainers++; } + # Check the platforms. + if (!defined $pkg->{meta}->{platforms}) { + print "$attr: Lacks a platform\n"; + $nrMissingPlatforms++; + } + # Package names should not be capitalised. if ($pkgName =~ /^[A-Z]/) { print "$attr: package name ‘$pkgName’ should not be capitalised\n"; @@ -159,6 +166,7 @@ print "=== Bottom line ===\n"; print "Number of packages: ", scalar(keys %{$info->{item}}), "\n"; print "Number of bad names: $nrBadNames\n"; print "Number of missing maintainers: $nrMissingMaintainers\n"; +print "Number of missing platforms: $nrMissingPlatforms\n"; print "Number of missing licenses: $nrMissingLicenses\n"; print "Number of missing descriptions: $nrMissingDescriptions\n"; print "Number of bad descriptions: $nrBadDescriptions\n"; diff --git a/pkgs/applications/science/math/ginac/default.nix b/pkgs/applications/science/math/ginac/default.nix index 9bffc5548dd..9ea43023d57 100644 --- a/pkgs/applications/science/math/ginac/default.nix +++ b/pkgs/applications/science/math/ginac/default.nix @@ -1,24 +1,25 @@ -{ stdenv, fetchurl, cln, pkgconfig, readline }: +{ stdenv, fetchurl, cln, pkgconfig, readline, gmp }: stdenv.mkDerivation rec { name = "ginac-1.6.2"; src = fetchurl { - url = "${meta.homepage}/${name}.tar.bz2"; + url = "${meta.homepage}/${name}.tar.bz2"; sha256 = "1pivcqqaf142l6vrj2azq6dxrcyzhag4za2dwicb4gsb09ax4d0g"; }; propagatedBuildInputs = [ cln ]; - buildInputs = [ readline ]; + + buildInputs = [ readline ] ++ stdenv.lib.optional stdenv.isDarwin gmp; nativeBuildInputs = [ pkgconfig ]; configureFlags = "--disable-rpath"; - meta = { + meta = with stdenv.lib; { description = "GiNaC is Not a CAS"; - homepage = http://www.ginac.de/; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.urkud ]; + homepage = http://www.ginac.de/; + maintainers = with maintainers; [ lovek323 urkud ]; + platforms = platforms.all; }; } diff --git a/pkgs/desktops/xfce/core/xfce4-power-manager.nix b/pkgs/desktops/xfce/core/xfce4-power-manager.nix index 1e77ba39f8f..5f38308f6d4 100644 --- a/pkgs/desktops/xfce/core/xfce4-power-manager.nix +++ b/pkgs/desktops/xfce/core/xfce4-power-manager.nix @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"; sha256 = "1sc4f4wci5yl3l9lk7vcsbwj6hdjshbxw9qm43s64jr882jriyyp"; }; + + brightness_patch = fetchurl { + url = "http://git.xfce.org/xfce/xfce4-power-manager/patch/?id=05d12e12596512f7a31d3cdb4845a69dc2d4c611"; + sha256 = "0rbldvjwpj93hx59xrmvbdql1pgkbqzjh4vp6gkavn4z6sv535v8"; + }; + name = "${p_name}-${ver_maj}.${ver_min}"; buildInputs = @@ -18,6 +24,8 @@ stdenv.mkDerivation rec { ]; preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; + patches = [ brightness_patch ]; + meta = { homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager; description = "A power manager for the Xfce Desktop Environment"; diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index 899c3bb5c8d..e58397fa9a5 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -23,10 +23,11 @@ let ''; in stdenv.mkDerivation rec { - name = "SDL-1.2.15"; + version = "1.2.15"; + name = "SDL-${version}"; src = fetchurl { - url = "http://www.libsdl.org/release/${name}.tar.gz"; + url = "http://www.libsdl.org/release/${name}.tar.gz"; sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"; }; @@ -49,8 +50,10 @@ stdenv.mkDerivation rec { passthru = {inherit openglSupport;}; - meta = { + meta = with stdenv.lib; { description = "A cross-platform multimedia library"; - homepage = http://www.libsdl.org/; + homepage = http://www.libsdl.org/; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/SDL_image/default.nix b/pkgs/development/libraries/SDL_image/default.nix index 8f0d59bc212..a1d83950477 100644 --- a/pkgs/development/libraries/SDL_image/default.nix +++ b/pkgs/development/libraries/SDL_image/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "SDL_image-1.2.12"; src = fetchurl { - url = "http://www.libsdl.org/projects/SDL_image/release/${name}.tar.gz"; + url = "http://www.libsdl.org/projects/SDL_image/release/${name}.tar.gz"; sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b"; }; - buildInputs = [SDL libpng libjpeg libtiff libungif libXpm]; + buildInputs = [ SDL libpng libjpeg libtiff libungif libXpm ]; postInstall = '' sed -i -e 's,"SDL.h",,' \ @@ -19,9 +19,10 @@ stdenv.mkDerivation rec { ln -sv SDL/SDL_image.h $out/include/SDL_image.h ''; - meta = { + meta = with stdenv.lib; { description = "SDL image library"; - homepage = "http://www.libsdl.org/projects/SDL_image/"; - platforms = stdenv.lib.platforms.linux; + homepage = http://www.libsdl.org/projects/SDL_image/; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/SDL_mixer/default.nix b/pkgs/development/libraries/SDL_mixer/default.nix index af83f19dbbd..f5b40daaf68 100644 --- a/pkgs/development/libraries/SDL_mixer/default.nix +++ b/pkgs/development/libraries/SDL_mixer/default.nix @@ -1,14 +1,13 @@ { stdenv, fetchurl, SDL, libogg, libvorbis, enableNativeMidi ? false }: stdenv.mkDerivation rec { - pname = "SDL_mixer"; - version = "1.2.8"; - - name = "${pname}-${version}"; + pname = "SDL_mixer"; + version = "1.2.12"; + name = "${pname}-${version}"; src = fetchurl { - url = "http://www.libsdl.org/projects/${pname}/release/${name}.tar.gz"; - sha256 = "a8222a274778ff16d0e3ee49a30db27a48a4d357169a915fc599a764e405e0b6"; + url = "http://www.libsdl.org/projects/${pname}/release/${name}.tar.gz"; + sha256 = "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n"; }; buildInputs = [SDL libogg libvorbis]; @@ -17,7 +16,10 @@ stdenv.mkDerivation rec { postInstall = "ln -s $out/include/SDL/SDL_mixer.h $out/include/"; - meta = { + meta = with stdenv.lib; { description = "SDL multi-channel audio mixer library"; + homepage = http://www.libsdl.org/projects/SDL_mixer/; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index fe4be4f3726..b47e3c4a0e0 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, autoconf, automake, libtool , expat, systemd, glib, dbus_glib, python -, libX11, libICE, libSM, useX11 ? stdenv.isLinux }: +, libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }: let version = "1.6.14"; # 1.7.* isn't recommended, even for gnome 3.8 @@ -89,7 +89,9 @@ in rec { tools = dbus_drv "tools" "tools" { configureFlags = [ "--with-dbus-daemondir=${daemon}/bin" ]; buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs daemon dbus_glib ]; - NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1"; + NIX_CFLAGS_LINK = + stdenv.lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed " + + "-ldbus-1"; meta.platforms = stdenv.lib.platforms.all; }; @@ -104,7 +106,9 @@ in rec { tests = dbus_drv "tests" "test" { preBuild = makeInternalLib; buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs tools daemon dbus_glib python ]; - NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1"; + NIX_CFLAGS_LINK = + stdenv.lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed " + + "-ldbus-1"; }; docs = dbus_drv "docs" "doc" { diff --git a/pkgs/development/tools/haskell/splot/default.nix b/pkgs/development/tools/haskell/splot/default.nix index f1b15a731d5..460dc3f8c43 100644 --- a/pkgs/development/tools/haskell/splot/default.nix +++ b/pkgs/development/tools/haskell/splot/default.nix @@ -1,15 +1,15 @@ -{ cabal, bytestringLexing, cairo, Chart, colour, HUnit, mtl +{ cabal, bytestringLexing, cairo, colour, HUnit, mtl , strptime, time, vcsRevision }: cabal.mkDerivation (self: { pname = "splot"; - version = "0.3.9"; - sha256 = "039k6lgwdvpyc8w74zh98wxi1wj2jmin69jnwp7gnmv43kjpbgh5"; + version = "0.3.11"; + sha256 = "0mpyfmafjjcf85v740h69p5mggyqsq3li8m1fa5c0z4rdd0395an"; isLibrary = false; isExecutable = true; buildDepends = [ - bytestringLexing cairo Chart colour HUnit mtl strptime time + bytestringLexing cairo colour HUnit mtl strptime time vcsRevision ]; meta = { diff --git a/pkgs/games/beret/default.nix b/pkgs/games/beret/default.nix index 2e252a5cd54..a92fe4d7c67 100644 --- a/pkgs/games/beret/default.nix +++ b/pkgs/games/beret/default.nix @@ -6,8 +6,9 @@ stdenv.mkDerivation { buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ]; NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL"; - - NIX_CFLAGS_LINK = "-lgcc_s"; + NIX_CFLAGS_LINK = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin + "-framework CoreFoundation -framework OpenGL -framework Cocoa"; patches = [ ./use-home-dir.patch ]; @@ -28,11 +29,12 @@ stdenv.mkDerivation { cp -av tahoma.ttf images music rooms sfx $out/share ''; - meta = { + meta = with stdenv.lib; { description = "A 2D puzzle-platformer game about a scientist with telekinetic abilities"; - homepage = http://kiwisauce.com/beret/; - platforms = stdenv.lib.platforms.all; - license = stdenv.lib.licenses.lgpl2; + homepage = http://kiwisauce.com/beret/; + license = licenses.lgpl2; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.all; }; } diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 46f6735edee..629dcb5bbce 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -1,11 +1,9 @@ { stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi -, gconf, gtk, intltool, gettext -, alsaLib, libsamplerate, libsndfile, speex, bluez, sbc, udev, libcap +, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex +, bluez, sbc, udev, libcap, json_c , jackaudioSupport ? false, jackaudio ? null , x11Support ? false, xlibs -, json_c -, useSystemd ? false, systemd ? null -}: +, useSystemd ? false, systemd ? null }: assert jackaudioSupport -> jackaudio != null; @@ -18,20 +16,18 @@ stdenv.mkDerivation rec { }; # Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated. - propagatedBuildInputs = [ gdbm libcap ]; + propagatedBuildInputs + = [ gdbm ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libcap ]; buildInputs = - [ pkgconfig gnum4 libtool intltool glib dbus avahi - libsamplerate libsndfile speex alsaLib bluez sbc udev - json_c - #gtk gconf - ] + [ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile + speex json_c ] ++ stdenv.lib.optional jackaudioSupport jackaudio ++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ] - ++ stdenv.lib.optional useSystemd systemd; + ++ stdenv.lib.optional useSystemd systemd + ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib bluez sbc udev ]; preConfigure = '' - # Move the udev rules under $(prefix). sed -i "src/Makefile.in" \ -e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g" @@ -42,19 +38,32 @@ stdenv.mkDerivation rec { -e "s|chmod r+s |true |" ''; - configureFlags = '' - --disable-solaris --disable-hal --disable-jack - --disable-oss-output --disable-oss-wrapper - --localstatedir=/var --sysconfdir=/etc - ${if jackaudioSupport then "--enable-jack" else ""} - ''; - - installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse"; + configureFlags = + [ "--disable-solaris" "--disable-jack" "--disable-oss-output" + "--disable-oss-wrapper" "--localstatedir=/var" "--sysconfdir=/etc" ] + ++ stdenv.lib.optional jackaudioSupport "--enable-jack" + ++ stdenv.lib.optional stdenv.isDarwin "--with-mac-sysroot=/"; enableParallelBuilding = true; - meta = { + # not sure what the best practices are here -- can't seem to find a way + # for the compiler to bring in stdlib and stdio (etc.) properly + # the alternative is to copy the files from /usr/include to src, but there are + # probably a large number of files that would need to be copied (I stopped + # after the seventh) + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin + "-I/usr/include"; + + installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse"; + + meta = with stdenv.lib; { description = "PulseAudio, a sound server for POSIX and Win32 systems"; + homepage = http://www.pulseaudio.org/; + # Note: Practically, the server is under the GPL due to the + # dependency on `libsamplerate'. See `LICENSE' for details. + licenses = licenses.lgpl2Plus; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; longDescription = '' PulseAudio is a sound server for POSIX and Win32 systems. A @@ -65,14 +74,5 @@ stdenv.mkDerivation rec { sample format or channel count and mixing several sounds into one are easily achieved using a sound server. ''; - - homepage = http://www.pulseaudio.org/; - - # Note: Practically, the server is under the GPL due to the - # dependency on `libsamplerate'. See `LICENSE' for details. - licenses = "LGPLv2+"; - - maintainers = [ ]; - platforms = stdenv.lib.platforms.gnu; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf319ca4526..4a187b41ebc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5403,14 +5403,24 @@ let SDL = callPackage ../development/libraries/SDL { openglSupport = mesaSupported; - alsaSupport = true; + alsaSupport = (!stdenv.isDarwin); x11Support = true; - pulseaudioSupport = false; # better go through ALSA + pulseaudioSupport = stdenv.isDarwin; # better go through ALSA + + # resolve the unrecognized -fpascal-strings option error + stdenv = if stdenv.isDarwin + then clangStdenv + else stdenv; }; SDL_gfx = callPackage ../development/libraries/SDL_gfx { }; - SDL_image = callPackage ../development/libraries/SDL_image { }; + SDL_image = callPackage ../development/libraries/SDL_image { + # provide an Objective-C compiler + stdenv = if stdenv.isDarwin + then clangStdenv + else stdenv; + }; SDL_mixer = callPackage ../development/libraries/SDL_mixer { };