nixpkgs/pkgs/applications/virtualization/runc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

2020-04-12 12:08:47 +00:00
{ lib
, fetchFromGitHub
2021-06-16 22:52:14 +00:00
, buildGoModule
2020-04-12 12:08:47 +00:00
, go-md2man
, installShellFiles
, pkg-config
, which
, libapparmor
, libseccomp
2020-05-13 11:37:48 +00:00
, libselinux
, makeWrapper
2020-05-19 00:41:00 +00:00
, nixosTests
2020-04-12 12:08:47 +00:00
}:
2016-05-21 16:18:24 +00:00
2021-06-16 22:52:14 +00:00
buildGoModule rec {
pname = "runc";
version = "1.1.10";
2016-05-21 16:18:24 +00:00
src = fetchFromGitHub {
owner = "opencontainers";
repo = "runc";
2017-01-11 08:32:26 +00:00
rev = "v${version}";
hash = "sha256-YoRwr5imolblix1st/YeVTrAUdQXTqrx1BdNMdYlt/0=";
2016-05-21 16:18:24 +00:00
};
vendorHash = null;
outputs = [ "out" "man" ];
2016-05-21 16:18:24 +00:00
nativeBuildInputs = [ go-md2man installShellFiles makeWrapper pkg-config which ];
2016-05-21 16:18:24 +00:00
buildInputs = [ libselinux libseccomp libapparmor ];
2020-05-13 11:37:48 +00:00
makeFlags = [ "BUILDTAGS+=seccomp" ];
2016-05-21 16:18:24 +00:00
buildPhase = ''
2021-03-31 06:52:07 +00:00
runHook preBuild
2016-05-21 16:18:24 +00:00
patchShebangs .
2020-04-12 12:08:47 +00:00
make ${toString makeFlags} runc man
2021-03-31 06:52:07 +00:00
runHook postBuild
2016-05-21 16:18:24 +00:00
'';
installPhase = ''
2021-03-31 06:52:07 +00:00
runHook preInstall
install -Dm755 runc $out/bin/runc
2020-05-10 01:24:04 +00:00
installManPage man/*/*.[1-9]
wrapProgram $out/bin/runc \
--prefix PATH : /run/current-system/systemd/bin
2021-03-31 06:52:07 +00:00
runHook postInstall
2016-05-21 16:18:24 +00:00
'';
2020-11-22 00:59:08 +00:00
passthru.tests = { inherit (nixosTests) cri-o docker podman; };
2020-05-19 00:41:00 +00:00
2020-04-12 12:08:47 +00:00
meta = with lib; {
homepage = "https://github.com/opencontainers/runc";
2016-05-21 16:18:24 +00:00
description = "A CLI tool for spawning and running containers according to the OCI specification";
license = licenses.asl20;
2020-04-03 10:11:26 +00:00
maintainers = with maintainers; [ offline ] ++ teams.podman.members;
2016-05-21 16:18:24 +00:00
platforms = platforms.linux;
};
}