summary refs log tree commit diff
path: root/pkgs/applications/virtualization/podman/default.nix
diff options
context:
space:
mode:
authorVincent Demeester <vincent@sbr.pm>2018-12-10 13:49:11 +0100
committerVincent Demeester <vincent@sbr.pm>2019-01-21 12:21:11 +0100
commitb5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929 (patch)
treebf234682095d4ae6725229af3f5482f246b12df6 /pkgs/applications/virtualization/podman/default.nix
parent933b8388dab5cbb7dce8e222a2531403c9bae59d (diff)
downloadnixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar.gz
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar.bz2
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar.lz
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar.xz
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.tar.zst
nixpkgs-b5eda4cccc2dccdb0b38e04d9bfdd9f2f80b0929.zip
podman: init at 0.11.1.1
podman is a binary build from libpod : libpod is a library used to
create container pods. podman aims to be *almost* compatible with the
docker cli but doesn't require a docker daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat (limited to 'pkgs/applications/virtualization/podman/default.nix')
-rw-r--r--pkgs/applications/virtualization/podman/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix
new file mode 100644
index 00000000000..b4c160bc896
--- /dev/null
+++ b/pkgs/applications/virtualization/podman/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, lib, fetchFromGitHub, removeReferencesTo, pkgconfig
+, go, gpgme, lvm2, btrfs-progs, libseccomp
+}:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  name = "podman-${version}";
+  version = "0.11.1.1";
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = "libpod";
+    rev = "v${version}";
+    sha256 = "18r7jasaf18cbraf5v2fl96hs47d3ivjq82pivw9knbwafsscg64";
+  };
+  
+  # Optimizations break compilation of libseccomp c bindings
+  hardeningDisable = [ "fortify" ];
+  nativeBuildInputs = [ pkgconfig removeReferencesTo ];
+  
+  buildInputs = [
+    go btrfs-progs libseccomp gpgme lvm2
+  ];
+
+  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 -Dm555 bin/podman $out/bin/podman
+  '';
+  
+  preFixup = ''
+    find $out -type f -exec remove-references-to -t ${go} -t ${stdenv.cc.cc} -t ${stdenv.glibc.dev} '{}' +
+  '';
+
+  meta = {
+    homepage = https://podman.io/;
+    description = "A program for managing pods, containers and container images";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ vdemeester ];
+    platforms = platforms.linux;
+  };
+}