mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 10:56:53 +00:00
b5eda4cccc
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>
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ 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;
|
|
};
|
|
}
|