Rename project to FeDIY and update related configurations and documentation
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "sample-rust-app"
|
||||
name = "fediy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,7 +44,7 @@ The devShell automatically installs common embedded Rust targets via `rustup`:
|
||||
|
||||
## 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
|
||||
|
||||
@@ -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:
|
||||
|
||||
```bash
|
||||
flatpak install --user build-flatpak/org.example.rustdevshell.flatpak
|
||||
flatpak run org.example.rustdevshell
|
||||
flatpak install --user build-flatpak/com.moturpin.fediy.flatpak
|
||||
flatpak run com.moturpin.fediy
|
||||
```
|
||||
|
||||
## Included Tools
|
||||
@@ -153,10 +153,10 @@ See project.toml for example metadata.
|
||||
|
||||
## Packaging for nixpkgs
|
||||
|
||||
This template is structured for easy packaging in nixpkgs:
|
||||
This project is structured for packaging in nixpkgs:
|
||||
|
||||
- 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
|
||||
|
||||
See [nixpkgs Rust packaging docs](https://nixos.org/manual/nixpkgs/stable/#rust) for more details.
|
||||
|
||||
+8
-8
@@ -1,28 +1,28 @@
|
||||
{ pkgs }:
|
||||
let
|
||||
lib = pkgs.lib;
|
||||
templateName = builtins.baseNameOf (toString ./.);
|
||||
projectName = builtins.baseNameOf (toString ./.);
|
||||
in
|
||||
{
|
||||
${templateName} = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = templateName;
|
||||
${projectName} = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = projectName;
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/${templateName}
|
||||
mkdir -p $out/share/${projectName}
|
||||
if [ -d src ]; then
|
||||
cp -r src $out/share/${templateName}/
|
||||
cp -r src $out/share/${projectName}/
|
||||
fi
|
||||
for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do
|
||||
if [ -f "$f" ]; then
|
||||
cp "$f" $out/share/${templateName}/
|
||||
cp "$f" $out/share/${projectName}/
|
||||
fi
|
||||
done
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Template project: ${templateName}";
|
||||
license = licenses.unfreeRedistributable;
|
||||
description = "FeDIY project source bundle: ${projectName}";
|
||||
license = licenses.cc-by-sa-40;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "A Nix-flake-based Rust development environment";
|
||||
description = "FeDIY: a federated ActivityPub DIY platform built in Rust";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
@@ -36,7 +36,7 @@
|
||||
templates = {
|
||||
default = {
|
||||
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
|
||||
echo "Note: ESP32 Xtensa targets require espup/custom toolchains (see esp-rs)."
|
||||
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 "Run 'cargo build' to build, or 'nix run .#dev-helper' for a tool summary."
|
||||
echo "See README.md for usage."
|
||||
@@ -121,9 +121,9 @@
|
||||
packages = forEachSupportedSystem (
|
||||
{ pkgs }:
|
||||
{
|
||||
# Build the skeletal Cargo project
|
||||
# Build the FeDIY Cargo project
|
||||
default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "sample-rust-app";
|
||||
pname = "fediy";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
{
|
||||
"app-id": "org.example.rustdevshell",
|
||||
"app-id": "com.moturpin.fediy",
|
||||
"runtime": "org.freedesktop.Platform",
|
||||
"runtime-version": "23.08",
|
||||
"sdk": "org.freedesktop.Sdk",
|
||||
"command": "rustdevshell-app",
|
||||
"command": "fediy",
|
||||
"modules": [
|
||||
{
|
||||
"name": "rustdevshell-app",
|
||||
"name": "fediy",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"cargo build --release"
|
||||
"cargo build --release",
|
||||
"install -Dm755 target/release/fediy /app/bin/fediy"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../src"
|
||||
"path": ".."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "rust-template"
|
||||
description = "A reusable Nix flake template for Rust development."
|
||||
name = "FeDIY"
|
||||
description = "A federated ActivityPub DIY project-hosting web application in Rust."
|
||||
version = "0.1.0"
|
||||
authors = ["gooba42 <your@email>"]
|
||||
license = "MIT"
|
||||
license = "CC-BY-SA-4.0"
|
||||
|
||||
Reference in New Issue
Block a user