From 22ece175a061e4b1323869007c550bfa02a7972a Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Thu, 4 Oct 2012 23:32:34 -0700 Subject: [PATCH 1/9] - openttd 1.2.2, rili 2.0.1, widelands-build17, uqm-0.7.0 --- pkgs/games/openttd/default.nix | 21 +- pkgs/games/rili/default.nix | 24 ++ pkgs/games/rili/moderinze_cpp.patch | 391 ++++++++++++++++++ pkgs/games/uqm/default.nix | 71 ++++ .../boost_and_cmake_die_die_die.patch | 11 + pkgs/games/widelands/default.nix | 11 +- pkgs/top-level/all-packages.nix | 4 + 7 files changed, 523 insertions(+), 10 deletions(-) create mode 100644 pkgs/games/rili/default.nix create mode 100644 pkgs/games/rili/moderinze_cpp.patch create mode 100644 pkgs/games/uqm/default.nix create mode 100644 pkgs/games/widelands/boost_and_cmake_die_die_die.patch diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index 66c296b487a..48782a60277 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -1,19 +1,28 @@ -{stdenv, fetchurl, SDL, libpng, zlib}: +{stdenv, fetchurl, pkgconfig, SDL, libpng, zlib, xz, freetype, fontconfig}: stdenv.mkDerivation rec { name = "openttd-${version}"; - version = "0.6.0"; + version = "1.2.2"; src = fetchurl { - url = "mirror://sf/openttd/${name}-source.tar.bz2"; - md5 = "dcf63687c73ff56887049fedaf6c6019"; + url = "http://binaries.openttd.org/releases/${version}/${name}-source.tar.xz"; + sha256 = "158znfx389bhs9gd2hadnbc2a32z4ma1vz8704cmw9yh0fmhbcap"; }; - buildInputs = [SDL libpng]; + buildInputs = [SDL libpng pkgconfig xz zlib freetype fontconfig]; prefixKey = "--prefix-dir="; - configureFlags = "--with-zlib=${zlib}/lib/libz.a"; + + configureFlags = '' + --with-zlib=${zlib}/lib/libz.a + --without-liblzo2 + ''; + makeFlags = "INSTALL_PERSONAL_DIR="; + postInstall = '' + mv $out/games/ $out/bin + ''; + meta = { description = ''OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe".''; homepage = http://www.openttd.org/; diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix new file mode 100644 index 00000000000..95878e2fa7f --- /dev/null +++ b/pkgs/games/rili/default.nix @@ -0,0 +1,24 @@ +{stdenv, fetchurl, SDL_mixer, SDL, autoconf, automake}: + +stdenv.mkDerivation { + name = "ri_li-2.0.1"; + + src = fetchurl { + url = mirror://sourceforge/ri-li/Ri-li-2.0.1.tar.bz2; + sha256 = "f71ccc20c37c601358d963e087ac0d524de8c68e96df09c3aac1ae65edd38dbd"; + }; + + patches = [ ./moderinze_cpp.patch ]; + + preConfigure = '' + export CPPFLAGS="-I${SDL}/include -I${SDL}/include/SDL -I${SDL_mixer}/include" + ''; + + buildInputs = [SDL SDL_mixer autoconf automake]; + + meta = { + homepage = http://ri-li.sourceforge.net; + license = "GPL2+"; + description = "Ri-li is an arcade game licensed under the GPL (General Public License). You drive a toy wood engine in many levels and you must collect all the coaches to win."; + }; +} diff --git a/pkgs/games/rili/moderinze_cpp.patch b/pkgs/games/rili/moderinze_cpp.patch new file mode 100644 index 00000000000..3d076afb39e --- /dev/null +++ b/pkgs/games/rili/moderinze_cpp.patch @@ -0,0 +1,391 @@ +diff -r -u Ri-li-2.0.1.orig/src/audio.cc Ri-li-2.0.1/src/audio.cc +--- Ri-li-2.0.1.orig/src/audio.cc 2012-01-22 00:40:56.928609371 -0800 ++++ Ri-li-2.0.1/src/audio.cc 2012-01-22 00:28:33.360636539 -0800 +@@ -22,8 +22,8 @@ + // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + #include +-#include +-#include ++#include ++#include + + #include "audio.h" + #include "utils.h" +@@ -57,7 +57,7 @@ + char PathFile[512]; + + if(Mix_OpenAudio(22050,AUDIO_S16,1,1024)) { +- cerr <<"Enable to init Sound card ! "< ++#include + #include + #include + #include +diff -r -u Ri-li-2.0.1.orig/src/editeur.cc Ri-li-2.0.1/src/editeur.cc +--- Ri-li-2.0.1.orig/src/editeur.cc 2007-11-02 04:48:17.000000000 -0700 ++++ Ri-li-2.0.1/src/editeur.cc 2012-01-22 00:28:59.632635579 -0800 +@@ -25,10 +25,10 @@ + #include + #endif + +-#include ++#include + #include + #include +-#include ++#include + #include + #include + +@@ -374,7 +374,7 @@ + + // Sauve le niveau + if(Niveau.Save()==false) { +- cerr <<"ERREUR Saving levels!"< + #endif + +-#include ++#include + #include + #include +-#include ++#include + #include + #include + +diff -r -u Ri-li-2.0.1.orig/src/loco.cc Ri-li-2.0.1/src/loco.cc +--- Ri-li-2.0.1.orig/src/loco.cc 2007-11-02 04:48:18.000000000 -0700 ++++ Ri-li-2.0.1/src/loco.cc 2012-01-22 00:14:17.878797797 -0800 +@@ -21,10 +21,10 @@ + // with this program; if not, write to the Free Software Foundation, Inc., + // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +-#include ++#include + #include + #include +-#include ++#include + #include + #include "preference.h" + #include "loco.h" +diff -r -u Ri-li-2.0.1.orig/src/main.cc Ri-li-2.0.1/src/main.cc +--- Ri-li-2.0.1.orig/src/main.cc 2007-11-02 04:48:19.000000000 -0700 ++++ Ri-li-2.0.1/src/main.cc 2012-01-22 00:29:40.080634136 -0800 +@@ -23,8 +23,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + #include + #include + +@@ -115,7 +115,7 @@ + + // Initilise SDL + if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0 ) { +- cerr <<"Impossible d'initialiser SDL:"<vfmt->BitsPerPixel==8) { +- cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<vfmt->BitsPerPixel,vOption); + + if(sdlVideo==NULL) { +- cerr <<"Impossible de passer dans le mode vidéo 800x600 !"< ++#include + #include + #include +-#include ++#include + #include "preference.h" + #include "menu.h" + #include "sprite.h" +@@ -92,7 +92,7 @@ + // Teste la resolution video + sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo(); + if(sdlVideoInfo->vfmt->BitsPerPixel==8) { +- cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<vfmt->BitsPerPixel,vOption); + if(sdlVideo==NULL) { +- cerr <<"Impossible de passer dans le mode vidéo 800x600 !"< ++#include + #include + #include "mouse.h" + #include "preference.h" +diff -r -u Ri-li-2.0.1.orig/src/sprite.cc Ri-li-2.0.1/src/sprite.cc +--- Ri-li-2.0.1.orig/src/sprite.cc 2007-11-02 04:48:20.000000000 -0700 ++++ Ri-li-2.0.1/src/sprite.cc 2012-01-22 00:30:43.640631779 -0800 +@@ -21,10 +21,10 @@ + // with this program; if not, write to the Free Software Foundation, Inc., + // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +-#include ++#include + #include + #include +-#include ++#include + #include + #include "sprite.h" + #include "preference.h" +@@ -84,7 +84,7 @@ + strcpy(PathFile,Langue[Pref.Langue]); + GetPath(PathFile); + if(FileExiste(PathFile)==false) { +- cerr <<"Impossible de trouver "< ++#include + #include + #include + #include "preference.h" +diff -r -u Ri-li-2.0.1.orig/src/utils.cc Ri-li-2.0.1/src/utils.cc +--- Ri-li-2.0.1.orig/src/utils.cc 2007-11-02 04:48:22.000000000 -0700 ++++ Ri-li-2.0.1/src/utils.cc 2012-01-22 00:31:30.944630051 -0800 +@@ -21,10 +21,10 @@ + // with this program; if not, write to the Free Software Foundation, Inc., + // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +-#include ++#include + #include + #include +-#include ++#include + + #ifdef WINDOWS + #include +@@ -77,7 +77,7 @@ + + file=fopen(Path,"r"); + if(!file) { +- cerr <<"ERREUR: Impossible d'ouvrir '"<1024) { + AfficheChargeur(); + if( fread(Po,1,1024,file) != 1024 ) { +- cerr <<"ERREUR de lecture du fichier '"<512) { + if( fwrite(Buf,1,512,file) != 512 ) { +- cerr <<"ERREUR d'ecriture du fichier '"<0) { + if( fwrite(Buf,1,(size_t)L,file) != (size_t)L ) { +- cerr <<"ERREUR d'ecriture du fichier '"<> config.state + echo "INPUT_install_bindir_VALUE='$out/bin'" >> config.state + echo "INPUT_install_libdir_VALUE='$out/lib'" >> config.state + echo "INPUT_install_sharedir_VALUE='$out/share'" >> config.state + PREFIX=$out ./build.sh uqm config + ''; + + buildPhase = '' + ./build.sh uqm + ''; + + installPhase = '' + ./build.sh uqm install + sed -i $out/bin/uqm -e "s%/usr/local/games/%$out%g" + ''; + + meta = { + description = ''Urquan Masters is an open source clone of the Classic top-down space battle Star Cotnrol ''; + homepage = http://sc2.sourceforge.net/; + license = "GPLv2"; + }; +} diff --git a/pkgs/games/widelands/boost_and_cmake_die_die_die.patch b/pkgs/games/widelands/boost_and_cmake_die_die_die.patch new file mode 100644 index 00000000000..f008be35e37 --- /dev/null +++ b/pkgs/games/widelands/boost_and_cmake_die_die_die.patch @@ -0,0 +1,11 @@ +--- widelands-build17-src.old/CMakeLists.txt 2012-04-23 02:46:49.000000000 -0700 ++++ widelands-build17-src/CMakeLists.txt 2012-07-14 19:49:14.000000000 -0700 +@@ -140,8 +140,6 @@ + else (WL_UNIT_TESTS) + message(STATUS "Disabled Unit Tests") + set (Boost_FIND_COMPONENTS signals) +- set (Boost_USE_STATIC_LIBS ON) +- set (Boost_USE_MULTITHREADED ON) + set (Boost_DETAILED_FAILURE_MSG ON) + find_package(Boost 1.35.0 COMPONENTS signals REQUIRED) + endif (WL_UNIT_TESTS) diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix index 74d1f87e0be..8f3270db481 100644 --- a/pkgs/games/widelands/default.nix +++ b/pkgs/games/widelands/default.nix @@ -13,11 +13,11 @@ let (builtins.attrNames (builtins.removeAttrs x helperArgNames)); sourceInfo = rec { baseName="widelands"; - version="build16"; + version="build17"; name="${baseName}-${version}"; project="${baseName}"; - url="http://launchpad.net/${project}/${version}/${version}/+download/${name}-src.tar.bz2"; - hash="0pb2d73c6hynhp1x54rcfbibrrri7lyxjybd1hicn503qcakrnyq"; + url="https://launchpadlibrarian.net/102893896/widelands-build17-src.tar.bz2"; + hash="be48b3b8f342a537b39a3aec2f7702250a6a47e427188ba3bece67d7d90f3cc5"; }; in rec { @@ -30,7 +30,9 @@ rec { inherit buildInputs; /* doConfigure should be removed if not needed */ - phaseNames = ["killBuildDir" "doCmake" "doMakeInstall" "createScript"]; + phaseNames = ["killBuildDir" "doPatch" "doCmake" "doMakeInstall" "createScript"]; + + patches = [ ./boost_and_cmake_die_die_die.patch ]; killBuildDir = a.fullDepEntry '' rm -r build @@ -38,6 +40,7 @@ rec { cmakeFlags = [ "-DLUA_LIBRARIES=-llua" + "-DWL_PORTABLE=true" ]; createScript = a.fullDepEntry '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd554b7f1d1..0c0647c60f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8177,6 +8177,8 @@ let mygui = myguiSvn; }; + rili = callPackage ../games/rili { }; + rogue = callPackage ../games/rogue { }; sauerbraten = callPackage ../games/sauerbraten {}; @@ -8257,6 +8259,8 @@ let lua = lua5; }; + uqm = callPackage ../games/uqm { }; + urbanterror = callPackage ../games/urbanterror { }; ut2004demo = callPackage ../games/ut2004demo { }; From 27ec2773594b8f6aae88c6f73ebbd2725f443d4e Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Thu, 4 Oct 2012 23:39:00 -0700 Subject: [PATCH 2/9] - add myself as a maintainer for the packages I've added --- pkgs/games/openttd/default.nix | 1 + pkgs/games/rili/default.nix | 1 + pkgs/games/uqm/default.nix | 1 + pkgs/games/widelands/default.nix | 1 + pkgs/lib/maintainers.nix | 1 + 5 files changed, 5 insertions(+) diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index 48782a60277..70b03a4e483 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -27,5 +27,6 @@ stdenv.mkDerivation rec { description = ''OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe".''; homepage = http://www.openttd.org/; license = "GPLv2"; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; }; } diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index 95878e2fa7f..b3563f42341 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -20,5 +20,6 @@ stdenv.mkDerivation { homepage = http://ri-li.sourceforge.net; license = "GPL2+"; description = "Ri-li is an arcade game licensed under the GPL (General Public License). You drive a toy wood engine in many levels and you must collect all the coaches to win."; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; }; } diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix index 3be95849e32..fd6d727e734 100644 --- a/pkgs/games/uqm/default.nix +++ b/pkgs/games/uqm/default.nix @@ -67,5 +67,6 @@ stdenv.mkDerivation rec { description = ''Urquan Masters is an open source clone of the Classic top-down space battle Star Cotnrol ''; homepage = http://sc2.sourceforge.net/; license = "GPLv2"; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; }; } diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix index 8f3270db481..62ec56b2f7a 100644 --- a/pkgs/games/widelands/default.nix +++ b/pkgs/games/widelands/default.nix @@ -56,6 +56,7 @@ rec { maintainers = with a.lib.maintainers; [ raskin + jcumming ]; platforms = with a.lib.platforms; linux; diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix index 127295a2feb..18671255fce 100644 --- a/pkgs/lib/maintainers.nix +++ b/pkgs/lib/maintainers.nix @@ -18,6 +18,7 @@ garbas = "Rok Garbas "; goibhniu = "Cillian de Róiste "; guibert = "David Guibert "; + jcumming = "Jack Cummings "; kkallio = "Karn Kallio "; ludo = "Ludovic Courtès "; marcweber = "Marc Weber "; From 8eb9491a22cd57415ba10470b7c7950e712ec4c0 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 00:09:49 -0700 Subject: [PATCH 3/9] - zfs-0.6.0-rc11, and spl-0.6.0-rc11 --- pkgs/lib/licenses.nix | 6 + pkgs/os-specific/linux/spl/default.nix | 39 +++++ .../linux/spl/install_prefix.patch | 19 +++ .../linux/spl/install_prefix_2.patch | 32 ++++ .../os-specific/linux/spl/module_prefix.patch | 33 +++++ pkgs/os-specific/linux/spl/spl-0.6.0.nix | 24 +++ pkgs/os-specific/linux/zfs/default.nix | 34 +++++ .../linux/zfs/kerneldir_path.patch | 140 ++++++++++++++++++ .../linux/zfs/module_perm_prefix.patch | 70 +++++++++ .../linux/zfs/mount_zfs_prefix.patch | 24 +++ .../zfs/no_absolute_paths_to_coreutils.patch | 25 ++++ pkgs/os-specific/linux/zfs/zfs-0.6.0.nix | 23 +++ pkgs/top-level/all-packages.nix | 4 + 13 files changed, 473 insertions(+) create mode 100644 pkgs/os-specific/linux/spl/default.nix create mode 100644 pkgs/os-specific/linux/spl/install_prefix.patch create mode 100644 pkgs/os-specific/linux/spl/install_prefix_2.patch create mode 100644 pkgs/os-specific/linux/spl/module_prefix.patch create mode 100644 pkgs/os-specific/linux/spl/spl-0.6.0.nix create mode 100644 pkgs/os-specific/linux/zfs/default.nix create mode 100644 pkgs/os-specific/linux/zfs/kerneldir_path.patch create mode 100644 pkgs/os-specific/linux/zfs/module_perm_prefix.patch create mode 100644 pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch create mode 100644 pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch create mode 100644 pkgs/os-specific/linux/zfs/zfs-0.6.0.nix diff --git a/pkgs/lib/licenses.nix b/pkgs/lib/licenses.nix index 87f9298706e..e1743bddf69 100644 --- a/pkgs/lib/licenses.nix +++ b/pkgs/lib/licenses.nix @@ -34,6 +34,12 @@ url = https://fedoraproject.org/wiki/Licensing/BSD; }; + cddl = { + shortName = "CDDL"; + fullName = "Common Development Distribution License "; + url = http://www.opensolaris.org/os/licensing/cddllicense.txt; + }; + cpl10 = { shortName = "CPL 1.0"; fullName = "Common Public License version 1.0"; diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix new file mode 100644 index 00000000000..96565fffa0e --- /dev/null +++ b/pkgs/os-specific/linux/spl/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, kernel, perl, autoconf, automake, libtool, coreutils, gawk }: + +stdenv.mkDerivation { + name = "spl-0.6.0-rc11"; + src = fetchurl { + url = http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc11.tar.gz; + sha256 = "0brsrr9hvzlpx7a26nn8rw9k2kh9s75hmxp6h087hi64hzxysf8g"; + }; + + patches = [ ./install_prefix.patch ./install_prefix_2.patch ./module_prefix.patch ]; + + buildInputs = [ perl kernel autoconf automake libtool ]; + + NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated"; + + preConfigure = '' + ./autogen.sh + + substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid + substituteInPlace ./module/spl/spl-module.c --replace /bin/mknod mknod + + substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" + substituteInPlace ./module/spl/spl-module.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" + substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" + ''; + + configureFlags = '' + --with-linux=${kernel}/lib/modules/${kernel.version}/build + --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build + ''; + + meta = { + description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; + homepage = http://zfsonlinux.org/; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.cddl; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; + }; +} diff --git a/pkgs/os-specific/linux/spl/install_prefix.patch b/pkgs/os-specific/linux/spl/install_prefix.patch new file mode 100644 index 00000000000..9a7393b7170 --- /dev/null +++ b/pkgs/os-specific/linux/spl/install_prefix.patch @@ -0,0 +1,19 @@ +*** spl-0.6.0-rc10/Makefile.am.old Fri Aug 17 14:49:16 2012 +--- spl-0.6.0-rc10/Makefile.am Fri Aug 17 14:51:06 2012 +*************** +*** 32,38 **** + if CONFIG_KERNEL + install-data-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ + for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done +--- 32,38 ---- + if CONFIG_KERNEL + install-data-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ + for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done diff --git a/pkgs/os-specific/linux/spl/install_prefix_2.patch b/pkgs/os-specific/linux/spl/install_prefix_2.patch new file mode 100644 index 00000000000..6068ad1d69c --- /dev/null +++ b/pkgs/os-specific/linux/spl/install_prefix_2.patch @@ -0,0 +1,32 @@ +*** git-export/include/Makefile.am Tue Mar 6 00:05:28 2012 +--- git-export/include/Makefile.am.new Tue Mar 6 00:04:46 2012 +*************** +*** 16,22 **** + + install-data-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ + instfiles=`find . -name '*.h'`; \ + for instfile in $$instfiles; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ +--- 16,22 ---- + + install-data-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ + instfiles=`find . -name '*.h'`; \ + for instfile in $$instfiles; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ +*************** +*** 24,28 **** + + uninstall-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ + $(RM) -R $$instdest +--- 24,28 ---- + + uninstall-local: + release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ +! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ + $(RM) -R $$instdest diff --git a/pkgs/os-specific/linux/spl/module_prefix.patch b/pkgs/os-specific/linux/spl/module_prefix.patch new file mode 100644 index 00000000000..dd40711ccdb --- /dev/null +++ b/pkgs/os-specific/linux/spl/module_prefix.patch @@ -0,0 +1,33 @@ +*** git-export/module/Makefile.in Wed Dec 31 16:00:01 1969 +--- git-export/module/Makefile.in.new Sat Jan 28 21:42:06 2012 +*************** +*** 17,30 **** + modules_install: + @# Install the kernel modules + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ +! INSTALL_MOD_PATH=$(DESTDIR) \ + INSTALL_MOD_DIR=addon/spl $@ + @# Remove extraneous build products when packaging +! if [ -n "$(DESTDIR)" ]; then \ +! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi +! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi +--- 17,30 ---- + modules_install: + @# Install the kernel modules + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ +! INSTALL_MOD_PATH=@prefix@ \ + INSTALL_MOD_DIR=addon/spl $@ + @# Remove extraneous build products when packaging +! if [ -n "@prefix@" ]; then \ +! find @prefix@/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi +! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi diff --git a/pkgs/os-specific/linux/spl/spl-0.6.0.nix b/pkgs/os-specific/linux/spl/spl-0.6.0.nix new file mode 100644 index 00000000000..c174daad26b --- /dev/null +++ b/pkgs/os-specific/linux/spl/spl-0.6.0.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchgit, kernel, linuxHeaders, perl }: + +stdenv.mkDerivation { + name = "spl-0.6.0-rc4"; + src = fetchgit { + url = git://github.com/behlendorf/spl.git; + rev = "dde6b7b137f56894a457"; + sha256 = "c402517a647de0c22a69588219aa214f96d1cf9d2f8751b99c5a2795898c726b"; + }; + + patches = [ ./install_prefix.patch ./module_prefix.patch ]; + + buildInputs = [ perl kernel linuxHeaders ]; + + configureFlags = [ "--with-linux=${kernel}/lib/modules/${kernel.version}/build" + "--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build" ]; + + meta = { + description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; + homepage = http://zfsonlinux.org/; + license = "CDDL"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix new file mode 100644 index 00000000000..43e7b2fd95d --- /dev/null +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, kernel, spl, perl, zlib, libuuid, coreutils, utillinux }: + +stdenv.mkDerivation { + name = "zfs-0.6.0-rc11"; + src = fetchurl { + url = http://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc11.tar.gz; + sha256 = "0wx0srn2k31j9xdk3nvk7l847r0diyb7ph6hd006ax9l5p9zj0a7"; + }; + + patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ./no_absolute_paths_to_coreutils.patch ]; + + buildInputs = [ kernel spl perl zlib libuuid coreutils ]; + + NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated"; + + preConfigure = '' + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" + ''; + + configureFlags = '' + --with-linux=${kernel}/lib/modules/${kernel.version}/build + --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build + --with-spl=${spl}/libexec/spl/${kernel.version} + ''; + + meta = { + description = "Native ZFS for Linux"; + homepage = http://zfsonlinux.org/; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.cddl; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; + }; +} diff --git a/pkgs/os-specific/linux/zfs/kerneldir_path.patch b/pkgs/os-specific/linux/zfs/kerneldir_path.patch new file mode 100644 index 00000000000..7deda946821 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/kerneldir_path.patch @@ -0,0 +1,140 @@ +diff -rc zfs-0.6.0-rc10.old/Makefile.in zfs-0.6.0-rc10/Makefile.in +*** zfs-0.6.0-rc10.old/Makefile.in Tue Aug 14 12:35:34 2012 +--- zfs-0.6.0-rc10/Makefile.in Fri Aug 17 15:21:18 2012 +*************** +*** 1121,1127 **** + + @CONFIG_KERNEL_TRUE@install-data-local: + @CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ +! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \ + @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ + @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + @CONFIG_KERNEL_TRUE@ done +--- 1121,1127 ---- + + @CONFIG_KERNEL_TRUE@install-data-local: + @CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ +! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION); \ + @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ + @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + @CONFIG_KERNEL_TRUE@ done +diff -rc zfs-0.6.0-rc10.old/include/Makefile.in zfs-0.6.0-rc10/include/Makefile.in +*** zfs-0.6.0-rc10.old/include/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/Makefile.in Fri Aug 17 15:20:50 2012 +*************** +*** 402,408 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION) + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +--- 402,408 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION) + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +diff -rc zfs-0.6.0-rc10.old/include/linux/Makefile.in zfs-0.6.0-rc10/include/linux/Makefile.in +*** zfs-0.6.0-rc10.old/include/linux/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/linux/Makefile.in Fri Aug 17 15:20:53 2012 +*************** +*** 337,343 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/linux + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + +--- 337,343 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/linux + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + +diff -rc zfs-0.6.0-rc10.old/include/sys/Makefile.in zfs-0.6.0-rc10/include/sys/Makefile.in +*** zfs-0.6.0-rc10.old/include/sys/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/sys/Makefile.in Fri Aug 17 15:20:57 2012 +*************** +*** 590,596 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +--- 590,596 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +diff -rc zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in zfs-0.6.0-rc10/include/sys/fm/Makefile.in +*** zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/sys/fm/Makefile.in Fri Aug 17 15:21:00 2012 +*************** +*** 374,380 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +--- 374,380 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-recursive + +diff -rc zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in +*** zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in Fri Aug 17 15:21:03 2012 +*************** +*** 332,338 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm/fs + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + +--- 332,338 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm/fs + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + +diff -rc zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fs/Makefile.in +*** zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in Tue Aug 14 12:35:32 2012 +--- zfs-0.6.0-rc10/include/sys/fs/Makefile.in Fri Aug 17 15:21:06 2012 +*************** +*** 332,338 **** + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fs + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + +--- 332,338 ---- + EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) + @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs + @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) +! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fs + @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) + all: all-am + diff --git a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch b/pkgs/os-specific/linux/zfs/module_perm_prefix.patch new file mode 100644 index 00000000000..07cd04d1dde --- /dev/null +++ b/pkgs/os-specific/linux/zfs/module_perm_prefix.patch @@ -0,0 +1,70 @@ +*** git-export/module/Makefile.in.orig Wed Dec 31 16:00:01 1969 +--- git-export/module/Makefile.in Tue Mar 6 00:23:07 2012 +*************** +*** 11,19 **** + @# installed devel headers, or they may be in the module + @# subdirectory when building against the spl source tree. + @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ +! /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \ + elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ +! /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ + else \ + echo -e "\n" \ + "*** Missing spl symbols ensure you have built the spl:\n" \ +--- 11,21 ---- + @# installed devel headers, or they may be in the module + @# subdirectory when building against the spl source tree. + @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ +! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ +! chmod +w @SPL_SYMBOLS@ .; \ + elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ +! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ +! chmod +w @SPL_SYMBOLS@ .; \ + else \ + echo -e "\n" \ + "*** Missing spl symbols ensure you have built the spl:\n" \ +*************** +*** 35,55 **** + modules_install: + @# Install the kernel modules + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ +! INSTALL_MOD_PATH=$(DESTDIR) \ + INSTALL_MOD_DIR=addon/zfs $@ + @# Remove extraneous build products when packaging +! if [ -n "$(DESTDIR)" ]; then \ +! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi +! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi + + modules_uninstall: + @# Uninstall the kernel modules +! $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs + + distdir: + +--- 37,57 ---- + modules_install: + @# Install the kernel modules + $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ +! INSTALL_MOD_PATH=@prefix@ \ + INSTALL_MOD_DIR=addon/zfs $@ + @# Remove extraneous build products when packaging +! if [ -n "@prefix@" ]; then \ +! find @prefix@/lib/modules/@LINUX_VERSION@ \ + -name 'modules.*' | xargs $(RM); \ + fi +! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi + + modules_uninstall: + @# Uninstall the kernel modules +! $(RM) -R @prefix@/lib/modules/@LINUX_VERSION@/addon/zfs + + distdir: + diff --git a/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch b/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch new file mode 100644 index 00000000000..94710c5c985 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch @@ -0,0 +1,24 @@ +*** zfs-0.6.0-rc4.old/cmd/mount_zfs/Makefile.in Thu May 5 15:12:25 2011 +--- zfs-0.6.0-rc4/cmd/mount_zfs/Makefile.in Fri Jun 3 16:42:41 2011 +*************** +*** 285,296 **** + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +! +! # +! # Ignore the prefix for the mount helper. It must be installed in /sbin/ +! # because this path is hardcoded in the mount(8) for security reasons. +! # +! sbindir = /sbin + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ +--- 285,291 ---- + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +! sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ diff --git a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch b/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch new file mode 100644 index 00000000000..e223e34c3a4 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch @@ -0,0 +1,25 @@ +*** git-export/module/Makefile.in.old Tue Mar 6 01:04:48 2012 +--- git-export/module/Makefile.in Tue Mar 6 01:04:59 2012 +*************** +*** 11,20 **** + @# installed devel headers, or they may be in the module + @# subdirectory when building against the spl source tree. + @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ +! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ + chmod +w @SPL_SYMBOLS@ .; \ + elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ +! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ + chmod +w @SPL_SYMBOLS@ .; \ + else \ + echo -e "\n" \ +--- 11,20 ---- + @# installed devel headers, or they may be in the module + @# subdirectory when building against the spl source tree. + @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ +! cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ + chmod +w @SPL_SYMBOLS@ .; \ + elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ +! cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ + chmod +w @SPL_SYMBOLS@ .; \ + else \ + echo -e "\n" \ diff --git a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix new file mode 100644 index 00000000000..1cc923f39d1 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchgit, kernel, linuxHeaders, spl, perl, zlib, libuuid }: + +stdenv.mkDerivation { + name = "zfs-0.6.0-rc4"; + src = fetchgit { + url = git://github.com/behlendorf/zfs.git; + rev = "3613204cd7e3ab1ae658"; + sha256 = "217ca162b1b0178dd2e3acc543d3c0cce3a7be7e884a9118ffa0a84d3cbc73f5"; + }; + + patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ]; + + buildInputs = [ kernel linuxHeaders spl perl zlib libuuid]; + + configureFlags = " --with-linux=${kernel}/lib/modules/${kernel.version}/build --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build --with-spl=${spl}/libexec/spl-0.6.0/${kernel.version}"; + + meta = { + description = "Native ZFS for Linux"; + homepage = http://zfsonlinux.org/; + license = "CDDL"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0c0647c60f5..391ebadc6fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5964,6 +5964,8 @@ let perf = callPackage ../os-specific/linux/kernel/perf.nix { }; + spl = callPackage ../os-specific/linux/spl/default.nix { }; + sysprof = callPackage ../development/tools/profiling/sysprof { inherit (gnome) libglade; }; @@ -5983,6 +5985,8 @@ let }; virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { }; + + zfs = callPackage ../os-specific/linux/zfs/default.nix { }; }; # Build the kernel modules for the some of the kernels. From 65d3ef369e6657cc04dc1d9ac6d9837092b617aa Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 00:12:15 -0700 Subject: [PATCH 4/9] - remove old versions --- pkgs/os-specific/linux/spl/spl-0.6.0.nix | 24 ------------------------ pkgs/os-specific/linux/zfs/zfs-0.6.0.nix | 23 ----------------------- 2 files changed, 47 deletions(-) delete mode 100644 pkgs/os-specific/linux/spl/spl-0.6.0.nix delete mode 100644 pkgs/os-specific/linux/zfs/zfs-0.6.0.nix diff --git a/pkgs/os-specific/linux/spl/spl-0.6.0.nix b/pkgs/os-specific/linux/spl/spl-0.6.0.nix deleted file mode 100644 index c174daad26b..00000000000 --- a/pkgs/os-specific/linux/spl/spl-0.6.0.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, fetchgit, kernel, linuxHeaders, perl }: - -stdenv.mkDerivation { - name = "spl-0.6.0-rc4"; - src = fetchgit { - url = git://github.com/behlendorf/spl.git; - rev = "dde6b7b137f56894a457"; - sha256 = "c402517a647de0c22a69588219aa214f96d1cf9d2f8751b99c5a2795898c726b"; - }; - - patches = [ ./install_prefix.patch ./module_prefix.patch ]; - - buildInputs = [ perl kernel linuxHeaders ]; - - configureFlags = [ "--with-linux=${kernel}/lib/modules/${kernel.version}/build" - "--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build" ]; - - meta = { - description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; - homepage = http://zfsonlinux.org/; - license = "CDDL"; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix deleted file mode 100644 index 1cc923f39d1..00000000000 --- a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchgit, kernel, linuxHeaders, spl, perl, zlib, libuuid }: - -stdenv.mkDerivation { - name = "zfs-0.6.0-rc4"; - src = fetchgit { - url = git://github.com/behlendorf/zfs.git; - rev = "3613204cd7e3ab1ae658"; - sha256 = "217ca162b1b0178dd2e3acc543d3c0cce3a7be7e884a9118ffa0a84d3cbc73f5"; - }; - - patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ]; - - buildInputs = [ kernel linuxHeaders spl perl zlib libuuid]; - - configureFlags = " --with-linux=${kernel}/lib/modules/${kernel.version}/build --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build --with-spl=${spl}/libexec/spl-0.6.0/${kernel.version}"; - - meta = { - description = "Native ZFS for Linux"; - homepage = http://zfsonlinux.org/; - license = "CDDL"; - platforms = stdenv.lib.platforms.linux; - }; -} From 80433442665e52a90663ba9a8f22f6247b689c36 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 09:07:11 -0700 Subject: [PATCH 5/9] Revert " - remove old versions" This reverts commit 65d3ef369e6657cc04dc1d9ac6d9837092b617aa. --- pkgs/os-specific/linux/spl/spl-0.6.0.nix | 24 ++++++++++++++++++++++++ pkgs/os-specific/linux/zfs/zfs-0.6.0.nix | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 pkgs/os-specific/linux/spl/spl-0.6.0.nix create mode 100644 pkgs/os-specific/linux/zfs/zfs-0.6.0.nix diff --git a/pkgs/os-specific/linux/spl/spl-0.6.0.nix b/pkgs/os-specific/linux/spl/spl-0.6.0.nix new file mode 100644 index 00000000000..c174daad26b --- /dev/null +++ b/pkgs/os-specific/linux/spl/spl-0.6.0.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchgit, kernel, linuxHeaders, perl }: + +stdenv.mkDerivation { + name = "spl-0.6.0-rc4"; + src = fetchgit { + url = git://github.com/behlendorf/spl.git; + rev = "dde6b7b137f56894a457"; + sha256 = "c402517a647de0c22a69588219aa214f96d1cf9d2f8751b99c5a2795898c726b"; + }; + + patches = [ ./install_prefix.patch ./module_prefix.patch ]; + + buildInputs = [ perl kernel linuxHeaders ]; + + configureFlags = [ "--with-linux=${kernel}/lib/modules/${kernel.version}/build" + "--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build" ]; + + meta = { + description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; + homepage = http://zfsonlinux.org/; + license = "CDDL"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix new file mode 100644 index 00000000000..1cc923f39d1 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchgit, kernel, linuxHeaders, spl, perl, zlib, libuuid }: + +stdenv.mkDerivation { + name = "zfs-0.6.0-rc4"; + src = fetchgit { + url = git://github.com/behlendorf/zfs.git; + rev = "3613204cd7e3ab1ae658"; + sha256 = "217ca162b1b0178dd2e3acc543d3c0cce3a7be7e884a9118ffa0a84d3cbc73f5"; + }; + + patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ]; + + buildInputs = [ kernel linuxHeaders spl perl zlib libuuid]; + + configureFlags = " --with-linux=${kernel}/lib/modules/${kernel.version}/build --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build --with-spl=${spl}/libexec/spl-0.6.0/${kernel.version}"; + + meta = { + description = "Native ZFS for Linux"; + homepage = http://zfsonlinux.org/; + license = "CDDL"; + platforms = stdenv.lib.platforms.linux; + }; +} From ccad09d3b9b80b41fd79b673ebede73444a9829c Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 09:07:33 -0700 Subject: [PATCH 6/9] Revert " - zfs-0.6.0-rc11, and spl-0.6.0-rc11" This reverts commit 8eb9491a22cd57415ba10470b7c7950e712ec4c0. --- pkgs/lib/licenses.nix | 6 - pkgs/os-specific/linux/spl/default.nix | 39 ----- .../linux/spl/install_prefix.patch | 19 --- .../linux/spl/install_prefix_2.patch | 32 ---- .../os-specific/linux/spl/module_prefix.patch | 33 ----- pkgs/os-specific/linux/spl/spl-0.6.0.nix | 24 --- pkgs/os-specific/linux/zfs/default.nix | 34 ----- .../linux/zfs/kerneldir_path.patch | 140 ------------------ .../linux/zfs/module_perm_prefix.patch | 70 --------- .../linux/zfs/mount_zfs_prefix.patch | 24 --- .../zfs/no_absolute_paths_to_coreutils.patch | 25 ---- pkgs/os-specific/linux/zfs/zfs-0.6.0.nix | 23 --- pkgs/top-level/all-packages.nix | 4 - 13 files changed, 473 deletions(-) delete mode 100644 pkgs/os-specific/linux/spl/default.nix delete mode 100644 pkgs/os-specific/linux/spl/install_prefix.patch delete mode 100644 pkgs/os-specific/linux/spl/install_prefix_2.patch delete mode 100644 pkgs/os-specific/linux/spl/module_prefix.patch delete mode 100644 pkgs/os-specific/linux/spl/spl-0.6.0.nix delete mode 100644 pkgs/os-specific/linux/zfs/default.nix delete mode 100644 pkgs/os-specific/linux/zfs/kerneldir_path.patch delete mode 100644 pkgs/os-specific/linux/zfs/module_perm_prefix.patch delete mode 100644 pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch delete mode 100644 pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch delete mode 100644 pkgs/os-specific/linux/zfs/zfs-0.6.0.nix diff --git a/pkgs/lib/licenses.nix b/pkgs/lib/licenses.nix index e1743bddf69..87f9298706e 100644 --- a/pkgs/lib/licenses.nix +++ b/pkgs/lib/licenses.nix @@ -34,12 +34,6 @@ url = https://fedoraproject.org/wiki/Licensing/BSD; }; - cddl = { - shortName = "CDDL"; - fullName = "Common Development Distribution License "; - url = http://www.opensolaris.org/os/licensing/cddllicense.txt; - }; - cpl10 = { shortName = "CPL 1.0"; fullName = "Common Public License version 1.0"; diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix deleted file mode 100644 index 96565fffa0e..00000000000 --- a/pkgs/os-specific/linux/spl/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchurl, kernel, perl, autoconf, automake, libtool, coreutils, gawk }: - -stdenv.mkDerivation { - name = "spl-0.6.0-rc11"; - src = fetchurl { - url = http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc11.tar.gz; - sha256 = "0brsrr9hvzlpx7a26nn8rw9k2kh9s75hmxp6h087hi64hzxysf8g"; - }; - - patches = [ ./install_prefix.patch ./install_prefix_2.patch ./module_prefix.patch ]; - - buildInputs = [ perl kernel autoconf automake libtool ]; - - NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated"; - - preConfigure = '' - ./autogen.sh - - substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid - substituteInPlace ./module/spl/spl-module.c --replace /bin/mknod mknod - - substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" - substituteInPlace ./module/spl/spl-module.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" - substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" - ''; - - configureFlags = '' - --with-linux=${kernel}/lib/modules/${kernel.version}/build - --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build - ''; - - meta = { - description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; - homepage = http://zfsonlinux.org/; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.cddl; - maintainers = with stdenv.lib.maintainers; [ jcumming ]; - }; -} diff --git a/pkgs/os-specific/linux/spl/install_prefix.patch b/pkgs/os-specific/linux/spl/install_prefix.patch deleted file mode 100644 index 9a7393b7170..00000000000 --- a/pkgs/os-specific/linux/spl/install_prefix.patch +++ /dev/null @@ -1,19 +0,0 @@ -*** spl-0.6.0-rc10/Makefile.am.old Fri Aug 17 14:49:16 2012 ---- spl-0.6.0-rc10/Makefile.am Fri Aug 17 14:51:06 2012 -*************** -*** 32,38 **** - if CONFIG_KERNEL - install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - done ---- 32,38 ---- - if CONFIG_KERNEL - install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - done diff --git a/pkgs/os-specific/linux/spl/install_prefix_2.patch b/pkgs/os-specific/linux/spl/install_prefix_2.patch deleted file mode 100644 index 6068ad1d69c..00000000000 --- a/pkgs/os-specific/linux/spl/install_prefix_2.patch +++ /dev/null @@ -1,32 +0,0 @@ -*** git-export/include/Makefile.am Tue Mar 6 00:05:28 2012 ---- git-export/include/Makefile.am.new Tue Mar 6 00:04:46 2012 -*************** -*** 16,22 **** - - install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - instfiles=`find . -name '*.h'`; \ - for instfile in $$instfiles; do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ ---- 16,22 ---- - - install-data-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ - instfiles=`find . -name '*.h'`; \ - for instfile in $$instfiles; do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ -*************** -*** 24,28 **** - - uninstall-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ - $(RM) -R $$instdest ---- 24,28 ---- - - uninstall-local: - release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ -! instdest=$(DESTDIR)/@libexecdir@/spl/$(LINUX_VERSION); \ - $(RM) -R $$instdest diff --git a/pkgs/os-specific/linux/spl/module_prefix.patch b/pkgs/os-specific/linux/spl/module_prefix.patch deleted file mode 100644 index dd40711ccdb..00000000000 --- a/pkgs/os-specific/linux/spl/module_prefix.patch +++ /dev/null @@ -1,33 +0,0 @@ -*** git-export/module/Makefile.in Wed Dec 31 16:00:01 1969 ---- git-export/module/Makefile.in.new Sat Jan 28 21:42:06 2012 -*************** -*** 17,30 **** - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=$(DESTDIR) \ - INSTALL_MOD_DIR=addon/spl $@ - @# Remove extraneous build products when packaging -! if [ -n "$(DESTDIR)" ]; then \ -! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi ---- 17,30 ---- - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=@prefix@ \ - INSTALL_MOD_DIR=addon/spl $@ - @# Remove extraneous build products when packaging -! if [ -n "@prefix@" ]; then \ -! find @prefix@/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi diff --git a/pkgs/os-specific/linux/spl/spl-0.6.0.nix b/pkgs/os-specific/linux/spl/spl-0.6.0.nix deleted file mode 100644 index c174daad26b..00000000000 --- a/pkgs/os-specific/linux/spl/spl-0.6.0.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, fetchgit, kernel, linuxHeaders, perl }: - -stdenv.mkDerivation { - name = "spl-0.6.0-rc4"; - src = fetchgit { - url = git://github.com/behlendorf/spl.git; - rev = "dde6b7b137f56894a457"; - sha256 = "c402517a647de0c22a69588219aa214f96d1cf9d2f8751b99c5a2795898c726b"; - }; - - patches = [ ./install_prefix.patch ./module_prefix.patch ]; - - buildInputs = [ perl kernel linuxHeaders ]; - - configureFlags = [ "--with-linux=${kernel}/lib/modules/${kernel.version}/build" - "--with-linux-obj=${kernel}/lib/modules/${kernel.version}/build" ]; - - meta = { - description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; - homepage = http://zfsonlinux.org/; - license = "CDDL"; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix deleted file mode 100644 index 43e7b2fd95d..00000000000 --- a/pkgs/os-specific/linux/zfs/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ stdenv, fetchurl, kernel, spl, perl, zlib, libuuid, coreutils, utillinux }: - -stdenv.mkDerivation { - name = "zfs-0.6.0-rc11"; - src = fetchurl { - url = http://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc11.tar.gz; - sha256 = "0wx0srn2k31j9xdk3nvk7l847r0diyb7ph6hd006ax9l5p9zj0a7"; - }; - - patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ./no_absolute_paths_to_coreutils.patch ]; - - buildInputs = [ kernel spl perl zlib libuuid coreutils ]; - - NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated"; - - preConfigure = '' - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" - ''; - - configureFlags = '' - --with-linux=${kernel}/lib/modules/${kernel.version}/build - --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build - --with-spl=${spl}/libexec/spl/${kernel.version} - ''; - - meta = { - description = "Native ZFS for Linux"; - homepage = http://zfsonlinux.org/; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.cddl; - maintainers = with stdenv.lib.maintainers; [ jcumming ]; - }; -} diff --git a/pkgs/os-specific/linux/zfs/kerneldir_path.patch b/pkgs/os-specific/linux/zfs/kerneldir_path.patch deleted file mode 100644 index 7deda946821..00000000000 --- a/pkgs/os-specific/linux/zfs/kerneldir_path.patch +++ /dev/null @@ -1,140 +0,0 @@ -diff -rc zfs-0.6.0-rc10.old/Makefile.in zfs-0.6.0-rc10/Makefile.in -*** zfs-0.6.0-rc10.old/Makefile.in Tue Aug 14 12:35:34 2012 ---- zfs-0.6.0-rc10/Makefile.in Fri Aug 17 15:21:18 2012 -*************** -*** 1121,1127 **** - - @CONFIG_KERNEL_TRUE@install-data-local: - @CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ -! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \ - @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - @CONFIG_KERNEL_TRUE@ done ---- 1121,1127 ---- - - @CONFIG_KERNEL_TRUE@install-data-local: - @CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \ -! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION); \ - @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - @CONFIG_KERNEL_TRUE@ done -diff -rc zfs-0.6.0-rc10.old/include/Makefile.in zfs-0.6.0-rc10/include/Makefile.in -*** zfs-0.6.0-rc10.old/include/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/Makefile.in Fri Aug 17 15:20:50 2012 -*************** -*** 402,408 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION) - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - ---- 402,408 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION) - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - -diff -rc zfs-0.6.0-rc10.old/include/linux/Makefile.in zfs-0.6.0-rc10/include/linux/Makefile.in -*** zfs-0.6.0-rc10.old/include/linux/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/linux/Makefile.in Fri Aug 17 15:20:53 2012 -*************** -*** 337,343 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/linux - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - ---- 337,343 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/linux - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - -diff -rc zfs-0.6.0-rc10.old/include/sys/Makefile.in zfs-0.6.0-rc10/include/sys/Makefile.in -*** zfs-0.6.0-rc10.old/include/sys/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/sys/Makefile.in Fri Aug 17 15:20:57 2012 -*************** -*** 590,596 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - ---- 590,596 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - -diff -rc zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in zfs-0.6.0-rc10/include/sys/fm/Makefile.in -*** zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/sys/fm/Makefile.in Fri Aug 17 15:21:00 2012 -*************** -*** 374,380 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - ---- 374,380 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-recursive - -diff -rc zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in -*** zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in Fri Aug 17 15:21:03 2012 -*************** -*** 332,338 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm/fs - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - ---- 332,338 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm/fs - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - -diff -rc zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fs/Makefile.in -*** zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in Tue Aug 14 12:35:32 2012 ---- zfs-0.6.0-rc10/include/sys/fs/Makefile.in Fri Aug 17 15:21:06 2012 -*************** -*** 332,338 **** - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fs - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - ---- 332,338 ---- - EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) - @CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs - @CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H) -! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fs - @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H) - all: all-am - diff --git a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch b/pkgs/os-specific/linux/zfs/module_perm_prefix.patch deleted file mode 100644 index 07cd04d1dde..00000000000 --- a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch +++ /dev/null @@ -1,70 +0,0 @@ -*** git-export/module/Makefile.in.orig Wed Dec 31 16:00:01 1969 ---- git-export/module/Makefile.in Tue Mar 6 00:23:07 2012 -*************** -*** 11,19 **** - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ - "*** Missing spl symbols ensure you have built the spl:\n" \ ---- 11,21 ---- - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ -! chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ -! chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ - "*** Missing spl symbols ensure you have built the spl:\n" \ -*************** -*** 35,55 **** - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=$(DESTDIR) \ - INSTALL_MOD_DIR=addon/zfs $@ - @# Remove extraneous build products when packaging -! if [ -n "$(DESTDIR)" ]; then \ -! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi - - modules_uninstall: - @# Uninstall the kernel modules -! $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs - - distdir: - ---- 37,57 ---- - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=@prefix@ \ - INSTALL_MOD_DIR=addon/zfs $@ - @# Remove extraneous build products when packaging -! if [ -n "@prefix@" ]; then \ -! find @prefix@/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi - - modules_uninstall: - @# Uninstall the kernel modules -! $(RM) -R @prefix@/lib/modules/@LINUX_VERSION@/addon/zfs - - distdir: - diff --git a/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch b/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch deleted file mode 100644 index 94710c5c985..00000000000 --- a/pkgs/os-specific/linux/zfs/mount_zfs_prefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -*** zfs-0.6.0-rc4.old/cmd/mount_zfs/Makefile.in Thu May 5 15:12:25 2011 ---- zfs-0.6.0-rc4/cmd/mount_zfs/Makefile.in Fri Jun 3 16:42:41 2011 -*************** -*** 285,296 **** - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -! -! # -! # Ignore the prefix for the mount helper. It must be installed in /sbin/ -! # because this path is hardcoded in the mount(8) for security reasons. -! # -! sbindir = /sbin - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ - sysconfdir = @sysconfdir@ ---- 285,291 ---- - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -! sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ - sysconfdir = @sysconfdir@ diff --git a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch b/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch deleted file mode 100644 index e223e34c3a4..00000000000 --- a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch +++ /dev/null @@ -1,25 +0,0 @@ -*** git-export/module/Makefile.in.old Tue Mar 6 01:04:48 2012 ---- git-export/module/Makefile.in Tue Mar 6 01:04:59 2012 -*************** -*** 11,20 **** - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ ---- 11,20 ---- - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ diff --git a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix b/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix deleted file mode 100644 index 1cc923f39d1..00000000000 --- a/pkgs/os-specific/linux/zfs/zfs-0.6.0.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchgit, kernel, linuxHeaders, spl, perl, zlib, libuuid }: - -stdenv.mkDerivation { - name = "zfs-0.6.0-rc4"; - src = fetchgit { - url = git://github.com/behlendorf/zfs.git; - rev = "3613204cd7e3ab1ae658"; - sha256 = "217ca162b1b0178dd2e3acc543d3c0cce3a7be7e884a9118ffa0a84d3cbc73f5"; - }; - - patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ]; - - buildInputs = [ kernel linuxHeaders spl perl zlib libuuid]; - - configureFlags = " --with-linux=${kernel}/lib/modules/${kernel.version}/build --with-linux-obj=${kernel}/lib/modules/${kernel.version}/build --with-spl=${spl}/libexec/spl-0.6.0/${kernel.version}"; - - meta = { - description = "Native ZFS for Linux"; - homepage = http://zfsonlinux.org/; - license = "CDDL"; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 391ebadc6fa..0c0647c60f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5964,8 +5964,6 @@ let perf = callPackage ../os-specific/linux/kernel/perf.nix { }; - spl = callPackage ../os-specific/linux/spl/default.nix { }; - sysprof = callPackage ../development/tools/profiling/sysprof { inherit (gnome) libglade; }; @@ -5985,8 +5983,6 @@ let }; virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { }; - - zfs = callPackage ../os-specific/linux/zfs/default.nix { }; }; # Build the kernel modules for the some of the kernels. From 18d4a832b053067eb771d3f19e4116069c150033 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 09:36:36 -0700 Subject: [PATCH 7/9] - clean up openttd, rili, uqm, and widelands descriptions --- pkgs/games/openttd/default.nix | 10 ++++++++++ pkgs/games/rili/default.nix | 7 ++++++- pkgs/games/uqm/default.nix | 8 +++++++- pkgs/games/widelands/default.nix | 6 ++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index 70b03a4e483..616adf00224 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -25,6 +25,16 @@ stdenv.mkDerivation rec { meta = { description = ''OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe".''; + longDescription = '' + OpenTTD is a transportation economics simulator. In single player mode, + players controll a transportation business, and use rail, road, sea, and air + transport to move goods and people around the simulated world. + + In multiplayer networked mode, players may: + - play competitively as different businesses + - play cooperatively controling the same business + - observe as spectators + ''; homepage = http://www.openttd.org/; license = "GPLv2"; maintainers = with stdenv.lib.maintainers; [ jcumming ]; diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index b3563f42341..84bcf5efa7c 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -19,7 +19,12 @@ stdenv.mkDerivation { meta = { homepage = http://ri-li.sourceforge.net; license = "GPL2+"; - description = "Ri-li is an arcade game licensed under the GPL (General Public License). You drive a toy wood engine in many levels and you must collect all the coaches to win."; + description = "A children's train game"; + longDescription = '' + Ri-li is an arcade game licensed under the GPL (General Public License). +You drive a toy wood engine in many levels and you must collect all the coaches +to win. + ''; maintainers = with stdenv.lib.maintainers; [ jcumming ]; }; } diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix index fd6d727e734..6e67ce660f1 100644 --- a/pkgs/games/uqm/default.nix +++ b/pkgs/games/uqm/default.nix @@ -64,7 +64,13 @@ stdenv.mkDerivation rec { ''; meta = { - description = ''Urquan Masters is an open source clone of the Classic top-down space battle Star Cotnrol ''; + description = "Remake of Star Control II"; + longDescription = '' + The goals for the The Ur-Quan Masters project are: + - to bring Star Control II to modern platforms, thereby making a lot of people happy + - to make game translations easy, thereby making even more people happy + - to adapt the code so that people can more easily make their own spin-offs, thereby making zillions more people happy! + ''; homepage = http://sc2.sourceforge.net/; license = "GPLv2"; maintainers = with stdenv.lib.maintainers; [ jcumming ]; diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix index 62ec56b2f7a..45538acdca3 100644 --- a/pkgs/games/widelands/default.nix +++ b/pkgs/games/widelands/default.nix @@ -53,6 +53,12 @@ rec { meta = { description = "Widelands RTS with multiple-goods economy"; + longDescription = '' + Widelands is a real time strategy game based on "The Settlers" and "The + Settlers II". It has a single player campaign mode, as well as a networked + multiplayer mode. + ''; + maintainers = with a.lib.maintainers; [ raskin From 91d58edafc012223bcd86c4fa45231f7f3291a8a Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 13:52:54 -0700 Subject: [PATCH 8/9] - Make rili work with new autoconf versions --- pkgs/games/rili/default.nix | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index 84bcf5efa7c..9d5764a6307 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -1,30 +1 @@ -{stdenv, fetchurl, SDL_mixer, SDL, autoconf, automake}: - -stdenv.mkDerivation { - name = "ri_li-2.0.1"; - - src = fetchurl { - url = mirror://sourceforge/ri-li/Ri-li-2.0.1.tar.bz2; - sha256 = "f71ccc20c37c601358d963e087ac0d524de8c68e96df09c3aac1ae65edd38dbd"; - }; - - patches = [ ./moderinze_cpp.patch ]; - - preConfigure = '' - export CPPFLAGS="-I${SDL}/include -I${SDL}/include/SDL -I${SDL_mixer}/include" - ''; - - buildInputs = [SDL SDL_mixer autoconf automake]; - - meta = { - homepage = http://ri-li.sourceforge.net; - license = "GPL2+"; - description = "A children's train game"; - longDescription = '' - Ri-li is an arcade game licensed under the GPL (General Public License). -You drive a toy wood engine in many levels and you must collect all the coaches -to win. - ''; - maintainers = with stdenv.lib.maintainers; [ jcumming ]; - }; -} +import ./pkgs/top-level/all-packages.nix From 66e43a52972dca165433860ba3734c6a2bfeb42b Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Fri, 5 Oct 2012 13:56:51 -0700 Subject: [PATCH 9/9] - Make rili work with new autoconf versions --- pkgs/games/rili/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index 84bcf5efa7c..934213279fa 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation { preConfigure = '' export CPPFLAGS="-I${SDL}/include -I${SDL}/include/SDL -I${SDL_mixer}/include" + autoreconf -i ''; buildInputs = [SDL SDL_mixer autoconf automake];