# NimPak License Examples (KDL Format)

**Note:** KDL is the preferred format for all NimPak metadata and configuration files.

## Example 1: Core Tooling (nexus, nip)

This file declares that the project is available under the dual-license scheme. A user can choose either EUPL-1.2 or ACUL.

```kdl
// license.kdl for a core NexusOS tool
license {
  // The SPDX identifier for a dual-license choice
  expression "EUPL-1.2 OR ACUL-1.0"

  // Details for the commercial option
  commercial_option {
    type "ACUL"
    version "1.0"
    holder "Maiwald Systems / NexusOS Project"
    website "https://nexus.foundation/membership"
    license_file "LICENSE-ACUL.txt"
  }

  // Details for the open-source option
  opensource_option {
    type "EUPL-1.2"
    license_file "LICENSE-EUPL-1.2.txt"
  }
}
```

## Example 2: NimPak Artifact (Fragment, Build Log, etc.)

This file declares that a Fragment or other ecosystem artifact is dedicated to the public domain under CC0, maximizing freedom and removing all friction for sharing and reuse.

```kdl
// license.kdl for a NimPak Fragment
license {
  // The SPDX identifier for Creative Commons Zero (Public Domain Dedication)
  expression "CC0-1.0"
  holder "The NexusOS Community & Contributors"
  statement "This work is dedicated to the public domain. You can copy, modify, and distribute it, even for commercial purposes, all without asking permission."
}
```

## Example 3: System-Level Compliance Manifest

This example shows a complete system compliance manifest with ACUL verification.

```kdl
// license.kdl for system-level compliance
license {
  type "ACUL"
  version "1.0"
  foundation_membership "Gold"
  attribution "© 2025 Maiwald Systems / NexusOS Project"

  reproducibility {
    npk_logs true
    reproducible_build true
  }

  scope "system"
  system_id "nexusos-secure-edition-202507"
  manifest_hash "blake2b-abcdef1234567890..."
  verification_url "https://verify.nexusos.nexus/systems/abcdef1234567890"
}
```

## Example 4: NexusCell Compliance Manifest

This example shows a NexusCell-level compliance manifest for isolated user environments.

```kdl
// license.kdl for NexusCell compliance
license {
  type "ACUL"
  version "1.0"
  foundation_membership "Gold"
  attribution "© 2025 Maiwald Systems / NexusOS Project"

  scope "cell"
  cell_name "Developer Tools Cell"
  owner "user123"
  manifest_hash "blake2b-0987654321fedcba..."
  verification_url "https://verify.nexusos.nexus/cells/0987654321fedcba"
}
```

## Example 5: Package Fragment with License Information

This example shows how license information is embedded in a package fragment definition.

```kdl
// htop.fragment.kdl
package "htop" {
  version "3.2.1"
  stream "stable"

  source {
    method "http"
    url "https://github.com/htop-dev/htop/archive/3.2.1.tar.gz"
    hash "blake2b-a1b2c3d4e5f6..."
    timestamp "2025-07-15T10:30:00Z"
  }

  license {
    expression "GPL-2.0-or-later"
    upstream_license "GPL-2.0-or-later"
    license_file "COPYING"
  }

  acul {
    required false
    attribution "htop developers"
    source_available true
  }

  runtime {
    libc "musl"
    allocator "jemalloc"
    reproducible true
    tags "cli" "monitoring"
  }

  dependencies {
    ncurses "6.3"
    procfs-ng "4.0.2"
  }

  build {
    system "autotools"
    configure_flags "--enable-unicode"
  }
}
```
