about summary refs log tree commit diff
diff options
context:
space:
mode:
authormrtnvgr <root@unixis.fun>2023-11-01 10:14:51 +0700
committerckie <git-525ff67@ckie.dev>2023-11-01 17:52:06 +0200
commit819198c11ff2e5098c5a47591e50ccd1e301dc01 (patch)
treec5f07c1e0f3ebd4238892ec1aa1a9e489182bd08
parent6a0d5a8384fd520790e83d03d156be58917e54ed (diff)
downloadnixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar.gz
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar.bz2
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar.lz
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar.xz
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.tar.zst
nixlib-819198c11ff2e5098c5a47591e50ccd1e301dc01.zip
celeste-classic: init at unstable-2020-12-08
-rw-r--r--pkgs/by-name/ce/celeste-classic/package.nix49
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/by-name/ce/celeste-classic/package.nix b/pkgs/by-name/ce/celeste-classic/package.nix
new file mode 100644
index 000000000000..bbea59a5b457
--- /dev/null
+++ b/pkgs/by-name/ce/celeste-classic/package.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenvNoCC
+, fetchzip
+, autoPatchelfHook
+, SDL2
+, practiceMod ? false
+}:
+
+let
+  directory = 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 = outbin;
+  version = "unstable-2020-12-08";
+
+  # From https://www.speedrun.com/celestep8/resources
+  src = fetchzip {
+    url = "https://www.speedrun.com/static/resource/174ye.zip?v=f3dc98f";
+    hash = "sha256-GANHqKB0N905QJOLaePKWkUuPl9UlL1iqvkMMvw/CC8=";
+    extension = "zip";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [ SDL2 ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dsm755 ${directory}/${srcbin} $out/lib/${outbin}/${outbin}
+    install -Dm444 ${directory}/data.pod $out/lib/${outbin}/data.pod
+    mkdir -p $out/bin
+    ln -s $out/lib/${outbin}/${outbin} $out/bin/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A PICO-8 platformer about climbing a mountain, made in four days${lib.optionalString practiceMod " (Practice Mod)"}";
+    homepage = "https://celesteclassic.github.io/";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    mainProgram = outbin;
+    maintainers = with maintainers; [ mrtnvgr ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index bce2f4635b70..d7ee811044db 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -447,6 +447,10 @@ with pkgs;
 
   ccal = callPackage ../tools/misc/ccal { };
 
+  celeste-classic-pm = pkgs.celeste-classic.override {
+    practiceMod = true;
+  };
+
   cereal = cereal_1_3_0;
   cereal_1_3_0 = callPackage ../development/libraries/cereal/1.3.0.nix { };
   cereal_1_3_2 = callPackage ../development/libraries/cereal/1.3.2.nix { };