Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: refactor Nix flake files #323

Merged
merged 1 commit into from
Oct 22, 2023
Merged

nix: refactor Nix flake files #323

merged 1 commit into from
Oct 22, 2023

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Oct 22, 2023

No description provided.

@drupol drupol merged commit 1a0dff2 into master Oct 22, 2023
12 checks passed
@drupol drupol deleted the nix/refactor-nix-flake branch October 22, 2023 19:47
williamdemeo added a commit to formalverification/milewski-ctfp-pdf that referenced this pull request Nov 12, 2023
* Fix spacing around multiplication operator (hmemcpy#319)

* Fix prettier check (hmemcpy#321)

* Make spaces after functors consistent (hmemcpy#320)

* nix: refactor Nix flake files (hmemcpy#323)

* Use `\mathit` for multi-letter identifiers (hmemcpy#322)

* Small fixes (hmemcpy#324)

* fix CI problems

Steps taken to address failing the ci prettier check:

1. Install `nodejs` (e.g., by adding `nodejs` to the `environment.systemPackages` section of `/etc/nixos/configuration.nix`).

2. Install `prettier` using the command `npm install --save-dev --save-exact prettier`.

3. Run `npx prettier . --check` and get something like the following output:

   ```
   Checking formatting...
   [warn] package-lock.json
   [warn] package.json
   [warn] README.md
   [warn] Code style issues found in 3 files. Run Prettier to fix.
   ```

   (The `package-lock.json` and `package.json` files are not relevant.  They were added by nodejs; they're not part of our repo.)

4. Run the command `npx prettier README.md --check`. You should get something like  `README.md 21ms`.

Checking `git diff` confirms that the CI prettier check didn't like some of the formatting of `README.md` and running `npx prettier README.md --write` fixed the problem.

* fix ci problem

Steps to fix the `nix fmt` ci failure:

1. In the root directory of the repo, run `nix fmt . -- --check` and get the following output:

   ```
   ./flake.nix
   1 / 1 would have been reformatted
   error: fail on changes
   ```

2. Run `nix fmt` and get the following output:

   ```
    ./flake.nix
    1 / 1 have been reformatted
   ```

Checking `git diff` confirms that the CI `nix fmt` check didn't like some of the formatting of `flake.nix` and running `nix fmt` fixed the problem.

* fix prettier ci problem (again)

Steps to fix ci problem:

1. Run ` nix run nixpkgs#nodePackages.prettier -- --check .` and get output like

   ```
   Checking formatting...
   [warn] package-lock.json
   [warn] package.json
   [warn] README.md
   [warn] Code style issues found in 2 files. Run Prettier to fix.
   ```

2. Run `npx prettier README.md --write` and get output like

   ```
   README.md 33ms
   ```

Checking `git diff` confirms that the CI prettier check didn't like some of the formatting of `README.md` and running `npx prettier README.md --write` fixed the problem.

---------

Co-authored-by: EFanZh <efanzh@gmail.com>
Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant