Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.03]: Cherry-pick various fixes from master #38823

Merged
merged 8 commits into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions pkgs/applications/networking/cluster/openshift/default.nix
Original file line number Diff line number Diff line change
@@ -1,53 +1,66 @@
{ stdenv, fetchFromGitHub, which, buildGoPackage, utillinux, coreutils }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, removeReferencesTo, which, go_1_9, go-bindata, makeWrapper, rsync
, iptables, coreutils, kerberos, clang
, components ? [
"cmd/oc"
"cmd/openshift"
]
}:

with lib;

let
version = "3.6.0";
version = "3.9.0";
ver = stdenv.lib.elemAt (stdenv.lib.splitString "." version);
versionMajor = ver 0;
versionMinor = ver 1;
versionPatch = ver 2;
in buildGoPackage rec {
gitCommit = "191fece";
# version is in vendor/k8s.io/kubernetes/pkg/version/base.go
k8sversion = "v1.9.1";
k8sgitcommit = "a0ce1bc657";
in stdenv.mkDerivation rec {
name = "openshift-origin-${version}";
inherit version;

src = fetchFromGitHub {
owner = "openshift";
repo = "origin";
rev = "v${version}";
sha256 = "08bdqvsjl6c7dmllyz8n4akb7gyn91znvbph5cgmmk1bhskycy1r";
};
sha256 = "06k0zilfyvll7z34yirraslgpwgah9k6y5i6wgi7f00a79k76k78";
};

buildInputs = [ which ];
# go > 1.10
# [FATAL] [14:44:02+0000] Please install Go version go1.9 or use PERMISSIVE_GO=y to bypass this check.
buildInputs = [ removeReferencesTo makeWrapper which go_1_9 rsync go-bindata kerberos clang ];

outputs = [ "out" ];

goPackagePath = null;
patchPhase = ''
patchShebangs ./hack
substituteInPlace pkg/bootstrap/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt'

substituteInPlace pkg/bootstrap/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mount' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'

substituteInPlace pkg/bootstrap/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'
'';

buildPhase = ''
cd go/src/origin-v${version}-src
# Openshift build require this variables to be set
# unless there is a .git folder which is not the case with fetchFromGitHub
export OS_GIT_VERSION=v${version}
export OS_GIT_MAJOR=${versionMajor}
export OS_GIT_MINOR=${versionMinor}
make build
echo "OS_GIT_VERSION=v${version}" >> os-version-defs
echo "OS_GIT_MAJOR=${versionMajor}" >> os-version-defs
echo "OS_GIT_MINOR=${versionMinor}" >> os-version-defs
echo "OS_GIT_PATCH=${versionPatch}" >> os-version-defs
echo "OS_GIT_COMMIT=${gitCommit}" >> os-version-defs
echo "KUBE_GIT_VERSION=${k8sversion}" >> os-version-defs
echo "KUBE_GIT_COMMIT=${k8sgitcommit}" >> os-version-defs
export OS_VERSION_FILE="os-version-defs"
export CC=clang
make all WHAT='${concatStringsSep " " components}'
'';

installPhase = ''
mkdir -p "$bin/bin"
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/"
mkdir -p "$out/bin"
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/"
'';

preFixup = ''
find $out/bin -type f -exec remove-references-to -t ${go_1_9} '{}' +
'';

meta = with stdenv.lib; {
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/compilers/opendylan/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
{stdenv, fetchgit, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:

stdenv.mkDerivation {
name = "opendylan-2013.2";
name = "opendylan-2016.1pre";

src = fetchgit {
url = https://github.com/dylan-lang/opendylan;
rev = "ce9b14dab6cb9ffedc69fae8c6df524c0c79abd3";
sha256 = "17jvhv0y63fj25ma05k70b7phcwgjyna5qkrirk48z3xapb8bknd";
rev = "cd9a8395586d33cc43a8611c1dc0513e69ee82dd";
sha256 = "00r1dm7mjy5p4hfm13vc4b6qryap40zinia3y15rhvalc3i2np4b";
fetchSubmodules = true;
};

buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
] ;
];

preConfigure = if stdenv.system == "i686-linux" then ''
mkdir -p $TMPDIR/mps
Expand Down
34 changes: 21 additions & 13 deletions pkgs/development/interpreters/renpy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,37 @@

with pythonPackages;

stdenv.mkDerivation {
name = "renpy-6.99.12.4";
stdenv.mkDerivation rec {
name = "renpy-${version}";
version = "6.99.14";

meta = {
meta = with stdenv.lib; {
description = "Ren'Py Visual Novel Engine";
homepage = http://renpy.org/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
# This is an ancient version, last updated in 2014 (3d59f42ce); it fails to
# build with the most recent pygame version, and fails to run with 1.9.1.
broken = true;
license = licenses.mit;
platforms = platforms.linux;
};

src = fetchurl {
url = "http://www.renpy.org/dl/6.99.12.4/renpy-6.99.12.4-source.tar.bz2";
sha256 = "035342rr39zp7krp08z0xhcl73gqbqyilshgmljq0ynfrxxckn35";
url = "https://www.renpy.org/dl/${version}/renpy-${version}-source.tar.bz2";
sha256 = "00r1l9rd9wj8zfh279n7sak894xxhxqp3rcwg41g0md8yfiysc4h";
};

patches = [
./launcherenv.patch
];

postPatch = ''
substituteInPlace launcher/game/choose_directory.rpy --replace /usr/bin/python ${python.interpreter}
'';

nativeBuildInputs = [ pkgconfig ];
buildInputs = [
python cython wrapPython
python cython wrapPython tkinter
SDL2 libpng ffmpeg freetype glew libGLU_combined fribidi zlib pygame_sdl2 glib
];

pythonPath = [ pygame_sdl2 ];
pythonPath = [ pygame_sdl2 tkinter ];

RENPY_DEPS_INSTALL = stdenv.lib.concatStringsSep "::" (map (path: "${path}") [
SDL2 SDL2.dev libpng ffmpeg ffmpeg.out freetype glew.dev glew.out libGLU_combined fribidi zlib
Expand All @@ -41,7 +47,9 @@ stdenv.mkDerivation {

installPhase = ''
mkdir -p $out/share/renpy
cp -r renpy renpy.py $out/share/renpy
cp -vr * $out/share/renpy
rm -rf $out/share/renpy/module

python module/setup.py install --prefix=$out --install-lib=$out/share/renpy/module

makeWrapper ${python}/bin/python $out/bin/renpy \
Expand Down
14 changes: 14 additions & 0 deletions pkgs/development/interpreters/renpy/launcherenv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# The launcher game starts projects in a separate python process
# with the -E flag, which prevents the nix set PYTHONPATH envvar
# from taking effect, preventing the loading of pygame_sdl2
--- a/launcher/game/project.rpy
+++ b/launcher/game/project.rpy
@@ -239,7 +239,7 @@
raise Exception("Python interpreter not found: %r", executables)

# Put together the basic command line.
- cmd = [ executable, "-EO", sys.argv[0] ]
+ cmd = [ executable, "-O", sys.argv[0] ]

cmd.append(self.path)
cmd.extend(args)
4 changes: 2 additions & 2 deletions pkgs/development/libraries/hpx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

stdenv.mkDerivation rec {
name = "hpx-${version}";
version = "1.0.0";
version = "1.1.0";

src = fetchFromGitHub {
owner = "STEllAR-GROUP";
repo = "hpx";
rev = "${version}";
sha256 = "0k79gw4c0v4i7ps1hw6x4m7svxbfml5xm6ly7p00dvg7z9521zsk";
sha256 = "0xlhnycmpy2jgiqyzpwmkdrl6drf46ywdsl0qm4vksvjxqfgk9z3";
};

buildInputs = [ boost hwloc gperftools ];
Expand Down
15 changes: 10 additions & 5 deletions pkgs/development/python-modules/graph-tool/2.x.x.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{ stdenv, fetchurl, python, cairomm, sparsehash, pycairo, autoreconfHook,
pkgconfig, boost, expat, scipy, numpy, cgal, gmp, mpfr, lndir,
gobjectIntrospection, pygobject3, gtk3, matplotlib }:
gobjectIntrospection, pygobject3, gtk3, matplotlib, ncurses,
buildPythonPackage }:

stdenv.mkDerivation rec {
version = "2.16";
buildPythonPackage rec {
format = "other";
version = "2.26";
name = "${python.libPrefix}-graph-tool-${version}";

meta = with stdenv.lib; {
Expand All @@ -16,16 +18,19 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2";
sha256 = "03b1pmh2gvsgyq491gvskx8fwgqy9k942faymdnhwpbbbfhx911p";
sha256 = "0w7pd2h8ayr88kjl82c8fdshnk6f3xslc77gy7ma09zkbvf76qnz";
};

configureFlags = [
"--with-python-module-path=$(out)/${python.sitePackages}"
"--with-boost-libdir=${boost}/lib"
"--with-expat=${expat}"
"--with-cgal=${cgal}"
"--enable-openmp"
];

nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ];
buildInputs = [ ncurses ];

propagatedBuildInputs = [
boost
Expand Down
17 changes: 17 additions & 0 deletions pkgs/development/python-modules/pyechonest/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k }:

buildPythonPackage rec {
pname = "pyechonest";
version = "8.0.2";
disabled = isPy3k;

src = fetchPypi {
inherit pname version;
sha256 = "496265f4b7d33483ec153b9e1b8333fe959b115f7e781510089c8313b7d86560";
};

meta = with stdenv.lib; {
description = "Tap into The Echo Nest's Musical Brain for the best music search, information, recommendations and remix tools on the web";
homepage = https://github.com/echonest/pyechonest;
};
}
30 changes: 21 additions & 9 deletions pkgs/development/python-modules/pygame_sdl2/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
{ stdenv, pkgs, buildPythonPackage, fetchFromGitHub, isPy27
{ stdenv, pkgs, buildPythonPackage, fetchurl, isPy27, fetchpatch
, cython, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }:

buildPythonPackage rec {
pname = "pygame_sdl2";
version = "6.99.10.1227";
name = "${pname}-${version}";

src = fetchFromGitHub {
owner = "renpy";
repo = "${pname}";
rev = "renpy-${version}";
sha256 = "10n6janvqh5adn7pcijqwqfh234sybjz788kb8ac6b4l11hy2lx1";
version = "2.1.0";
renpy_version = "6.99.14";
name = "${pname}-${version}-${renpy_version}";

src = fetchurl {
url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}-for-renpy-${renpy_version}.tar.gz";
sha256 = "1zsnb2bivbwysgxmfg9iv12arhpf3gqkmqinhciz955hlqv016b9";
};

# force rebuild of headers needed for install
prePatch = ''
rm -rf gen gen3
'';

patches = [
# fix for recent sdl2
(fetchpatch {
url = "https://github.com/apoleon/pygame_sdl2/commit/ced6051f4a4559a725804cc58c079e1efea0a573.patch";
sha256 = "08rqjzvdlmmdf8kyd8ws5lzjy1mrwnds4fdy38inkyw7saydcxyr";
})
];

buildInputs = [
SDL2 SDL2_image SDL2_ttf SDL2_mixer
cython libjpeg libpng
Expand Down
15 changes: 10 additions & 5 deletions pkgs/games/commandergenius/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
{ lib, stdenv, fetchFromGitHub, SDL2, SDL2_image, pkgconfig
, libvorbis, libGL, boost, cmake }:

, libvorbis, libGL, boost, cmake, zlib, curl, SDL2_mixer, python3
}:

stdenv.mkDerivation rec {
name = "commandergenius-${version}";
version = "1822release";
version = "2.2.0";

src = fetchFromGitHub {
owner = "gerstrong";
repo = "Commander-Genius";
rev = "v${version}";
sha256 = "07vxg8p1dnnkajzs5nifxpwn4mdd1hxsw05jl25gvaimpl9p2qc8";
sha256 = "1hjx4j325vj1ayxi3j2dpplpd3x0iqx98gyb093ld7dfnsyilbph";
};

buildInputs = [ SDL2 SDL2_image libGL boost libvorbis ];
buildInputs = [ SDL2 SDL2_image SDL2_mixer libGL boost libvorbis zlib curl python3 ];

preConfigure = ''
export cmakeFlags="$cmakeFlags -DCMAKE_INSTALL_PREFIX=$out -DSHAREDIR=$out/share"
export makeFlags="$makeFlags DESTDIR=$(out)"
'';

nativeBuildInputs = [ cmake pkgconfig ];

Expand Down
18 changes: 2 additions & 16 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1640,19 +1640,7 @@ in {

py4j = callPackage ../development/python-modules/py4j { };

pyechonest = self.buildPythonPackage rec {
name = "pyechonest-8.0.2";

src = pkgs.fetchurl {
url = "mirror://pypi/p/pyechonest/pyechonest-8.0.2.tar.gz";
sha256 = "496265f4b7d33483ec153b9e1b8333fe959b115f7e781510089c8313b7d86560";
};

meta = {
description = "Tap into The Echo Nest's Musical Brain for the best music search, information, recommendations and remix tools on the web";
homepage = https://github.com/echonest/pyechonest;
};
};
pyechonest = callPackage ../development/python-modules/pyechonest { };

billiard = buildPythonPackage rec {
name = "billiard-${version}";
Expand Down Expand Up @@ -7462,9 +7450,7 @@ in {
};
};

# py3k disabled, see https://travis-ci.org/NixOS/nixpkgs/builds/48759067
graph-tool = if isPy3k then throw "graph-tool in Nix doesn't support py3k yet"
else callPackage ../development/python-modules/graph-tool/2.x.x.nix { boost = pkgs.boost159; };
graph-tool = callPackage ../development/python-modules/graph-tool/2.x.x.nix { };

grappelli_safe = buildPythonPackage rec {
version = "0.3.13";
Expand Down