feat: scaffold Nix flake with dotnet-sdk_9, typst, and nodejs
- devShells.default provides dotnetCorePackages.sdk_9_0, typst, nodejs - packages.default uses buildDotnetModule with net9.0 target via callPackage - Stub plugin/ project with minimal .csproj - .gitignore with .NET/Nix build artifacts
This commit is contained in:
parent
462db42a18
commit
d94b71d0a1
5 changed files with 121 additions and 0 deletions
72
flake.nix
Normal file
72
flake.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
description = "Jellyfin Lessons — a Jellyfin plugin";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
forAllSystems =
|
||||
fn: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed fn;
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.dotnetCorePackages.sdk_9_0
|
||||
pkgs.typst
|
||||
pkgs.nodejs
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "jellyfin-lessons dev shell"
|
||||
echo " dotnet: $(dotnet --version)"
|
||||
echo " typst: $(typst --version)"
|
||||
echo " node: $(node --version)"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.callPackage (
|
||||
{
|
||||
buildDotnetModule,
|
||||
dotnetCorePackages,
|
||||
lib,
|
||||
}:
|
||||
buildDotnetModule {
|
||||
pname = "jellyfin-lessons";
|
||||
version = "0.1.0";
|
||||
|
||||
src = self;
|
||||
|
||||
projectFile = "plugin/jellyfin-lessons.csproj";
|
||||
nugetDeps = ./deps.json;
|
||||
|
||||
dotnet-sdk = dotnetCorePackages.sdk_9_0;
|
||||
dotnet-runtime = dotnetCorePackages.aspnetcore_9_0;
|
||||
|
||||
meta = {
|
||||
description = "Jellyfin Lessons plugin";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
) { };
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue