Commit Graph

11 Commits

Author SHA1 Message Date
cloudhead a4989b7ce7
Remove `radicle-httpd` crate
The HTTP daemon is moved to the `radicle-explorer` repository. Hence,
all traces of it are removed from this repository.
2024-06-06 11:14:00 +02:00
Lorenz Leutgeb b2992814b6
nix: Polish `flake.nix`
* Remove empty `inherit`s

  These were not doing anything.

      { inherit (f) x; }

  is equivalent to

      { x = f.x; }

  but

      { inherit (f); }

  is equivalent to

      {}

  since there is no attribute name given.

* Refactor `srcFilters` to use `any`

  That's more lighweight and easier to extend.

* Use `installShellFiles` for `buildManPages`
* Produce a more stable version
* Move package `radicle` next to the others

  It's nothing special!

* Refactor Flake

  More code reuse, and a little more direct, basically.

* Set environment variable on derivation
* Compress even more by removing special crate
* Use `with pkgs` before lists of packages
* Use system-independent `lib`
* Clean up
* Update `flake.lock`
* Enable checks `audit`, `deny`
2024-05-17 12:19:30 +02:00
cloudhead cf8f262cb2
man: Add `rad-id.1` man page 2024-03-17 21:14:58 +01:00
Timm Behner 00102beb29
nix: Fix linker error on macos 14.3 with nix build
Using nix build resulted in a linker error

ld: framework not found Security

Following the proposed solution in
https://discourse.nixos.org/t/compile-a-rust-binary-on-macos-dbcrossbar/8612
resolves the issue.
2024-03-08 23:40:09 +01:00
Michael Raitza 4b1ca18d0c
nix: Compile commit hash into program version
Changes build.rs to take the GIT_HEAD environment variable into account
if `git rev-parse` is unable to determine the current commit hash.
2024-03-08 23:37:34 +01:00
Michael Raitza fb13e5f970
nix: Install man pages when building from flake 2024-03-08 23:35:45 +01:00
Fintan Halpenny 64fd41961e
nix: add radicle-full
To allow Nix users to install radicle with all tools and helpers.
2024-03-08 23:19:15 +01:00
Fintan Halpenny e1affc2da6
nix: use rust-overlay for toolchain pinning
To ensure the Nix derivations are using the correct toolchain, defined
in the `rust-toolchain` file, use the `rust-overlay` library.

Also remove the `fenix` input, since this was actually never used and
was an artefact of some copy-paste shenanigans.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-08 23:19:15 +01:00
Fintan Halpenny 150130e99b
nix: add sqlite in devShell
Since sqlite is used for the databases, including the sqlite3 binary
in the devShell is useful for debugging purposes.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-01-02 15:23:08 +01:00
Fintan Halpenny 4afe235a3c
nix: simplify devShell and envrc
There is no need for the ';' in the `.envrc` file.

Do not run checks in devShell so that it's possible to enter the shell
while code is being edited and is not compiling. Also include
`cargo-nextest` so that one can test in the shell.

Signed-off-by: Fintan Halpenny <Fintan Halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-12-14 10:52:04 +01:00
Fintan Halpenny 9f544ef8c1
nix: switch to use nix flakes
Nix Flakes[[0]] are a more modular way of expressing nix derivations.

The `flake.nix` file describes:
- How to build the project, or components of a projet, via `nix build`
- What "checks" can run for a project, which can be executed via
  `nix flake check`
- What binaries can be run, e.g. `nix run .#rad` to execute the CLI

This approach is preferable since a lot of the Nix ecosystem is using
Flakes -- despite it still being marked as experimental.

One interesting benefit, that needs confirming, is that a check can be
run from a remote Git source. So if someone creates a patch on
Radicle, someone else with the `nix` binary can execute:

         nix flake check git+https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5?refs=patches/<patch id>

This means that anyone with `nix` can check patches without having to
fetch the patch itself.

Another obvious benefit will be that it allows the Radicle binaries to
enter the Nix ecosystem.

The big caveat to both of the above is that, currently, the tests are
failing while running `nix flake check`. They are currently disabled
with `doCheck = false`. They are potentially failing due to some
strange sandboxing issues which are being looked into.

[0]: https://nixos.wiki/wiki/Flakes

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-12-13 12:25:12 +01:00