Fixes to ptitgoron, adding cinny and updates
This commit is contained in:
parent
169912a47b
commit
f287ac426a
9 changed files with 229 additions and 37 deletions
32
pkgs/cinny/cinny.nix
Normal file
32
pkgs/cinny/cinny.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue