makeHardcodeGsettingsPatch
pkgs.makeHardcodeGsettingsPatch
Functor
Docs pulled from | This Revision | about 1 hour ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
{
src,
patches ? [ ],
schemaIdToVariableMapping,
schemaExistsFunction ? null,
}:
runCommand "hardcode-gsettings.patch"
{
inherit src patches;
nativeBuildInputs = [
gitMinimal
coccinelle
python3 # For patch script
];
}
''
unpackPhase
cd "''${sourceRoot:-.}"
patchPhase
set -x
cp ${builtins.toFile "glib-schema-to-var.json" (builtins.toJSON schemaIdToVariableMapping)} ./glib-schema-to-var.json
cp ${builtins.toFile "glib-schema-exists-function.json" (builtins.toJSON schemaExistsFunction)} ./glib-schema-exists-function.json
git init
git add -A
spatch --sp-file "${./hardcode-gsettings.cocci}" --dir . --in-place
git diff > "$out"
''