2022-10-21 18:38:19 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, git, Virtualization, testers, linuxkit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "linuxkit";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxkit";
|
|
|
|
repo = "linuxkit";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-8x9oJaYb/mN2TUaVrGOYi5/6TETD78jif0SwCSc0kyo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
modRoot = "./src/cmd/linuxkit";
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Virtualization ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ git ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = linuxkit;
|
|
|
|
command = "linuxkit version";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A toolkit for building secure, portable and lean operating systems for containers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/linuxkit/linuxkit";
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ nicknovitski ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|