Fixes to ptitgoron, adding cinny and updates

This commit is contained in:
Lyes Saadi 2026-03-10 02:24:08 +01:00
parent 169912a47b
commit f287ac426a
Signed by: lyes
GPG key ID: 55A1D803917CF39A
9 changed files with 229 additions and 37 deletions

32
pkgs/cinny/cinny.nix Normal file
View file

@ -0,0 +1,32 @@
{
cinny-unwrapped,
jq,
stdenvNoCC,
writeText,
conf ? { },
}:
let
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
in
if (conf == { }) then
cinny-unwrapped
else
stdenvNoCC.mkDerivation {
pname = "cinny";
inherit (cinny-unwrapped) version meta;
dontUnpack = true;
nativeBuildInputs = [ jq ];
installPhase = ''
runHook preInstall
mkdir -p $out
ln -s ${cinny-unwrapped}/* $out
rm $out/config.json
jq -s '.[0] * .[1]' "${cinny-unwrapped}/config.json" "${configOverrides}" > "$out/config.json"
runHook postInstall
'';
}