commit 90d5d7d0473307989958cf08a469b07c1f36223d
parent 2ceb046ee5379e7d1dfd8159842dc300c4953f3b
Author: Vincent Demeester <vincent@sbr.pm>
Date: Sat, 6 Oct 2018 19:18:53 +0200
pkgs: package podman πΌπ€
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
3 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/overlays/sbr.nix b/overlays/sbr.nix
@@ -30,6 +30,9 @@ self: super:
openshift = import ../pkgs/openshift {
inherit (self) stdenv lib fetchFromGitHub removeReferencesTo which go_1_10 go-bindata makeWrapper rsync utillinux coreutils kerberos clang;
};
+ podman = import ../pkgs/podman {
+ inherit (self) stdenv lib fetchFromGitHub removeReferencesTo pkgconfig makeWrapper go libtool gpgme lvm2 btrfs-progs libseccomp gcc;
+ };
scripts = import ../pkgs/scripts {
inherit (self) stdenv;
};
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -24,6 +24,9 @@ in rec {
openshift = import ./openshift {
inherit (pkgs) stdenv lib fetchFromGitHub removeReferencesTo which go_1_10 go-bindata makeWrapper rsync utillinux coreutils kerberos clang;
};
+ podman = import ./podman {
+ inherit (pkgs) stdenv lib fetchFromGitHub removeReferencesTo pkgconfig makeWrapper go libtool gpgme lvm2 btrfs-progs libseccomp gcc;
+ };
kubespy = import ./kubespy {
inherit (pkgs) stdenv lib buildGoPackage fetchgit;
};
diff --git a/pkgs/podman/default.nix b/pkgs/podman/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, removeReferencesTo, pkgconfig
+, go, libtool, gpgme, lvm2
+, btrfs-progs, libseccomp, gcc
+}:
+
+stdenv.mkDerivation rec {
+ name = "podman-${version}";
+ version = "0.9.1";
+ src = fetchFromGitHub {
+ owner = "containers";
+ repo = "libpod";
+ rev = "v${version}";
+ sha256 = "10b8613gcy5xrjr0qmgcfr959jzrp244gagnd1wk0jb1hf294fqm";
+ };
+ # Optimizations break compilation of libseccomp c bindings
+ hardeningDisable = [ "fortify" ];
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [
+ makeWrapper removeReferencesTo go libtool
+ btrfs-progs libseccomp gcc gpgme lvm2
+ ];
+
+ dontStrip = true;
+
+ buildPhase = ''
+ patchShebangs .
+ mkdir -p .gopath/src/github.com/containers
+ ln -sf $PWD .gopath/src/github.com/containers/libpod
+ ln -sf $PWD/vendor/github.com/varlink .gopath/src/github.com/varlink
+ export GOPATH="$PWD/.gopath:$GOPATH"
+ make binaries
+ '';
+
+ installPhase = ''
+ install -Dm755 bin/podman $out/bin/podman
+ '';
+
+ outputs = ["out"];
+
+ preFixup = ''
+ find $out -type f -exec remove-references-to -t ${go} -t ${stdenv.cc.cc} '{}' +
+ find $out -type f -exec remove-references-to -t ${stdenv.glibc.dev} '{}' +
+ '';
+
+}