Skip to content

Commit

Permalink
pkgs(games/native/celeste-classic): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvgr committed Oct 31, 2023
1 parent b55c7af commit 229adae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ in rec {

# Games (Native)
celeste-classic = p ./pkgs/games/native/celeste-classic.nix { };
celeste-classic-pm = celeste-classic.override { practiceMod = true; };

# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
Expand Down
11 changes: 6 additions & 5 deletions pkgs/games/native/celeste-classic.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ stdenvNoCC, fetchzip, autoPatchelfHook, pkgs, lib, practiceMod ? false }:

let
folder = if practiceMod then "CELESTE Practice Mod" else "CELESTE";
bin = if practiceMod then "celeste_practice_mod" else "celeste";
folder = if practiceMod then "CELESTE*Practice*" else "CELESTE";
srcbin = if practiceMod then "celeste_practice_mod" else "celeste";
outbin = if practiceMod then "celeste-classic-pm" else "celeste-classic";
in stdenvNoCC.mkDerivation {
pname = "celeste-classic";
version = "1.0";
Expand All @@ -22,13 +23,13 @@ in stdenvNoCC.mkDerivation {

installPhase = ''
runHook preInstall
install -Dm755 */${folder}/${bin} $out/bin/celeste-classic
cp */${folder}/data.pod $out/bin/data.pod
install -Dsm755 */${folder}/${srcbin} $out/bin/${outbin}
install -Dm444 */${folder}/data.pod $out/bin/data.pod
runHook postInstall
'';

meta = with lib; {
description = "A PICO-8 platformer about climbing a mountain, made in four days";
description = "A PICO-8 platformer about climbing a mountain, made in four days ${if practiceMod then "(Practice Mod)" else ""}";
homepage = "https://celesteclassic.github.io/";
license = licenses.unfree;
platforms = platforms.linux;
Expand Down

0 comments on commit 229adae

Please sign in to comment.