about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2022-12-27 21:21:10 +1100
committerStanisław Pitucha <git@viraptor.info>2023-01-02 09:04:39 +1100
commit89a9ff18f14970a8f4138fb6e7874e8a49d08840 (patch)
treec8dd48c2be1147a8bdbd7cf91a7419294ca838c0 /pkgs/games
parent942fe7ae60e92c2e00b313aad1dfdbaf4cb9f791 (diff)
downloadnixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar.gz
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar.bz2
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar.lz
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar.xz
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.tar.zst
nixlib-89a9ff18f14970a8f4138fb6e7874e8a49d08840.zip
nanosaur,nanosaur2,otto-matic: cleanup cmake build
Use the standard way of building cmake projects. This also removes the
unnecessary build files from the output.
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/nanosaur/default.nix15
-rw-r--r--pkgs/games/nanosaur2/default.nix15
-rw-r--r--pkgs/games/otto-matic/default.nix17
3 files changed, 15 insertions, 32 deletions
diff --git a/pkgs/games/nanosaur/default.nix b/pkgs/games/nanosaur/default.nix
index c62fd3c5db72..32c2a0b9ecc9 100644
--- a/pkgs/games/nanosaur/default.nix
+++ b/pkgs/games/nanosaur/default.nix
@@ -20,21 +20,12 @@ stdenv.mkDerivation rec {
     SDL2
   ];
 
-  configurePhase = ''
-    runHook preConfigure
-    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
-    runHook postConfigure
-  '';
-
-  buildPhase = ''
-    runHook preBuild
-    cmake --build build
-    runHook postBuild
-  '';
+  cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
 
   installPhase = ''
     runHook preInstall
-    mv build $out
+    mkdir -p "$out/bin"
+    mv Nanosaur Data ReadMe.txt "$out/"
     makeWrapper $out/Nanosaur $out/bin/Nanosaur --chdir "$out"
     runHook postInstall
   '';
diff --git a/pkgs/games/nanosaur2/default.nix b/pkgs/games/nanosaur2/default.nix
index da0e6dbe7293..e4e0919cd30c 100644
--- a/pkgs/games/nanosaur2/default.nix
+++ b/pkgs/games/nanosaur2/default.nix
@@ -20,21 +20,12 @@ stdenv.mkDerivation rec {
     SDL2
   ];
 
-  configurePhase = ''
-    runHook preConfigure
-    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
-    runHook postConfigure
-  '';
-
-  buildPhase = ''
-    runHook preBuild
-    cmake --build build
-    runHook postBuild
-  '';
+  cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
 
   installPhase = ''
     runHook preInstall
-    mv build $out
+    mkdir -p "$out/bin"
+    mv Nanosaur2 Data ReadMe.txt "$out/"
     makeWrapper $out/Nanosaur2 $out/bin/Nanosaur2 --chdir "$out"
     runHook postInstall
   '';
diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix
index 7523f2070e9a..17b63b263029 100644
--- a/pkgs/games/otto-matic/default.nix
+++ b/pkgs/games/otto-matic/default.nix
@@ -12,22 +12,23 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  buildInputs = [
-    SDL2
-  ];
-
   nativeBuildInputs = [
     cmake
     makeWrapper
   ];
 
+  buildInputs = [
+    SDL2
+  ];
+
+  cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
+
   installPhase = ''
     runHook preInstall
 
-    mkdir -p $out/share/OttoMatic
-    mv Data $out/share/OttoMatic
-    install -Dm755 {.,$out/bin}/OttoMatic
-    wrapProgram $out/bin/OttoMatic --chdir "$out/share/OttoMatic"
+    mkdir -p "$out/bin"
+    mv OttoMatic Data ReadMe.txt "$out/"
+    makeWrapper $out/OttoMatic $out/bin/OttoMatic --chdir "$out"
 
     runHook postInstall
   '';