Updated license and project setup to enable nixpkgs build and development.

This commit is contained in:
2026-07-14 16:43:28 -05:00
parent 20b8bcdb63
commit bb012b2ca9
8 changed files with 71 additions and 36 deletions
+16 -27
View File
@@ -1,29 +1,18 @@
{ pkgs }:
let
lib = pkgs.lib;
templateName = builtins.baseNameOf (toString ./.);
in
{
${templateName} = pkgs.stdenvNoCC.mkDerivation {
pname = templateName;
version = "0.1.0";
src = ./.;
dontBuild = true;
installPhase = ''
mkdir -p $out/share/${templateName}
if [ -d src ]; then
cp -r src $out/share/${templateName}/
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}/
fi
done
'';
meta = with lib; {
description = "Template project: ${templateName}";
license = licenses.unfreeRedistributable;
platforms = platforms.all;
};
{ pkgs ? import <nixpkgs> { } }:
pkgs.rustPlatform.buildRustPackage {
pname = "r_eom";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
meta = with pkgs.lib; {
description = "R_EoM library with a demo platform for testing and showcasing its features";
license = licenses.cc-by-sa-40;
platforms = platforms.all;
};
}