diff --git a/pkgs/applications/virtualization/podman/conmon.nix b/pkgs/applications/virtualization/podman/conmon.nix index 0d29bf33a562..42907bc84ba8 100644 --- a/pkgs/applications/virtualization/podman/conmon.nix +++ b/pkgs/applications/virtualization/podman/conmon.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ]; installPhase = '' - install -D -m 755 bin/conmon $out/bin/conmon + install -D -m 555 bin/conmon $out/bin/conmon ''; meta = { diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix new file mode 100644 index 000000000000..b4c160bc8961 --- /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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5845034781a9..13dfa2d3c540 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4966,7 +4966,9 @@ in podiff = callPackage ../tools/text/podiff { }; + podman = callPackage ../applications/virtualization/podman { }; conmon = callPackage ../applications/virtualization/podman/conmon.nix { }; + pod2mdoc = callPackage ../tools/misc/pod2mdoc { }; poedit = callPackage ../tools/text/poedit { };