@@ -1,7 +1,7 @@
1−{ stdenv, fetchFromGitHub, which, buildGoPackage }:
1+{ stdenv, fetchFromGitHub, which, buildGoPackage, utillinux, coreutils }:
22
33let
4− version = "1.5.0";
4+ version = "3.6.0";
55 ver = stdenv.lib.elemAt (stdenv.lib.splitString "." version);
66 versionMajor = ver 0;
77 versionMinor = ver 1;
@@ -14,7 +14,7 @@ in buildGoPackage rec {
1414 owner = "openshift";
1515 repo = "origin";
1616 rev = "v${version}";
17− sha256 = "0qvyxcyca3888nkgvyvqcmybm95ncwxb3zvrzbg2gz8kx6g6350v";
17+ sha256 = "08bdqvsjl6c7dmllyz8n4akb7gyn91znvbph5cgmmk1bhskycy1r";
1818 };
1919
2020 buildInputs = [ which ];
@@ -22,13 +22,24 @@ in buildGoPackage rec {
2222 goPackagePath = null;
2323 patchPhase = ''
2424 patchShebangs ./hack
25+ substituteInPlace pkg/bootstrap/docker/host/host.go \
26+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \
27+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt'
28+
29+ substituteInPlace pkg/bootstrap/docker/host/host.go \
30+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mount' \
31+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'
32+
33+ substituteInPlace pkg/bootstrap/docker/host/host.go \
34+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \
35+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'
2536 '';
2637
2738 buildPhase = ''
2839 cd go/src/origin-v${version}-src
2940 # Openshift build require this variables to be set
3041 # unless there is a .git folder which is not the case with fetchFromGitHub
31− export OS_GIT_VERSION=${version}
42+ export OS_GIT_VERSION=v${version}
3243 export OS_GIT_MAJOR=${versionMajor}
3344 export OS_GIT_MINOR=${versionMinor}
3445 make build
@@ -43,7 +54,7 @@ in buildGoPackage rec {
4354 description = "Build, deploy, and manage your applications with Docker and Kubernetes";
4455 license = licenses.asl20;
4556 homepage = http://www.openshift.org;
46− maintainers = with maintainers; [offline bachp];
57+ maintainers = with maintainers; [offline bachp moretea];
4758 platforms = platforms.linux;
4859 };
4960}