Skip to content

Commit 501a1e3

Browse files
committed
Initial commit.
0 parents  commit 501a1e3

24 files changed

+918
-0
lines changed

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2.1
2+
setup: true
3+
orbs:
4+
orb-tools: circleci/orb-tools@12.2.0
5+
shellcheck: circleci/shellcheck@3.2.0
6+
filters: &filters
7+
tags:
8+
only: /.*/
9+
workflows:
10+
lint-pack:
11+
jobs:
12+
- orb-tools/lint:
13+
filters: *filters
14+
- orb-tools/pack:
15+
filters: *filters
16+
pre-steps:
17+
- run:
18+
name: Write orb version file
19+
command: echo "${CIRCLE_SHA1}" | tee /home/circleci/orb-version
20+
- orb-tools/review:
21+
filters: *filters
22+
- shellcheck/check:
23+
filters: *filters
24+
# Triggers the next workflow in the Orb Development Kit.
25+
- orb-tools/continue:
26+
pipeline_number: << pipeline.number >>
27+
vcs_type: << pipeline.project.type >>
28+
orb_name: <orb-name>
29+
requires: [orb-tools/lint, orb-tools/pack, orb-tools/review, shellcheck/check]
30+
filters: *filters

.circleci/test-deploy.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: 2.1
2+
orbs:
3+
# Your orb will be automatically injected here during the pipeline.
4+
# Reference your orb's jobs and commands below as they will exist when built.
5+
orb-tools: circleci/orb-tools@12.2.0
6+
# The orb definition is intentionally not included here. It will be injected into the pipeline.
7+
<orb-name>: {}
8+
# Use this tag to ensure test jobs always run,
9+
# even though the downstream publish job will only run on release tags.
10+
filters: &filters
11+
tags:
12+
only: /.*/
13+
# Filter for release tags.
14+
release-filters: &release-filters
15+
branches:
16+
ignore: /.*/
17+
tags:
18+
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
19+
jobs:
20+
# Create jobs to test the commands of your orbs.
21+
# You may want to add additional validation steps to ensure the commands are working as expected.
22+
command-test:
23+
docker:
24+
- image: cimg/base:current
25+
steps:
26+
- checkout
27+
# Run your orb's commands to validate them.
28+
- <orb-name>/nix
29+
# Formatting checks. They depend on nix itself, so we have to run formatting checks of
30+
# our own orb while we test the orb itself.
31+
- run:
32+
name: Run formatting
33+
command: treefmt --ci
34+
# Test nix environment
35+
- run:
36+
name: Test nix environment
37+
command: test/test-nix-environment.sh
38+
workflows:
39+
test-deploy:
40+
jobs:
41+
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
42+
# Test your orb's commands in a custom job and test your orb's jobs directly as a part of this workflow.
43+
- command-test:
44+
name: first run
45+
filters: *filters
46+
context: artifactory
47+
- command-test:
48+
name: second run
49+
requires:
50+
- first run
51+
filters: *filters
52+
context: artifactory
53+
# The orb must be re-packed for publishing, and saved to the workspace.
54+
- orb-tools/pack:
55+
filters: *release-filters
56+
pre-steps:
57+
- run:
58+
name: Write orb version file
59+
command: echo "${CIRCLE_SHA1}" | tee /home/circleci/orb-version
60+
- orb-tools/publish:
61+
orb_name: digital-asset/build
62+
vcs_type: << pipeline.project.type >>
63+
pub_type: production
64+
# Ensure this job requires all test jobs and the pack job.
65+
requires:
66+
- orb-tools/pack
67+
- second run
68+
context: circleci-orb-publish
69+
filters: *release-filters

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- bash -*-
2+
# shellcheck shell=bash
3+
4+
watch_dir nix
5+
use flake

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# orb.yml is "packed" from source, and not published directly from the repository.
2+
orb.yml
3+
.DS_Store
4+
.direnv

.treefmt.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
excludes = ["COPYRIGHT", "LICENSE"]
2+
3+
[formatter.mdformat]
4+
command = "mdformat"
5+
excludes = []
6+
includes = ["*.md"]
7+
options = []
8+
9+
[formatter.nixfmt-rfc-style]
10+
command = "nixfmt"
11+
excludes = []
12+
includes = ["*.nix"]
13+
options = []
14+
15+
[formatter.shfmt]
16+
command = "shfmt"
17+
options = ["-i", "2", "-s", "-w"]
18+
includes = ["*.sh"]
19+
20+
[formatter.yamlfmt]
21+
command = "yamlfmt"
22+
excludes = []
23+
includes = ["*.yaml", "*.yml"]
24+
options = []

.yamllint

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: relaxed
2+
3+
rules:
4+
line-length:
5+
max: 200
6+
allow-non-breakable-inline-mappings: true
7+

CODE_OF_CONDUCT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [community@digitalasset.com](mailto:community@digitalasset.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
44+
45+
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
46+
47+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to nix-orb
2+
3+
Welcome! This document provides a high-level overview of how to contribute to the development of nix-orb.
4+
5+
(For information on how to build, test, and work on the codebase, see the [README](./README.md).)
6+
7+
There are many ways you can contribute beyond coding. For example, you can report problems, report and clarify issues, and write documentation. If you're completely new to open source, the [Open Source Guides](https://opensource.guide) is a great place to start.
8+
9+
## Code of conduct
10+
11+
This project and everyone participating in it is governed by the [Daml Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [community@digitalasset.com](mailto:community@digitalasset.com).
12+
13+
## Git conventions
14+
15+
For Git commit messages, our principle is that `git log --pretty=oneline` should give readers a clear idea of what has changed and the detailed descriptions should help them understand the rationale. To achieve this:
16+
17+
- Commits must have a concise, imperative title, prefixed with either `python` or `meta` e.g.:
18+
- *meta: Add legalese (CONTRIBUTING notice, LICENSE, notice).*
19+
- *python: Improve explanation of …*
20+
- *python: Remove module X because it is not used.*
21+
- Commits should have a description that concisely explains the rationale and context for the change if that is not obvious.
22+
- Commit descriptions should include a `Fixes #XX` line indicating what GitHub issue number the commit fixes.
23+
- The git logs are not intended for user-facing change logs, but should be a useful reference when writing them.
24+
25+
## Pull request checklist
26+
27+
- Read this document (contribution guidelines).
28+
- Does your PR include appropriate tests?
29+
- Make sure your PR title and description makes it easy for other developers to understand what the contained commits do.
30+
- If your PR corresponds to an issue, add “Fixes #XX” to your pull request description. This will auto-close the corresponding issue when the commit is merged into master and tie the PR to the issue.
31+
- If your PR includes user-facing changes, you must add a line describing the change to the [release notes](docs/source/support/release-notes.rst) as part of your PR.
32+
33+
## Working with issues
34+
35+
We use issues and [pull requests](https://help.github.com/articles/about-pull-requests/) to collaborate and track our work. Anyone is welcome to open an issue. If you just want to ask a question, please ask away on [Stack Overflow](https://stackoverflow.com/questions/tagged/daml) using the tag `daml`.
36+
37+
We encourage everyone to vote on issues that they support or not:
38+
39+
- 👍 - upvote
40+
- 👎 - downvote
41+
42+
When you start working on an issue, we encourage you to tell others about it in an issue comment. If other contributors know that this issue is already being worked on, they might decide to tackle another issue instead.
43+
44+
When you add `TODO` (nice to have) and `FIXME` (should fix) comments in the code, we encourage you to create a corresponding issue and reference it as follows:
45+
46+
- `TODO(#XX): <description>` where `#XX` corresponds to the GitHub issue.
47+
- `FIXME(#XX): <description>` where `#XX` corresponds to the GitHub issue.
48+
49+
### Labels
50+
51+
We use labels to indicate what component the issue relates to (`component/...`). We use some special labels:
52+
53+
- `broken` to indicate that something in the repo is seriously broken and needs to be fixed.
54+
- `discussion` to indicate the issue is to discuss and decide on something.
55+
- `good-first-issue` to indicate that the issue is suitable for those who want to contribute but don't know where to start.
56+
57+
By default, issues represent "work to be done" -- that might be features, improvements, non-critical bug fixes, and so on.
58+
59+
### Milestones
60+
61+
Issues are grouped into *milestones* that correspond to future planned releases of the library. Issues without a milestone are treated as in need of triaging.
62+
63+
The active milestones arse listed [here](https://github.com/DACH-NY/nix-orb/milestones).
64+
65+
## Discussions
66+
67+
Discussions on this repository should be limited to the nix-orb library.
68+
69+
# Thank you!
70+
71+
Thank you for taking the time to contribute!

COPYRIGHT

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
2+
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)