From 263d46713191adbae10839e25e9da11cfd6fb96b Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Sun, 17 Apr 2016 22:33:13 +0200 Subject: [PATCH 01/11] bundlerEnv: filter gemset groups --- .../ruby-modules/bundler-env/default.nix | 15 +++++++++++---- .../ruby-modules/bundler-env/gen-bin-stubs.rb | 12 +++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix index 597acc25b30..4ebba0d5b65 100644 --- a/pkgs/development/ruby-modules/bundler-env/default.nix +++ b/pkgs/development/ruby-modules/bundler-env/default.nix @@ -10,6 +10,7 @@ , postBuild ? null , document ? [] , meta ? {} +, groups ? ["default"] , ignoreCollisions ? false , ... }@args: @@ -18,14 +19,19 @@ let shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'"; importedGemset = import gemset; + filteredGemset = (lib.filterAttrs (name: attrs: + if (builtins.hasAttr "groups" attrs) + then (builtins.any (gemGroup: builtins.any (group: group == gemGroup) groups) attrs.groups) + else true + ) importedGemset); applyGemConfigs = attrs: (if gemConfig ? "${attrs.gemName}" then attrs // gemConfig."${attrs.gemName}" attrs else attrs); - configuredGemset = lib.flip lib.mapAttrs importedGemset (name: attrs: - applyGemConfigs (attrs // { gemName = name; }) + configuredGemset = lib.flip lib.mapAttrs filteredGemset (name: attrs: + applyGemConfigs (attrs // { inherit ruby; gemName = name; }) ); - hasBundler = builtins.hasAttr "bundler" importedGemset; + hasBundler = builtins.hasAttr "bundler" filteredGemset; bundler = if hasBundler then gems.bundler else defs.bundler.override (attrs: { inherit ruby; }); gems = lib.flip lib.mapAttrs configuredGemset (name: attrs: buildRubyGem ((removeAttrs attrs ["source"]) // attrs.source // { @@ -52,7 +58,8 @@ let "${confFiles}/Gemfile" \ "$out/${ruby.gemPath}" \ "${bundler}/${ruby.gemPath}" \ - ${shellEscape (toString envPaths)} + ${shellEscape (toString envPaths)} \ + ${shellEscape (toString groups)} '' + lib.optionalString (postBuild != null) postBuild; passthru = rec { inherit ruby bundler meta gems; diff --git a/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb b/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb index 8609a863e50..92321d6427d 100644 --- a/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb +++ b/pkgs/development/ruby-modules/bundler-env/gen-bin-stubs.rb @@ -10,6 +10,7 @@ gemfile = ARGV[1] bundle_path = ARGV[2] bundler_gem_path = ARGV[3] paths = ARGV[4].split +groups = ARGV[5].split # generate binstubs FileUtils.mkdir_p("#{out}/bin") @@ -29,15 +30,16 @@ paths.each do |path| # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] = "#{gemfile}" -ENV["BUNDLE_PATH"] = "#{bundle_path}" +ENV["BUNDLE_GEMFILE"] = #{gemfile.dump} +ENV["BUNDLE_PATH"] = #{bundle_path.dump} ENV['BUNDLE_FROZEN'] = '1' -Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"]) +Gem.use_paths(#{bundler_gem_path.dump}, ENV["GEM_PATH"]) -require 'bundler/setup' +require 'bundler' +Bundler.setup(#{groups.map(&:dump).join(', ')}) -load Gem.bin_path(#{name.inspect}, #{exe.inspect}) +load Gem.bin_path(#{name.dump}, #{exe.dump}) EOF FileUtils.chmod("+x", "#{out}/bin/#{exe}") end From 6dffcd69f6519d01aeee88ced9d4e3b329f6177c Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Sun, 17 Apr 2016 23:59:55 +0200 Subject: [PATCH 02/11] bootstrap-tools-linux: Qualify all multi-output packages --- pkgs/stdenv/linux/make-bootstrap-tools.nix | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 118eef57ffe..c9dac182318 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -56,9 +56,9 @@ rec { # glibc can contain linker scripts: find them, copy their deps, # and get rid of absolute paths (nuke-refs would make them useless) local lScripts=$(grep --files-with-matches --max-count=1 'GNU ld script' -R "$out/lib") - cp -d -t "$out/lib/" $(cat $lScripts | tr " " "\n" | grep -F '${glibc}' | sort -u) + cp -d -t "$out/lib/" $(cat $lScripts | tr " " "\n" | grep -F '${glibc.out}' | sort -u) for f in $lScripts; do - substituteInPlace "$f" --replace '${glibc}/lib/' "" + substituteInPlace "$f" --replace '${glibc.out}/lib/' "" done # Hopefully we won't need these. @@ -68,33 +68,33 @@ rec { mv $out/include $out/include-glibc # Copy coreutils, bash, etc. - cp ${coreutilsMinimal}/bin/* $out/bin + cp ${coreutilsMinimal.out}/bin/* $out/bin (cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users) - cp ${bash}/bin/bash $out/bin - cp ${findutils}/bin/find $out/bin - cp ${findutils}/bin/xargs $out/bin - cp -d ${diffutils}/bin/* $out/bin - cp -d ${gnused}/bin/* $out/bin - cp -d ${gnugrep}/bin/grep $out/bin - cp ${gawk}/bin/gawk $out/bin - cp -d ${gawk}/bin/awk $out/bin - cp ${gnutar}/bin/tar $out/bin - cp ${gzip}/bin/gzip $out/bin + cp ${bash.out}/bin/bash $out/bin + cp ${findutils.out}/bin/find $out/bin + cp ${findutils.out}/bin/xargs $out/bin + cp -d ${diffutils.out}/bin/* $out/bin + cp -d ${gnused.out}/bin/* $out/bin + cp -d ${gnugrep.out}/bin/grep $out/bin + cp ${gawk.out}/bin/gawk $out/bin + cp -d ${gawk.out}/bin/awk $out/bin + cp ${gnutar.out}/bin/tar $out/bin + cp ${gzip.out}/bin/gzip $out/bin cp ${bzip2.bin}/bin/bzip2 $out/bin - cp -d ${gnumake}/bin/* $out/bin + cp -d ${gnumake.out}/bin/* $out/bin cp -d ${patch}/bin/* $out/bin cp ${patchelf}/bin/* $out/bin cp -d ${gnugrep.pcre.out}/lib/libpcre*.so* $out/lib # needed by grep # Copy what we need of GCC. - cp -d ${gcc.cc}/bin/gcc $out/bin - cp -d ${gcc.cc}/bin/cpp $out/bin - cp -d ${gcc.cc}/bin/g++ $out/bin - cp -d ${gcc.cc}/lib*/libgcc_s.so* $out/lib - cp -d ${gcc.cc}/lib*/libstdc++.so* $out/lib - cp -rd ${gcc.cc}/lib/gcc $out/lib + cp -d ${gcc.cc.out}/bin/gcc $out/bin + cp -d ${gcc.cc.out}/bin/cpp $out/bin + cp -d ${gcc.cc.out}/bin/g++ $out/bin + cp -d ${gcc.cc.lib}/lib*/libgcc_s.so* $out/lib + cp -d ${gcc.cc.lib}/lib*/libstdc++.so* $out/lib + cp -rd ${gcc.cc.out}/lib/gcc $out/lib chmod -R u+w $out/lib rm -f $out/lib/gcc/*/*/include*/linux rm -f $out/lib/gcc/*/*/include*/sound @@ -102,16 +102,16 @@ rec { rm -f $out/lib/gcc/*/*/include-fixed/asm rm -rf $out/lib/gcc/*/*/plugin #rm -f $out/lib/gcc/*/*/*.a - cp -rd ${gcc.cc}/libexec/* $out/libexec + cp -rd ${gcc.cc.out}/libexec/* $out/libexec chmod -R u+w $out/libexec rm -rf $out/libexec/gcc/*/*/plugin mkdir $out/include - cp -rd ${gcc.cc}/include/c++ $out/include + cp -rd ${gcc.cc.out}/include/c++ $out/include chmod -R u+w $out/include rm -rf $out/include/c++/*/ext/pb_ds rm -rf $out/include/c++/*/ext/parallel - cp -d ${gmpxx}/lib/libgmp*.so* $out/lib + cp -d ${gmpxx.out}/lib/libgmp*.so* $out/lib cp -d ${mpfr.out}/lib/libmpfr*.so* $out/lib cp -d ${libmpc}/lib/libmpc*.so* $out/lib cp -d ${zlib.out}/lib/libz.so* $out/lib @@ -119,7 +119,7 @@ rec { # Copy binutils. for i in as ld ar ranlib nm strip readelf objdump; do - cp ${binutils}/bin/$i $out/bin + cp ${binutils.out}/bin/$i $out/bin done cp -d ${binutils.out}/lib/lib*.so* $out/lib From c09692ede596de9da1d37842ddafdd74da29a0c0 Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Sun, 17 Apr 2016 23:55:17 +0200 Subject: [PATCH 03/11] bootstrap-tools-linux: Use tar without acl --- pkgs/stdenv/linux/make-bootstrap-tools.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index c9dac182318..8ffeebaa962 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -10,6 +10,8 @@ rec { aclSupport = false; }); + tarMinimal = gnutar.override { acl = null; }; + busyboxMinimal = busybox.override { useMusl = true; enableStatic = true; @@ -79,7 +81,7 @@ rec { cp -d ${gnugrep.out}/bin/grep $out/bin cp ${gawk.out}/bin/gawk $out/bin cp -d ${gawk.out}/bin/awk $out/bin - cp ${gnutar.out}/bin/tar $out/bin + cp ${tarMinimal.out}/bin/tar $out/bin cp ${gzip.out}/bin/gzip $out/bin cp ${bzip2.bin}/bin/bzip2 $out/bin cp -d ${gnumake.out}/bin/* $out/bin From 55bd038cc17e8c6693e0eb5938d14646d0559415 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Sun, 17 Apr 2016 22:36:40 +0200 Subject: [PATCH 04/11] gem-config: fix bundler --- pkgs/development/ruby-modules/gem-config/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 5544a7f88b4..72e483bc77d 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -166,5 +166,15 @@ in export XAPIAN_CONFIG=${xapian}/bin/xapian-config ''; }; + + # patching shebangs would fail on the templates/Executable file, so we + # temporarily remove the executable flag. + bundler = attrs: + let + templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/"; + in { + preFixup = "chmod -x $out/${templates}/Executable"; + postFixup = "chmod +x $out/${templates}/Executable"; + }; } From b8b368ef7cafdd544e3218aca6079ecd05658c10 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 17 Apr 2016 21:30:46 -0400 Subject: [PATCH 05/11] root: 5.34.15 -> 6.04.16 --- .../science/misc/root/cmake.patch | 11 -------- .../science/misc/root/default.nix | 27 +++++-------------- 2 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 pkgs/applications/science/misc/root/cmake.patch diff --git a/pkgs/applications/science/misc/root/cmake.patch b/pkgs/applications/science/misc/root/cmake.patch deleted file mode 100644 index 6d2d4cdc70d..00000000000 --- a/pkgs/applications/science/misc/root/cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/modules/RootBuildOptions.cmake 1969-12-31 20:30:01.000000000 -0330 -+++ b/cmake/modules/RootBuildOptions.cmake 2014-01-10 14:09:29.424937408 -0330 -@@ -149,7 +149,7 @@ - - #---General Build options---------------------------------------------------------------------- - # use, i.e. don't skip the full RPATH for the build tree --set(CMAKE_SKIP_BUILD_RPATH FALSE) -+set(CMAKE_SKIP_BUILD_RPATH TRUE) - # when building, don't use the install RPATH already (but later on when installing) - set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - # add the automatically determined parts of the RPATH diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index e61cb557e12..9795604bab1 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -1,31 +1,18 @@ -{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, mesa, gfortran -, libX11,libXpm, libXft, libXext, zlib }: +{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, python +, libX11, libXpm, libXft, libXext, zlib }: stdenv.mkDerivation rec { name = "root-${version}"; - version = "5.34.15"; + version = "6.04.16"; src = fetchurl { - url = "ftp://root.cern.ch/root/root_v${version}.source.tar.gz"; - sha256 = "1bkiggcyya39a794d3d2rzzmmkbdymf86hbqhh0l1pl4f38xvp6i"; + url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; + sha256 = "0f58dg83aqhggkxmimsfkd1qyni2vhmykq4qa89cz6jr9p73i1vm"; }; - buildInputs = [ cmake pkgconfig gfortran mesa libX11 libXpm libXft libXext zlib ]; + buildInputs = [ cmake pkgconfig python libX11 libXpm libXft libXext zlib ]; - NIX_CFLAGS_LINK = "-lX11"; - - # CMAKE_INSTALL_RPATH_USE_LINK_PATH is set to FALSE in - # /cmake/modules/RootBuildOptions.cmake. - # This patch sets it to TRUE. - patches = [ - ./cmake.patch - (fetchpatch { - name = "fix-tm_t-member.diff"; - url = "https://github.com/root-mirror/root/commit/" - + "08b08412bafc24fa635b0fdb832097a3aa2fa1d2.diff"; - sha256 = "0apbp51pk8471gl06agx3i88dn76p6gpkgf1ssfhcyam0bjl8907"; - }) - ]; + cmakeFlags = "-Drpath=ON"; enableParallelBuilding = true; From ccaeab632313603db3854fdaeace9e5b6fdc7827 Mon Sep 17 00:00:00 2001 From: Michiel Leenaars Date: Mon, 18 Apr 2016 10:36:47 +0200 Subject: [PATCH 06/11] softhsm: init -> 2.1.0 --- pkgs/tools/security/softhsm/default.nix | 31 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/security/softhsm/default.nix diff --git a/pkgs/tools/security/softhsm/default.nix b/pkgs/tools/security/softhsm/default.nix new file mode 100644 index 00000000000..4bd19968676 --- /dev/null +++ b/pkgs/tools/security/softhsm/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, botan }: + +stdenv.mkDerivation rec { + + name = "softhsm-${version}"; + version = "2.1.0"; + + src = fetchurl { + url = "https://dist.opendnssec.org/source/${name}.tar.gz"; + sha256 = "0399b06f196fbfaebe73b4aeff2e2d65d0dc1901161513d0d6a94f031dcd827e"; + }; + + configureFlags = [ + "--with-crypto-backend=botan" + "--with-botan=${botan}" + "--sysconfdir=$out/etc" + "--localstatedir=$out/var" + ]; + + buildInputs = [ botan ]; + + postInstall = "rm -rf $out/var"; + + meta = { + homepage = https://www.opendnssec.org/softhsm; + description = "Cryptographic store accessible through a PKCS #11 interface"; + license = stdenv.lib.licenses.bsd2; + maintainers = stdenv.lib.maintainers.leenaars; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 049f4f39b83..59bf88485ef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3230,6 +3230,8 @@ in snort = callPackage ../applications/networking/ids/snort { }; + softhsm = callPackage ../tools/security/softhsm { }; + solr = callPackage ../servers/search/solr { }; solvespace = callPackage ../applications/graphics/solvespace { }; From 93bd5556be976d27128cc8fd99c0a106e82be73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 15 Apr 2016 20:09:41 +0200 Subject: [PATCH 07/11] Revert "rigsofrods: remove dead package" This reverts commit 69e7948ffe120981417894e51ae311cbdaaafae4. --- pkgs/games/rigsofrods/default.nix | 60 +++++++++++++++++++++++++ pkgs/games/rigsofrods/doubleslash.patch | 13 ++++++ pkgs/games/rigsofrods/paths.patch | 12 +++++ pkgs/top-level/all-packages.nix | 4 ++ 4 files changed, 89 insertions(+) create mode 100644 pkgs/games/rigsofrods/default.nix create mode 100644 pkgs/games/rigsofrods/doubleslash.patch create mode 100644 pkgs/games/rigsofrods/paths.patch diff --git a/pkgs/games/rigsofrods/default.nix b/pkgs/games/rigsofrods/default.nix new file mode 100644 index 00000000000..26c7e0a3667 --- /dev/null +++ b/pkgs/games/rigsofrods/default.nix @@ -0,0 +1,60 @@ +{ fetchsvn, fetchurl, stdenv, wxGTK29, freeimage, cmake, zziplib, mesa, boost, + pkgconfig, libuuid, openal, ogre, ois, curl, gtk, pixman, mygui, unzip, + angelscript, caelum, ogrepaged, mysocketw, libxcb + }: + +stdenv.mkDerivation rec { + version = "0.39.4"; + name = "rigsofrods-${version}"; + + src = fetchurl { + url = mirror://sourceforge/rigsofrods/rigsofrods-source-0.39.4.tar.bz2; + sha256 = "1kpjkski0yllwzdki0rjpqvifjs0fwpgs513y4dv4s9wfwan1qcx"; + }; + + contentPackSrc = fetchurl { + url = mirror://sourceforge/rigsofrods/rigsofrods/0.37/content-pack-0.37.zip; + sha256 = "0prvn8lxqazadad4mv0nilax9i4vqb9s7dp7mqzvqc0ycmcnf4ps"; + }; + + enableParallelBuilding = true; + + cmakeFlags = [ + "-DROR_USE_CURL=TRUE" + "-DROR_USE_MYGUI=TRUE" + "-DROR_USE_OPNEAL=TRUE" + "-DROR_USE_CAELUM=TRUE" + "-DROR_USE_PAGED=TRUE" + "-DROR_USE_ANGELSCRIPT=TRUE" + "-DROR_USE_SOCKETW=TRUE" + "-DCMAKE_BUILD_TYPE=Release" + ]; + + installPhase = '' + sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg + mkdir -p $out/share/rigsofrods + cp -r ../bin/* $out/share/rigsofrods + cp ../tools/linux/binaries/plugins.cfg $out/share/rigsofrods + mkdir -p $out/bin + ln -s $out/share/rigsofrods/{RoR,rorconfig} $out/bin + cd $out/share/rigsofrods + mkdir packs + cd packs + unzip "${contentPackSrc}" + ''; + + patches = [ ./doubleslash.patch ./paths.patch ]; + + buildInputs = [ wxGTK29 freeimage cmake zziplib mesa boost pkgconfig + libuuid openal ogre ois curl gtk mygui unzip angelscript + caelum ogrepaged mysocketw libxcb ]; + + meta = { + description = "3D simulator game where you can drive, fly and sail various vehicles"; + homepage = http://rigsofrods.sourceforge.net/; + license = stdenv.lib.licenses.gpl3; + maintainers = with stdenv.lib.maintainers; [viric raskin]; + platforms = stdenv.lib.platforms.linux; + hydraPlatforms = []; + }; +} diff --git a/pkgs/games/rigsofrods/doubleslash.patch b/pkgs/games/rigsofrods/doubleslash.patch new file mode 100644 index 00000000000..c62c5470dfc --- /dev/null +++ b/pkgs/games/rigsofrods/doubleslash.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeDependenciesConfig.txt b/CMakeDependenciesConfig.txt +index 447a440..e2562de 100644 +--- a/CMakeDependenciesConfig.txt ++++ b/CMakeDependenciesConfig.txt +@@ -228,7 +228,7 @@ ELSEIF(UNIX) + # Paged Geometry + find_path(PAGED_INCLUDE_DIRS "PagedGeometry/PagedGeometry.h") + if(PAGED_INCLUDE_DIRS) +- set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};/${PAGED_INCLUDE_DIRS}/PagedGeometry") ++ set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};${PAGED_INCLUDE_DIRS}/PagedGeometry") + find_library(PAGED_LIBRARIES "PagedGeometry") + set(ROR_USE_PAGED ON) + else() diff --git a/pkgs/games/rigsofrods/paths.patch b/pkgs/games/rigsofrods/paths.patch new file mode 100644 index 00000000000..e20b00a7693 --- /dev/null +++ b/pkgs/games/rigsofrods/paths.patch @@ -0,0 +1,12 @@ +diff --git a/source/main/framework/ContentManager.cpp b/source/main/framework/ContentManager.cpp +index 0bfea8c..82cdab9 100644 +--- a/source/main/framework/ContentManager.cpp ++++ b/source/main/framework/ContentManager.cpp +@@ -238,6 +238,7 @@ bool ContentManager::init(void) + #endif // USE_OPENAL + + // and the content ++ ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("Program Path")+"packs", "FileSystem", "Packs", true); + ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"packs", "FileSystem", "Packs", true); + ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"mods", "FileSystem", "Packs", true); + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59bf88485ef..e13d4df3cc3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14944,6 +14944,10 @@ in openglSupport = mesaSupported; }; + rigsofrods = callPackage ../games/rigsofrods { + mygui = myguiSvn; + }; + rili = callPackage ../games/rili { }; rimshot = callPackage ../games/rimshot { love = love_0_7; }; From e741a302d4f71f73475df4081f32ccc5fd4ebf02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 16 Apr 2016 00:59:45 +0200 Subject: [PATCH 08/11] Make rigsofrods build the latest code. I add angelscript 2.22 too, as it makes RoR happy. --- .../interpreters/angelscript/2.22.nix | 44 +++++++++++++++++++ pkgs/games/rigsofrods/default.nix | 42 +++++++++--------- pkgs/games/rigsofrods/doubleslash.patch | 13 ------ pkgs/games/rigsofrods/paths.patch | 12 ----- pkgs/top-level/all-packages.nix | 4 +- 5 files changed, 69 insertions(+), 46 deletions(-) create mode 100644 pkgs/development/interpreters/angelscript/2.22.nix delete mode 100644 pkgs/games/rigsofrods/doubleslash.patch delete mode 100644 pkgs/games/rigsofrods/paths.patch diff --git a/pkgs/development/interpreters/angelscript/2.22.nix b/pkgs/development/interpreters/angelscript/2.22.nix new file mode 100644 index 00000000000..c9097bec5dc --- /dev/null +++ b/pkgs/development/interpreters/angelscript/2.22.nix @@ -0,0 +1,44 @@ +{stdenv, fetchurl, unzip}: +let + s = # Generated upstream information + rec { + baseName="angelscript"; + version = "2.22.2"; + name="${baseName}-${version}"; + url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; + sha256 = "1pp853lbnz383ilp9wbgc3wv1dn7lpx3idz8dmzda94rckl7sd43"; + }; + buildInputs = [ + unzip + ]; +in +stdenv.mkDerivation { + inherit (s) name version; + inherit buildInputs; + src = fetchurl { + inherit (s) url sha256; + }; + preConfigure = '' + cd angelscript/projects/gnuc + sed -i makefile -e "s@LOCAL = .*@LOCAL = $out@" + export SHARED=1 + export VERSION="${s.version}" + mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include" + ''; + postBuild = '' + rm ../../lib/* + ''; + postInstall = '' + mkdir -p "$out/share/docs/angelscript" + cp -r ../../../docs/* "$out/share/docs/angelscript" + ''; + meta = { + inherit (s) version; + description = "Light-weight scripting library"; + license = stdenv.lib.licenses.zlib ; + maintainers = [stdenv.lib.maintainers.raskin]; + platforms = stdenv.lib.platforms.linux; + downloadPage = "http://www.angelcode.com/angelscript/downloads.html"; + homepage="http://www.angelcode.com/angelscript/"; + }; +} diff --git a/pkgs/games/rigsofrods/default.nix b/pkgs/games/rigsofrods/default.nix index 26c7e0a3667..04b632e0dd3 100644 --- a/pkgs/games/rigsofrods/default.nix +++ b/pkgs/games/rigsofrods/default.nix @@ -1,15 +1,17 @@ -{ fetchsvn, fetchurl, stdenv, wxGTK29, freeimage, cmake, zziplib, mesa, boost, +{ fetchurl, fetchFromGitHub, stdenv, wxGTK30, freeimage, cmake, zziplib, mesa, boost, pkgconfig, libuuid, openal, ogre, ois, curl, gtk, pixman, mygui, unzip, - angelscript, caelum, ogrepaged, mysocketw, libxcb + angelscript, ogrepaged, mysocketw, libxcb }: stdenv.mkDerivation rec { - version = "0.39.4"; + version = "git-20160412"; name = "rigsofrods-${version}"; - src = fetchurl { - url = mirror://sourceforge/rigsofrods/rigsofrods-source-0.39.4.tar.bz2; - sha256 = "1kpjkski0yllwzdki0rjpqvifjs0fwpgs513y4dv4s9wfwan1qcx"; + src = fetchFromGitHub { + owner = "RigsOfRods"; + repo = "rigs-of-rods"; + rev = "1ebd359dbd467b4c3171dd6d054e7d8ec39f78ba"; + sha256 = "0h71nrgq5r5cnh20c7wl8jzyaf50dj1b5jdrwihnklpsfyfvjlw4"; }; contentPackSrc = fetchurl { @@ -19,21 +21,21 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - cmakeFlags = [ - "-DROR_USE_CURL=TRUE" - "-DROR_USE_MYGUI=TRUE" - "-DROR_USE_OPNEAL=TRUE" - "-DROR_USE_CAELUM=TRUE" - "-DROR_USE_PAGED=TRUE" - "-DROR_USE_ANGELSCRIPT=TRUE" - "-DROR_USE_SOCKETW=TRUE" - "-DCMAKE_BUILD_TYPE=Release" - ]; + #cmakeFlags = [ + # "-DROR_USE_CURL=TRUE" + # "-DROR_USE_MYGUI=TRUE" + # "-DROR_USE_OPNEAL=TRUE" + # "-DROR_USE_CAELUM=TRUE" + # "-DROR_USE_PAGED=TRUE" + # "-DROR_USE_ANGELSCRIPT=TRUE" + # "-DROR_USE_SOCKETW=TRUE" + # "-DCMAKE_BUILD_TYPE=Release" + #]; installPhase = '' sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg mkdir -p $out/share/rigsofrods - cp -r ../bin/* $out/share/rigsofrods + cp -r bin/* $out/share/rigsofrods cp ../tools/linux/binaries/plugins.cfg $out/share/rigsofrods mkdir -p $out/bin ln -s $out/share/rigsofrods/{RoR,rorconfig} $out/bin @@ -43,11 +45,11 @@ stdenv.mkDerivation rec { unzip "${contentPackSrc}" ''; - patches = [ ./doubleslash.patch ./paths.patch ]; + #patches = [ ./paths.patch ]; - buildInputs = [ wxGTK29 freeimage cmake zziplib mesa boost pkgconfig + buildInputs = [ wxGTK30 freeimage cmake zziplib mesa boost pkgconfig libuuid openal ogre ois curl gtk mygui unzip angelscript - caelum ogrepaged mysocketw libxcb ]; + ogrepaged mysocketw libxcb ]; meta = { description = "3D simulator game where you can drive, fly and sail various vehicles"; diff --git a/pkgs/games/rigsofrods/doubleslash.patch b/pkgs/games/rigsofrods/doubleslash.patch deleted file mode 100644 index c62c5470dfc..00000000000 --- a/pkgs/games/rigsofrods/doubleslash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeDependenciesConfig.txt b/CMakeDependenciesConfig.txt -index 447a440..e2562de 100644 ---- a/CMakeDependenciesConfig.txt -+++ b/CMakeDependenciesConfig.txt -@@ -228,7 +228,7 @@ ELSEIF(UNIX) - # Paged Geometry - find_path(PAGED_INCLUDE_DIRS "PagedGeometry/PagedGeometry.h") - if(PAGED_INCLUDE_DIRS) -- set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};/${PAGED_INCLUDE_DIRS}/PagedGeometry") -+ set(PAGED_INCLUDE_DIRS "${PAGED_INCLUDE_DIRS};${PAGED_INCLUDE_DIRS}/PagedGeometry") - find_library(PAGED_LIBRARIES "PagedGeometry") - set(ROR_USE_PAGED ON) - else() diff --git a/pkgs/games/rigsofrods/paths.patch b/pkgs/games/rigsofrods/paths.patch deleted file mode 100644 index e20b00a7693..00000000000 --- a/pkgs/games/rigsofrods/paths.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/source/main/framework/ContentManager.cpp b/source/main/framework/ContentManager.cpp -index 0bfea8c..82cdab9 100644 ---- a/source/main/framework/ContentManager.cpp -+++ b/source/main/framework/ContentManager.cpp -@@ -238,6 +238,7 @@ bool ContentManager::init(void) - #endif // USE_OPENAL - - // and the content -+ ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("Program Path")+"packs", "FileSystem", "Packs", true); - ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"packs", "FileSystem", "Packs", true); - ResourceGroupManager::getSingleton().addResourceLocation(SSETTING("User Path")+"mods", "FileSystem", "Packs", true); - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e13d4df3cc3..e410507f74e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5247,6 +5247,8 @@ in angelscript = callPackage ../development/interpreters/angelscript {}; + angelscript_2_22 = callPackage ../development/interpreters/angelscript/2.22.nix {}; + chibi = callPackage ../development/interpreters/chibi { }; ceptre = callPackage ../development/interpreters/ceptre { }; @@ -14945,7 +14947,7 @@ in }; rigsofrods = callPackage ../games/rigsofrods { - mygui = myguiSvn; + angelscript = angelscript_2_22; }; rili = callPackage ../games/rili { }; From 2d3245042e038713f08a57a14b445a0e03f98ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 18 Apr 2016 11:56:43 +0200 Subject: [PATCH 09/11] Removing content-pack download from rigsofrods. The content packs from 0.37 don't seem to work. We should get one from 0.4, but there are license problems, I think. --- pkgs/games/rigsofrods/default.nix | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/pkgs/games/rigsofrods/default.nix b/pkgs/games/rigsofrods/default.nix index 04b632e0dd3..c4477ab01d9 100644 --- a/pkgs/games/rigsofrods/default.nix +++ b/pkgs/games/rigsofrods/default.nix @@ -14,39 +14,17 @@ stdenv.mkDerivation rec { sha256 = "0h71nrgq5r5cnh20c7wl8jzyaf50dj1b5jdrwihnklpsfyfvjlw4"; }; - contentPackSrc = fetchurl { - url = mirror://sourceforge/rigsofrods/rigsofrods/0.37/content-pack-0.37.zip; - sha256 = "0prvn8lxqazadad4mv0nilax9i4vqb9s7dp7mqzvqc0ycmcnf4ps"; - }; - enableParallelBuilding = true; - #cmakeFlags = [ - # "-DROR_USE_CURL=TRUE" - # "-DROR_USE_MYGUI=TRUE" - # "-DROR_USE_OPNEAL=TRUE" - # "-DROR_USE_CAELUM=TRUE" - # "-DROR_USE_PAGED=TRUE" - # "-DROR_USE_ANGELSCRIPT=TRUE" - # "-DROR_USE_SOCKETW=TRUE" - # "-DCMAKE_BUILD_TYPE=Release" - #]; - installPhase = '' sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg mkdir -p $out/share/rigsofrods cp -r bin/* $out/share/rigsofrods cp ../tools/linux/binaries/plugins.cfg $out/share/rigsofrods mkdir -p $out/bin - ln -s $out/share/rigsofrods/{RoR,rorconfig} $out/bin - cd $out/share/rigsofrods - mkdir packs - cd packs - unzip "${contentPackSrc}" + ln -s $out/share/rigsofrods/{RoR,RoRConfig} $out/bin ''; - #patches = [ ./paths.patch ]; - buildInputs = [ wxGTK30 freeimage cmake zziplib mesa boost pkgconfig libuuid openal ogre ois curl gtk mygui unzip angelscript ogrepaged mysocketw libxcb ]; From ecedf80a5254a986cc1e45c6d87731d3fff9c6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 18 Apr 2016 12:29:09 +0200 Subject: [PATCH 10/11] Fixing ogre-paged build. I update to a tree maintained by rigsofrods people. --- pkgs/development/libraries/ogrepaged/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/ogrepaged/default.nix b/pkgs/development/libraries/ogrepaged/default.nix index 3539a6302b1..bff367f750b 100644 --- a/pkgs/development/libraries/ogrepaged/default.nix +++ b/pkgs/development/libraries/ogrepaged/default.nix @@ -1,11 +1,12 @@ { stdenv, fetchurl, cmake, pkgconfig, ois, ogre, libX11, boost }: stdenv.mkDerivation rec { - name = "ogre-paged-1.1.3"; + name = "ogre-paged-${version}"; + version = "1.2.0"; src = fetchurl { - url = "http://ogre-paged.googlecode.com/files/${name}.tar.gz"; - sha256 = "1qqlkg17plk87dm3fsm34x8lkd5rxkhiz77ppcgc71a7z050vhjq"; + url = "https://github.com/RigsOfRods/ogre-pagedgeometry/archive/v${version}.tar.gz"; + sha256 = "17j7rw9wbkynxbhm2lay3qgjnnagb2vd5jn9iijnn2lf8qzbgy82"; }; buildInputs = [ ois ogre libX11 boost ]; @@ -19,7 +20,5 @@ stdenv.mkDerivation rec { description = "Paged Geometry for Ogre3D"; homepage = http://code.google.com/p/ogre-paged/; license = stdenv.lib.licenses.mit; - # Build failures - broken = true; }; } From c85e3861ba6006c5250546f4997e372fe3f997d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 18 Apr 2016 12:30:04 +0200 Subject: [PATCH 11/11] Make rigsofrods use mygui with ogre. Required. --- pkgs/top-level/all-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e410507f74e..57947babc1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14948,6 +14948,9 @@ in rigsofrods = callPackage ../games/rigsofrods { angelscript = angelscript_2_22; + mygui = mygui.override { + withOgre = true; + }; }; rili = callPackage ../games/rili { };