Rename project to FeDIY and update related configurations and documentation

This commit is contained in:
2026-05-23 09:53:29 -05:00
parent d61a91aac8
commit 6a825d1e83
6 changed files with 30 additions and 29 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
[package] [package]
name = "sample-rust-app" name = "fediy"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
+7 -7
View File
@@ -1,6 +1,6 @@
# Rust Nix Flake Template # FeDIY
This template provides a reproducible Rust development environment using Nix flakes and the fenix toolchain. FeDIY provides a reproducible Rust development environment using Nix flakes and the fenix toolchain.
## Quick Start ## Quick Start
@@ -44,7 +44,7 @@ The devShell automatically installs common embedded Rust targets via `rustup`:
## Flatpak Packaging ## Flatpak Packaging
This template supports building Flatpak packages for your Rust application. This project supports building Flatpak packages for the FeDIY application.
### Build Flatpak Package ### Build Flatpak Package
@@ -66,8 +66,8 @@ Edit `flatpak/app.flatpak.json` to update app ID, runtime, build commands, or so
You can install and run the built Flatpak locally: You can install and run the built Flatpak locally:
```bash ```bash
flatpak install --user build-flatpak/org.example.rustdevshell.flatpak flatpak install --user build-flatpak/com.moturpin.fediy.flatpak
flatpak run org.example.rustdevshell flatpak run com.moturpin.fediy
``` ```
## Included Tools ## Included Tools
@@ -153,10 +153,10 @@ See project.toml for example metadata.
## Packaging for nixpkgs ## Packaging for nixpkgs
This template is structured for easy packaging in nixpkgs: This project is structured for packaging in nixpkgs:
- All sources in `src/` - All sources in `src/`
- `flake.nix` provides a devShell and template - `flake.nix` provides a devShell and package outputs
- Add a `default.nix` or package expression as needed for nixpkgs - Add a `default.nix` or package expression as needed for nixpkgs
See [nixpkgs Rust packaging docs](https://nixos.org/manual/nixpkgs/stable/#rust) for more details. See [nixpkgs Rust packaging docs](https://nixos.org/manual/nixpkgs/stable/#rust) for more details.
+8 -8
View File
@@ -1,28 +1,28 @@
{ pkgs }: { pkgs }:
let let
lib = pkgs.lib; lib = pkgs.lib;
templateName = builtins.baseNameOf (toString ./.); projectName = builtins.baseNameOf (toString ./.);
in in
{ {
${templateName} = pkgs.stdenvNoCC.mkDerivation { ${projectName} = pkgs.stdenvNoCC.mkDerivation {
pname = templateName; pname = projectName;
version = "0.1.0"; version = "0.1.0";
src = ./.; src = ./.;
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
mkdir -p $out/share/${templateName} mkdir -p $out/share/${projectName}
if [ -d src ]; then if [ -d src ]; then
cp -r src $out/share/${templateName}/ cp -r src $out/share/${projectName}/
fi fi
for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do
if [ -f "$f" ]; then if [ -f "$f" ]; then
cp "$f" $out/share/${templateName}/ cp "$f" $out/share/${projectName}/
fi fi
done done
''; '';
meta = with lib; { meta = with lib; {
description = "Template project: ${templateName}"; description = "FeDIY project source bundle: ${projectName}";
license = licenses.unfreeRedistributable; license = licenses.cc-by-sa-40;
platforms = platforms.all; platforms = platforms.all;
}; };
}; };
+5 -5
View File
@@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Rust development environment"; description = "FeDIY: a federated ActivityPub DIY platform built in Rust";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@@ -36,7 +36,7 @@
templates = { templates = {
default = { default = {
path = ./.; path = ./.;
description = "Rust dev environment using fenix; includes a skeletal Cargo project and packaged helper app"; description = "FeDIY Rust development environment and package outputs";
}; };
}; };
@@ -109,7 +109,7 @@
rustup target add riscv32imac-unknown-none-elf >/dev/null 2>&1 || true # ESP32-C3 class rustup target add riscv32imac-unknown-none-elf >/dev/null 2>&1 || true # ESP32-C3 class
echo "Note: ESP32 Xtensa targets require espup/custom toolchains (see esp-rs)." echo "Note: ESP32 Xtensa targets require espup/custom toolchains (see esp-rs)."
fi fi
echo "[rust-template] Welcome to the Rust dev shell!" echo "[FeDIY] Welcome to the Rust dev shell!"
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, probe-rs, espflash, openocd, minicom, elf2uf2-rs, picotool, avrdude, ravedude" echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, probe-rs, espflash, openocd, minicom, elf2uf2-rs, picotool, avrdude, ravedude"
echo "Run 'cargo build' to build, or 'nix run .#dev-helper' for a tool summary." echo "Run 'cargo build' to build, or 'nix run .#dev-helper' for a tool summary."
echo "See README.md for usage." echo "See README.md for usage."
@@ -121,9 +121,9 @@
packages = forEachSupportedSystem ( packages = forEachSupportedSystem (
{ pkgs }: { pkgs }:
{ {
# Build the skeletal Cargo project # Build the FeDIY Cargo project
default = pkgs.rustPlatform.buildRustPackage { default = pkgs.rustPlatform.buildRustPackage {
pname = "sample-rust-app"; pname = "fediy";
version = "0.1.0"; version = "0.1.0";
src = ./.; src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
+6 -5
View File
@@ -1,20 +1,21 @@
{ {
"app-id": "org.example.rustdevshell", "app-id": "com.moturpin.fediy",
"runtime": "org.freedesktop.Platform", "runtime": "org.freedesktop.Platform",
"runtime-version": "23.08", "runtime-version": "23.08",
"sdk": "org.freedesktop.Sdk", "sdk": "org.freedesktop.Sdk",
"command": "rustdevshell-app", "command": "fediy",
"modules": [ "modules": [
{ {
"name": "rustdevshell-app", "name": "fediy",
"buildsystem": "simple", "buildsystem": "simple",
"build-commands": [ "build-commands": [
"cargo build --release" "cargo build --release",
"install -Dm755 target/release/fediy /app/bin/fediy"
], ],
"sources": [ "sources": [
{ {
"type": "dir", "type": "dir",
"path": "../src" "path": ".."
} }
] ]
} }
+3 -3
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "rust-template" name = "FeDIY"
description = "A reusable Nix flake template for Rust development." description = "A federated ActivityPub DIY project-hosting web application in Rust."
version = "0.1.0" version = "0.1.0"
authors = ["gooba42 <your@email>"] authors = ["gooba42 <your@email>"]
license = "MIT" license = "CC-BY-SA-4.0"