Skip to content

Commit

Permalink
chore: drop some references to upstream
Browse files Browse the repository at this point in the history
Helps NixOS#10
  • Loading branch information
mkenigs committed Mar 27, 2024
1 parent 9bb0a64 commit 6b43301
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 281 deletions.
133 changes: 0 additions & 133 deletions CODE_OF_CONDUCT.md

This file was deleted.

124 changes: 15 additions & 109 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,15 @@
# Contributing to `nix-installer`
# Contributing to `experimental-nix-installer`

We're excited to see what you'd like to contribute to `nix-installer`!
Most contributions should be made upstream; see the
[upstream contributing guide](https://github.com/DeterminateSystems/nix-installer/blob/main/CONTRIBUTING.md)
for guidelines.

Regardless of what (or how much) you contribute to `nix-installer`, we value your time
and energy trying to improve the tool.
In general, bugs should also be opened in the
[upstream issue tracker](https://github.com/DeterminateSystems/nix-installer/issues).

In order to ensure we all have a good experience, please review this document
if you have any questions about the process.

**Regular Rust committer?** Contributing to `nix-installer` should feel similar to
contributing to other serious Rust ecosystem projects. You may already know
the process and expectations of you, this document shouldn't contain any
surprises.


# What kinds of contributions are needed?

`nix-installer` can benefit from all kinds of contributions:

* Bug reports
* Code improvements
* Registry additions
* Dependency updates or dependency feature trimming
* New features (Please create an issue first!)
* Documentation
* Graphical/visual asset improvement
* Kind words or recommendation on your own site, repo, stream, or social media
account
* Onboarding others to using `nix-installer`


# What are the expectations you can have of the maintainers?

You can expect us to:

* Follow the [Contributor Covenant](CODE_OF_CONDUCT.md), just like you
* Help diagnose bug reports (for supported platforms using supported
languages)
* Give constructive feedback on pull requests
* Merge pull requests which:
+ Have been approved of by at least 1 maintainer
+ Pass all tests
+ Have no complex conflicts with in-flight high priority work

The maintainers of this project use a separate issue tracker for some internal
tasks. Unfortunately, the contents of this tracker is not publicly visible as
it may contain sensitive or confidential data. Our maintainers will endeavor to
ensure you are not 'left out' of the discussion about your contributions.


# What kind of expectations do the maintainers have from you?

We expect you to:

* Follow the [Contributor Covenant](CODE_OF_CONDUCT.md), just like them
* Make an earnest attempt to follow the contribution process described in this
document
* Update bug reports with a solution, if you find one before we do
* Do your best to follow existing conventions
* Reflect maintainer feedback if you are able
* Declare if you need to abandon a PR so someone else can shepherd it


# How exactly does the contribution process work?

Here are how to do various kinds of contributions.


## Bug Reports

Create an issue on [the issue page](https://github.com/DeterminateSystems/nix-installer/issues).

It should contain:

1. Your OS (Linux, Mac) and architecture (x86_64, aarch64)
2. Your `nix-installer` version (`/nix/nix-installer --version`)
3. The thing you tried to run (eg `nix-installer`)
4. What happened (the output of the command, please)
5. What you expected to happen
6. If you tried to fix it, what did you try?


## Code/Documentation improvement

For **minor** fixes, documentation, or changes which **do not** have a
tangible impact on user experience, feel free to open a
[pull request](https://github.com/DeterminateSystems/nix-installer/pulls) directly.

If the code improvement is not minor, such as new features or user facing
changes, an [issue](https://github.com/DeterminateSystems/nix-installer/issues)
proposing the change is **required** for non-maintainers.

Please:

* Write civil commit messages, it's ok if they are simple like `fmt`
or `formatting`
* Follow existing conventions and style within the code the best you can
* Describe in your PR the problem and solution so reviewers don't need to
rebuild much context
* Run `nix flake check` and `nix build`


## Non-code contributions

Please open an [issue](https://github.com/DeterminateSystems/nix-installer/issues)
to chat about your contribution and figure out how to best integrate it into
the project.
In some cases the Determinate Systems installer has made decisions that do not
align with decisions of the official Nix installer, and in those cases, a
contribution to this repo is appropriate.

# Development

Expand All @@ -130,7 +34,7 @@ If using an editor, it may be preferable to adopt an addon to enter the environm

## Testing Installs

If you're hacking on `nix-installer`, you likely already have Nix and cannot test locally.
If you're hacking on `experimental-nix-installer`, you likely already have Nix and cannot test locally.

> That's probably a good thing! You should test in a sandbox.
Expand Down Expand Up @@ -204,7 +108,7 @@ nix build .#hydraJobs.vm-test.rhel-v7.x86_64-linux.all -L -j 4
For PR review, you can also test arbitrary branches or checkouts like so:

```bash
nix build github:determinatesystems/nix-installer/${BRANCH}#hydraJobs.vm-test.ubuntu-v22_04.x86_64-linux.install-default -L
nix build github:NixOS/experimental-nix-installer/${BRANCH}#hydraJobs.vm-test.ubuntu-v22_04.x86_64-linux.install-default -L
```

<details>
Expand Down Expand Up @@ -294,7 +198,7 @@ nix build .#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.docker -L
For PR review, you can also test arbitrary branches or checkouts like so:

```bash
nix build github:determinatesystems/nix-installer/${BRANCH}#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.podman -L
nix build github:NixOS/experimental-nix-installer/${BRANCH}#hydraJobs.container-test.ubuntu-v22_04.x86_64-linux.podman -L
```

<details>
Expand Down Expand Up @@ -392,7 +296,9 @@ To cut a release:

# Who maintains `nix-installer` and why?

`nix-installer` is maintained by [Determinate Systems](https://determinate.systems/) in
This fork is maintained by the community.

The upstream `nix-installer` is maintained by [Determinate Systems](https://determinate.systems/) in
an effort to explore Nix installer ideas.

Determinate Systems has no plans to monetize or relicense `nix-installer`. If your
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ version = "0.14.0"
edition = "2021"
resolver = "2"
license = "LGPL-2.1"
repository = "https://github.com/NixOS/experimental-nix-installer/issues/9"
documentation = "https://docs.rs/nix-installer/latest/nix_installer"
repository = "https://github.com/NixOS/experimental-nix-installer"

[package.metadata.riff.targets.aarch64-apple-darwin]
build-inputs = ["darwin.apple_sdk.frameworks.Security"]
Expand Down
40 changes: 6 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ Build a portable Linux binary on a system with Nix:
# to build a local copy
nix build -L ".#nix-installer-static"
# to build the remote main development branch
nix build -L "github:determinatesystems/nix-installer#nix-installer-static"
nix build -L "github:NixOS/experimental-nix-installer#nix-installer-static"
# for a specific version of the installer:
export NIX_INSTALLER_TAG="v0.6.0"
nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer-static"
nix build -L "github:NixOS/experimental-nix-installer/$NIX_INSTALLER_TAG#nix-installer-static"
```
On Mac:
Expand All @@ -332,10 +332,10 @@ On Mac:
# to build a local copy
nix build -L ".#nix-installer"
# to build the remote main development branch
nix build -L "github:determinatesystems/nix-installer#nix-installer"
nix build -L "github:NixOS/experimental-nix-installer#nix-installer"
# for a specific version of the installer:
export NIX_INSTALLER_TAG="v0.6.0"
nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer"
nix build -L "github:NixOS/experimental-nix-installer/$NIX_INSTALLER_TAG#nix-installer"
```
Then copy the `result/bin/nix-installer` to the machine you wish to run it on.
Expand Down Expand Up @@ -390,7 +390,7 @@ cargo doc --open -p nix-installer
Documentation is also available via `nix` build:
```bash
nix build github:DeterminateSystems/nix-installer#nix-installer.doc
nix build github:NixOS/experimental-nix-installer#nix-installer.doc
firefox result-doc/nix-installer/index.html
```
Expand Down Expand Up @@ -446,32 +446,4 @@ It has been wonderful to collaborate with other participants in the Nix Installe
## Diagnostics
The goal of the Determinate Nix Installer is to successfully and correctly install Nix.
The `curl | sh` pipeline and the installer collects a little bit of diagnostic information to help us make that true.
Here is a table of the [diagnostic data we collect][diagnosticdata]:
| Field | Use |
| --------------------- | ----------------------------------------------------------------------------------------------------- |
| `version` | The version of the Determinate Nix Installer. |
| `planner` | The method of installing Nix (`linux`, `macos`, `steam-deck`) |
| `configured_settings` | The names of planner settings which were changed from their default. Does _not_ include the values. |
| `os_name` | The running operating system. |
| `os_version` | The version of the operating system. |
| `triple` | The architecture/operating system/binary format of your system. |
| `is_ci` | Whether the installer is being used in CI (e.g. GitHub Actions). |
| `action` | Either `Install` or `Uninstall`. |
| `status` | One of `Success`, `Failure`, `Pending`, or `Cancelled`. |
| `attribution` | Optionally defined by the user, associate the diagnostics of this run to the provided value. |
| `failure_chain` | A high level description of what the failure was, if any. For example: `Command("diskutil")` if the command `diskutil list` failed. |
To disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=""` or setting `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT=""`.
You can read the full privacy policy for [Determinate Systems][detsys], the creators of the Determinate Nix Installer, [here][privacy].
[detsys]: https://determinate.systems/
[diagnosticdata]: https://github.com/DeterminateSystems/nix-installer/blob/f9f927840d532b71f41670382a30cfcbea2d8a35/src/diagnostics.rs#L29-L43
[privacy]: https://determinate.systems/privacy
[systemd]: https://systemd.io
[wslg]: https://github.com/microsoft/wslg
[nixgl]: https://github.com/guibou/nixGL
By default, this fork of the Determinate Nix Installer does not compile support for diagnostics.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "The Determinate Nix Installer";
description = "Experimental Nix Installer";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/5e4c2ada4fcd54b99d56d7bd62f384511a7e2593";
Expand Down
2 changes: 1 addition & 1 deletion src/action/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ pub enum ActionErrorKind {
MissingRemoveUserFromGroupCommand,
#[error("\
Could not detect systemd; you may be able to get up and running without systemd with `nix-installer install linux --init none`.\n\
See https://github.com/DeterminateSystems/nix-installer#without-systemd-linux-only for documentation on usage and drawbacks.\
See https://github.com/NixOS/experimental-nix-installer#without-systemd-linux-only for documentation on usage and drawbacks.\
")]
SystemdMissing,
#[error("`{command}` failed, message: {message}")]
Expand Down
2 changes: 1 addition & 1 deletion src/cli/subcommand/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use owo_colors::OwoColorize;
const EXISTING_INCOMPATIBLE_PLAN_GUIDANCE: &str = "\
If you are trying to upgrade Nix, try running `sudo -i nix upgrade-nix` instead.\n\
If you are trying to install Nix over an existing install (from an incompatible `nix-installer` install), try running `/nix/nix-installer uninstall` then try to install again.\n\
If you are using `nix-installer` in an automated curing process and seeing this message, consider pinning the version you use via https://github.com/DeterminateSystems/nix-installer#accessing-other-versions.\
If you are using `nix-installer` in an automated curing process and seeing this message, consider pinning the version you use via https://github.com/NixOS/experimental-nix-installer#accessing-other-versions.\
";

/**
Expand Down

0 comments on commit 6b43301

Please sign in to comment.