strichliste: init at 2.0.1

This commit is contained in:
Martin Weinelt
2026-04-16 20:57:14 +02:00
parent 9b53530a5f
commit d82bc60baf
2 changed files with 94 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
{
stdenv,
fetchFromGitHub,
fetchYarnDeps,
nodejs,
yarnConfigHook,
yarnBuildHook,
meta,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "strichliste-frontend";
version = "2.0.0";
src = fetchFromGitHub {
owner = "strichliste";
repo = "strichliste-web-frontend";
tag = "v${finalAttrs.version}";
hash = "sha256-fi4pz3ylWyC4yvDWsK2Rvv8KDaXeHNVz0jY6PpF07hE=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-leMwcsyhbxPoHJdA3kZDz97Ti77d1TCe8SrzTQMGrWo=";
};
env.NODE_OPTIONS = "--openssl-legacy-provider";
nativeBuildInputs = [
nodejs
yarnConfigHook
yarnBuildHook
];
installPhase = ''
mkdir $out
cp -R build/* $out/
'';
__structuredAttrs = true;
inherit meta;
})
+51
View File
@@ -0,0 +1,51 @@
{
callPackage,
fetchFromGitHub,
lib,
pkgs,
php ? pkgs.php85,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "strichliste-backend";
version = "2.0.1";
src = fetchFromGitHub {
owner = "strichliste";
repo = "strichliste-backend";
tag = "v${finalAttrs.version}";
hash = "sha256-yI20cUp19ehtOnWdu+MItwgOlNDnt1VK3giInaTQQ4Y=";
};
vendorHash = "sha256-vYPjUaNIf62GoKXopC4nGqIa+Z3C8Q5dnX9FPvM1Ers=";
composerNoDev = true;
composerStrictValidation = false;
postPatch = ''
substituteInPlace config/services.yaml \
--replace-fail "strichliste.yaml" "/etc/strichliste.yaml"
'';
postInstall = ''
mkdir $out/bin
ln -s $out/share/php/strichliste-backend/bin/console $out/bin/strichliste-console
'';
__structuredAttrs = true;
passthru = {
frontend = callPackage ./frontend.nix {
inherit (finalAttrs) meta;
};
phpPackage = php;
};
meta = {
description = "strichliste is a tool to replace a tally sheet.";
homepage = "https://www.strichliste.org/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
mainProgram = "strichliste-console";
platforms = lib.platforms.all;
};
})