nixpkgs/pkgs/development/tools/misc/linuxkit/default.nix

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

43 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, buildGoModule, fetchFromGitHub, git, Cocoa, Virtualization, testers, linuxkit }:
2017-07-08 14:20:23 +00:00
2022-10-12 08:46:44 +00:00
buildGoModule rec {
pname = "linuxkit";
2022-11-08 00:53:33 +00:00
version = "1.0.1";
2017-07-08 14:20:23 +00:00
src = fetchFromGitHub {
owner = "linuxkit";
repo = "linuxkit";
2019-07-24 22:19:01 +00:00
rev = "v${version}";
2022-11-08 00:53:33 +00:00
sha256 = "sha256-8x9oJaYb/mN2TUaVrGOYi5/6TETD78jif0SwCSc0kyo=";
2017-07-08 14:20:23 +00:00
};
2022-10-12 08:46:44 +00:00
vendorSha256 = null;
modRoot = "./src/cmd/linuxkit";
patches = [ ./darwin-os-version.patch ./support-apple-11-sdk.patch ];
buildInputs = lib.optionals stdenv.isDarwin [ Cocoa Virtualization ];
2017-07-08 14:20:23 +00:00
2022-10-12 08:46:44 +00:00
ldflags = [
"-s"
"-w"
"-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=${version}"
];
nativeCheckInputs = [ git ];
2022-10-12 08:46:44 +00:00
passthru.tests.version = testers.testVersion {
package = linuxkit;
command = "linuxkit version";
};
2017-07-08 14:20:23 +00:00
2019-07-24 22:19:01 +00:00
meta = with lib; {
2017-07-08 14:20:23 +00:00
description = "A toolkit for building secure, portable and lean operating systems for containers";
2019-07-24 22:19:01 +00:00
license = licenses.asl20;
homepage = "https://github.com/linuxkit/linuxkit";
2022-10-12 08:46:44 +00:00
maintainers = with maintainers; [ nicknovitski ];
2019-07-24 22:19:01 +00:00
platforms = platforms.unix;
2017-07-08 14:20:23 +00:00
};
}