Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{
|
|
buildDotnetModule,
|
|
lib,
|
|
fetchFromGitHub,
|
|
dotnetCorePackages,
|
|
SDL2,
|
|
SDL2_image,
|
|
SDL2_ttf,
|
|
}:
|
|
let
|
|
dotnet = dotnetCorePackages.dotnet_8;
|
|
in
|
|
buildDotnetModule (finalAttrs: {
|
|
pname = "yafc-ce";
|
|
version = "2.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "shpaass";
|
|
repo = "yafc-ce";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-EbVPPSci4AziF+n/8pIa9M44WEUj+vvEOQqu3HJ6aNQ=";
|
|
};
|
|
|
|
projectFile = [
|
|
"Yafc.I18n.Generator/Yafc.I18n.Generator.csproj"
|
|
"Yafc/Yafc.csproj"
|
|
];
|
|
testProjectFile = [ "Yafc.Model.Tests/Yafc.Model.Tests.csproj" ];
|
|
nugetDeps = ./deps.json;
|
|
|
|
dotnet-sdk = dotnet.sdk;
|
|
dotnet-runtime = dotnet.runtime;
|
|
|
|
executables = [ "Yafc" ];
|
|
|
|
runtimeDeps = [
|
|
SDL2
|
|
SDL2_ttf
|
|
SDL2_image
|
|
];
|
|
|
|
postPatch = ''
|
|
# Yafc finds the root by looking for a `.git` directory, but `.git` is
|
|
# removed by Nix to ensure reproducibility. `.github` is not.
|
|
substituteInPlace Yafc.I18n.Generator/SourceGenerator.cs \
|
|
--replace-fail 'rootDirectory, ".git"' 'rootDirectory, ".github"'
|
|
'';
|
|
|
|
meta = {
|
|
description = "Powerful Factorio calculator/analyser that works with mods, Community Edition";
|
|
longDescription = ''
|
|
Yet Another Factorio Calculator or YAFC is a planner and analyzer.
|
|
The main goal of YAFC is to help with heavily modded Factorio games.
|
|
|
|
YAFC Community Edition is an updated and actively-maintained version of the original YAFC.
|
|
'';
|
|
homepage = "https://github.com/shpaass/yafc-ce";
|
|
downloadPage = "https://github.com/shpaass/yafc-ce/releases/tag/${finalAttrs.version}";
|
|
changelog = "https://github.com/shpaass/yafc-ce/releases/tag/${finalAttrs.version}";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = with lib.maintainers; [
|
|
diamond-deluxe
|
|
TheColorman
|
|
];
|
|
platforms = with lib.platforms; x86_64 ++ darwin;
|
|
mainProgram = "Yafc";
|
|
};
|
|
})
|