Last active
February 8, 2020 08:48
-
-
Save jakobrs/61389d04fd49d73a53418eb6b9aaf969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 85ba6429ea2718349d4516037a739b1b30303ffb Mon Sep 17 00:00:00 2001 | |
From: jakobrs <jakobrs100@gmail.com> | |
Date: Sat, 8 Feb 2020 09:31:20 +0100 | |
Subject: [PATCH 1/2] vvvvvv: factor vvvvvv-bin out of vvvvvv | |
--- | |
pkgs/games/vvvvvv/default.nix | 94 ++++++++++++++++++++++----------- | |
pkgs/top-level/all-packages.nix | 4 +- | |
2 files changed, 66 insertions(+), 32 deletions(-) | |
diff --git a/pkgs/games/vvvvvv/default.nix b/pkgs/games/vvvvvv/default.nix | |
index a336e8ad85d..b95239a3eec 100644 | |
--- a/pkgs/games/vvvvvv/default.nix | |
+++ b/pkgs/games/vvvvvv/default.nix | |
@@ -1,4 +1,4 @@ | |
-{ stdenv, fetchurl, fetchFromGitHub, requireFile, makeWrapper | |
+{ stdenv, stdenvNoCC, fetchurl, fetchFromGitHub, requireFile | |
, SDL2, SDL2_mixer, cmake, ninja | |
, fullGame ? false }: | |
@@ -23,40 +23,72 @@ let | |
# if the user does not own the full game, build the Make and Play edition | |
flags = if fullGame then [] else [ "-DMAKEANDPLAY" ]; | |
-in stdenv.mkDerivation rec { | |
- pname = "vvvvvv"; | |
- version = "unstable-2020-02-02"; | |
- | |
- src = fetchFromGitHub { | |
- owner = "TerryCavanagh"; | |
- repo = "VVVVVV"; | |
- rev = "4bc76416f551253452012d28e2bc049087e2be73"; | |
- sha256 = "1sc64f7sxf063bdgnkg23vc170chq2ix25gs836hyswx98iyg5ly"; | |
- }; | |
- | |
- CFLAGS = flags; | |
- CXXFLAGS = flags; | |
- nativeBuildInputs = [ cmake ninja makeWrapper ]; | |
- buildInputs = [ SDL2 SDL2_mixer ]; | |
+ vvvvvv-bin = stdenv.mkDerivation rec { | |
+ pname = "vvvvvv-bin"; | |
+ version = "unstable-2020-02-02"; | |
+ | |
+ src = fetchFromGitHub { | |
+ owner = "TerryCavanagh"; | |
+ repo = "VVVVVV"; | |
+ rev = "4bc76416f551253452012d28e2bc049087e2be73"; | |
+ sha256 = "1sc64f7sxf063bdgnkg23vc170chq2ix25gs836hyswx98iyg5ly"; | |
+ }; | |
+ | |
+ CFLAGS = flags; | |
+ CXXFLAGS = flags; | |
+ | |
+ nativeBuildInputs = [ cmake ninja ]; | |
+ buildInputs = [ SDL2 SDL2_mixer ]; | |
+ | |
+ sourceRoot = "source/desktop_version"; | |
+ | |
+ installPhase = '' | |
+ mkdir -p $out/bin | |
+ cp VVVVVV $out/bin/VVVVVV | |
+ ''; | |
+ | |
+ meta = with stdenv.lib; { | |
+ description = "A retro-styled platform game"; | |
+ longDescription = '' | |
+ VVVVVV is a platform game all about exploring one simple mechanical | |
+ idea - what if you reversed gravity instead of jumping? | |
+ ''; | |
+ homepage = "https://thelettervsixtim.es"; | |
+ license = licenses.unfreeRedistributable; | |
+ maintainers = [ maintainers.dkudriavtsev ]; | |
+ platforms = platforms.all; | |
+ }; | |
+ }; | |
- sourceRoot = "source/desktop_version"; | |
+ vvvvvv = stdenvNoCC.mkDerivation rec { | |
+ pname = "vvvvvv"; | |
+ version = "unstable-2020-02-02"; | |
- installPhase = '' | |
- install -d $out/bin | |
- install -t $out/bin VVVVVV | |
- wrapProgram $out/bin/VVVVVV --add-flags "-assets ${dataZip}" | |
- ''; | |
+ dontUnpack = true; | |
- meta = with stdenv.lib; { | |
- description = "A retro-styled platform game"; | |
- longDescription = '' | |
- VVVVVV is a platform game all about exploring one simple mechanical | |
- idea - what if you reversed gravity instead of jumping? | |
+ installPhase = '' | |
+ mkdir -p $out/bin | |
+ cat > $out/bin/VVVVVV << EOF | |
+ #!/bin/sh | |
+ exec -a "\$0" ${vvvvvv-bin}/bin/VVVVVV -assets ${dataZip} "\$@" | |
+ EOF | |
+ chmod a+x $out/bin/VVVVVV | |
''; | |
- homepage = "https://thelettervsixtim.es"; | |
- license = if fullGame then licenses.unfree else licenses.unfreeRedistributable; | |
- maintainers = [ maintainers.dkudriavtsev ]; | |
- platforms = platforms.all; | |
+ | |
+ meta = with stdenv.lib; { | |
+ description = "A retro-styled platform game"; | |
+ longDescription = '' | |
+ VVVVVV is a platform game all about exploring one simple mechanical | |
+ idea - what if you reversed gravity instead of jumping? | |
+ ''; | |
+ homepage = "https://thelettervsixtim.es"; | |
+ license = if fullGame then licenses.unfree else licenses.unfreeRedistributable; | |
+ maintainers = [ maintainers.dkudriavtsev ]; | |
+ platforms = platforms.all; | |
+ }; | |
}; | |
+ | |
+in { | |
+ inherit vvvvvv-bin vvvvvv; | |
} | |
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix | |
index 9e384873854..16042f1ae39 100644 | |
--- a/pkgs/top-level/all-packages.nix | |
+++ b/pkgs/top-level/all-packages.nix | |
@@ -23521,7 +23521,9 @@ in | |
libpng = libpng12; | |
}; | |
- vvvvvv = callPackage ../games/vvvvvv { }; | |
+ vvvvvvPackages = callPackages ../games/vvvvvv { }; | |
+ | |
+ inherit (vvvvvvPackages) vvvvvv-bin vvvvvv; | |
warmux = callPackage ../games/warmux { }; | |
-- | |
2.23.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 2fee970a412ba5d63a4e1ef6c0d0f970203eef85 Mon Sep 17 00:00:00 2001 | |
From: jakobrs <jakobrs100@gmail.com> | |
Date: Sat, 8 Feb 2020 09:45:31 +0100 | |
Subject: [PATCH 2/2] vvvvvv: add full version to all-packages.nix | |
--- | |
pkgs/top-level/all-packages.nix | 3 +++ | |
1 file changed, 3 insertions(+) | |
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix | |
index 16042f1ae39..feda09cc6ce 100644 | |
--- a/pkgs/top-level/all-packages.nix | |
+++ b/pkgs/top-level/all-packages.nix | |
@@ -23525,6 +23525,9 @@ in | |
inherit (vvvvvvPackages) vvvvvv-bin vvvvvv; | |
+ vvvvvv-bin-full = vvvvvv-bin.override { fullGame = true; }; | |
+ vvvvvv-full = vvvvvv.override { fullGame = true; }; | |
+ | |
warmux = callPackage ../games/warmux { }; | |
warsow-engine = callPackage ../games/warsow/engine.nix { }; | |
-- | |
2.23.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment