Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions pkgs/by-name/ka/katawa-shoujo-re-engineered/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,34 @@ stdenvNoCC.mkDerivation (finalAttrs: {
nativeBuildInputs = [
makeWrapper
copyDesktopItems
renpy
];

dontBuild = true;
configurePhase = ''
runHook preConfigure

substituteInPlace game/config.rpy --replace-fail 0.0.0-localbuild ${finalAttrs.version}

runHook postConfigure
'';
Comment on lines +40 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if separate, that definitely belongs in the patchPhase

Suggested change
configurePhase = ''
runHook preConfigure
substituteInPlace game/config.rpy --replace-fail 0.0.0-localbuild ${finalAttrs.version}
runHook postConfigure
'';
postPatch = ''
substituteInPlace game/config.rpy --replace-fail 0.0.0-localbuild ${finalAttrs.version}
'';

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this definitely is the configure phase.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm i don't know enough about what the configure phase is supposed to be other than autotools specific running the ./configure script.
so since you're so sure, i'll let it go


buildPhase = ''
runHook preBuild

renpy . compile

runHook postBuild
'';

installPhase = ''
runHook preInstall

mkdir -p $out/bin
makeWrapper ${lib.getExe' renpy "renpy"} $out/bin/${finalAttrs.meta.mainProgram} \
--add-flags ${finalAttrs.src} --add-flags run
phome=$out/share/kataswa-shoujo-re-engineered
mkdir -p $phome
cp -r game $phome
find $phome -type f -name "*.rpy" -delete
makeWrapper ${lib.getExe renpy} $out/bin/${finalAttrs.meta.mainProgram} \
--add-flags $phome --add-flags run
install -D $src/web-icon.png $out/share/icons/hicolor/512x512/apps/${finalAttrs.meta.mainProgram}.png

runHook postInstall
Expand All @@ -64,6 +82,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
maintainers = with lib.maintainers; [
quantenzitrone
rapiteanu
ulysseszhan
];
platforms = renpy.meta.platforms;
};
Expand Down
Loading