nix-packages/minecraft/papermc-from-source/source.nix

20 lines
551 B
Nix
Raw Normal View History

2022-09-28 19:14:31 +00:00
{
applyPatches,
fetchgit,
writeScript,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
(applyPatches {
patches = [./build.patch];
src = fetchgit {
inherit (source) url rev sha256 fetchLFS fetchSubmodules deepClone leaveDotGit;
};
})
.overrideAttrs (_: {
passthru.source = source;
passthru.updateScript = writeScript "update-paper-git" ''
${../../scripts/update-git.sh} https://github.com/PaperMC/Paper minecraft/papermc/source.json "--leave-dotGit --fetch-submodules"
'';
})