nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 fetchpatch2,
6 libz,
7 zstd,
8 pkg-config,
9 openssl,
10 glib,
11 ostree-full,
12 versionCheckHook,
13}:
14
15rustPlatform.buildRustPackage rec {
16 pname = "bootc";
17 version = "1.6.0";
18
19 cargoHash = "sha256-KGwXQ6+/w3uHuPqSADsqJSip+SMdC104dfW7tNxGwnc=";
20 doInstallCheck = true;
21
22 src = fetchFromGitHub {
23 owner = "bootc-dev";
24 repo = "bootc";
25 rev = "v${version}";
26 hash = "sha256-TztsiC+DwD9yEAmjTuiuOi+Kf8WEYMsOVVnMKpSM3/g=";
27 };
28
29 patches = [
30 (fetchpatch2 {
31 url = "https://github.com/bootc-dev/bootc/commit/ff8b1b411270275c49ee512d54b27ed7a2fca112.patch";
32 hash = "sha256-7UKquq6ZargQUDGZk22X9Co92v8e995bL+tuAjvh/7c=";
33 })
34 ];
35
36 nativeBuildInputs = [ pkg-config ];
37
38 buildInputs = [
39 libz
40 zstd
41 openssl
42 glib
43 ostree-full
44 ];
45
46 checkFlags = [
47 # These all require a writable /var/tmp
48 "--skip=test_cli_fns"
49 "--skip=test_diff"
50 "--skip=test_tar_export_reproducible"
51 "--skip=test_tar_export_structure"
52 "--skip=test_tar_import_empty"
53 "--skip=test_tar_import_export"
54 "--skip=test_tar_import_signed"
55 "--skip=test_tar_write"
56 "--skip=test_tar_write_tar_layer"
57 ];
58
59 cargoBuildFlags = [ "-p bootc" ];
60
61 nativeInstallCheckInputs = [
62 versionCheckHook
63 ];
64
65 meta = {
66 description = "Boot and upgrade via container images";
67 homepage = "https://bootc-dev.github.io/bootc";
68 license = lib.licenses.mit;
69 mainProgram = "bootc";
70 maintainers = with lib.maintainers; [ thesola10 ];
71 platforms = lib.platforms.linux;
72 };
73}