Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vvvvvv: init at 2.3-git-2020-11-22 #79068

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
65 changes: 65 additions & 0 deletions pkgs/games/vvvvvv/default.nix
@@ -0,0 +1,65 @@
{ stdenv, fetchurl, fetchFromGitHub, requireFile, makeWrapper
, SDL2, SDL2_mixer, cmake, ninja
, Foundation
, fullGame ? false }:

let
dataZip = if fullGame then requireFile {
# the data file for the full game
name = "data.zip";
sha256 = "1q2pzscrglmwfgdl8yj300wymwskh51iq66l4xcd0qk0q3g3rbkg";
message = ''
In order to install VVVVVV, you must first download the game's
data file (data.zip) as it is not released freely.
Once you have downloaded the file, place it in your current
directory, use the following command and re-run the installation:
nix-prefetch-url file://\$PWD/data.zip
'';
} else fetchurl {
# the data file for the free Make and Play edition
url = https://thelettervsixtim.es/makeandplay/data.zip;
Copy link
Member

Choose a reason for hiding this comment

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

Is there a versioned link?

Copy link
Member Author

Choose a reason for hiding this comment

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

No.

Choose a reason for hiding this comment

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

data.zip has never changed since it was first introduced in 2014. Due to compatibility and the fact that this is an 11-year-old game, it probably won't ever be changed either. (But new zips will probably be introduced.)

name = "mapdata.zip";
sha256 = "1q2pzscrglmwfgdl8yj300wymwskh51iq66l4xcd0qk0q3g3rbkg";
};

# if the user does not own the full game, build the Make and Play edition
flags = if fullGame then [] else [ "-DMAKEANDPLAY" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
flags = if fullGame then [] else [ "-DMAKEANDPLAY" ];
flags = lib.optionals fullGame [ "-DMAKEANDPLAY" ];

in stdenv.mkDerivation rec {
pname = "vvvvvv";
version = "unstable-2020-02-09";

src = fetchFromGitHub {
owner = "TerryCavanagh";
repo = "VVVVVV";
rev = "1b00d1260064b384f8b294d15ad5eb43f2dde22b";
sha256 = "0z98d95ywr30cl6jsxc6ijp2h5p6abgh44ydm5dz9x9zp5rw6zc5";
};

CFLAGS = flags;
CXXFLAGS = flags;

nativeBuildInputs = [ cmake ninja ];
buildInputs = [
SDL2 SDL2_mixer
] + stdenv.lib.optionalPlatform stdenv.lib.platforms.darwin [ Foundation ];
Copy link
Contributor

Choose a reason for hiding this comment

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

optionalPlatform doesn't exist, i think you want

Suggested change
] + stdenv.lib.optionalPlatform stdenv.lib.platforms.darwin [ Foundation ];
] + stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];


sourceRoot = "source/desktop_version";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sourceRoot = "source/desktop_version";
sourceRoot = "source/desktop_version";


installPhase = ''
install -d $out/bin
install -t $out/bin VVVVVV
wrapProgram $out/bin/VVVVVV --add-flags "-assets ${dataZip}"
'';

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.linux platforms.darwin ];
Copy link
Contributor

Choose a reason for hiding this comment

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

this makes [[string]] we want [string]

Suggested change
platforms = [ platforms.linux platforms.darwin ];
platforms = platforms.linux ++ platforms.darwin;

};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -24712,6 +24712,8 @@ in
libpng = libpng12;
};

vvvvvv = callPackage ../games/vvvvvv { };
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
vvvvvv = callPackage ../games/vvvvvv { };
vvvvvv = callPackage ../games/vvvvvv {
inherit (darwin.apple_sdk.frameworks) Foundation;
};


warmux = callPackage ../games/warmux { };

warsow-engine = callPackage ../games/warsow/engine.nix { };
Expand Down