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
frogatto: init at 0.0.2018-12-09 #52989
Conversation
Here's some little things that needed correction diff --git a/pkgs/games/frogatto/data.nix b/pkgs/games/frogatto/data.nix
index dc63b650d9c..273e8ef35cf 100644
--- a/pkgs/games/frogatto/data.nix
+++ b/pkgs/games/frogatto/data.nix
@@ -1,18 +1,16 @@
-{ stdenv, fetchFromGitHub,
-}:
-
-let
- version = "0.0.2018-12-09";
- source = fetchFromGitHub {
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "frogatto-data";
+ version = "unstable-2018-12-18";
+
+ src = fetchFromGitHub {
owner = "frogatto";
repo = "frogatto";
# master branch as of 2018-12-18
rev = "8f261b5d3fca3c88e6a534316a28378cf687d3e5";
sha256 = "0nyfwfyy5gxp61ydna299nq9p5wra9mk0bf1drdngg6bwws1hrqx";
};
-in stdenv.mkDerivation {
- name = "frogatto-data-${version}";
- src = source;
installPhase = ''
mkdir -p $out/share/frogatto/modules
diff --git a/pkgs/games/frogatto/default.nix b/pkgs/games/frogatto/default.nix
index f76d5723423..292314b9ced 100644
--- a/pkgs/games/frogatto/default.nix
+++ b/pkgs/games/frogatto/default.nix
@@ -15,9 +15,9 @@ let
genericName = "frogatto";
categories = "Application;Game;ArcadeGame;";
};
- version = "0.0.2018-12-09";
in buildEnv rec {
name = "frogatto-${version}";
+ version = "unstable-2018-12-18";
buildInputs = [ makeWrapper ];
paths = [ engine data desktopItem ];
@@ -34,8 +34,8 @@ in buildEnv rec {
meta = with stdenv.lib; {
homepage = https://frogatto.com;
description = description;
- license = [ licenses.cc-by-30 licenses.unfree ];
+ license = with licenses; [ cc-by-30 unfree ];
platforms = platforms.linux;
- maintainers = with stdenv.lib.maintainers; [ astro ];
+ maintainers = with maintainers; [ astro ];
};
}
diff --git a/pkgs/games/frogatto/engine.nix b/pkgs/games/frogatto/engine.nix
index f30ed82439f..c6a9aa485e2 100644
--- a/pkgs/games/frogatto/engine.nix
+++ b/pkgs/games/frogatto/engine.nix
@@ -3,20 +3,18 @@
glew, zlib, icu, pkgconfig, cairo, libvpx,
}:
-let
- version = "0.0.2018-11-28";
- source = fetchFromGitHub {
+stdenv.mkDerivation rec {
+ pname = "anura-engine";
+ version = "unstable-2018-11-28";
+
+ src = fetchFromGitHub {
owner = "anura-engine";
repo = "anura";
- fetchSubmodules = true;
# trunk branch as of 2018-11-28
rev = "8070111467802dc772c0a6c7806ecd16b0bcdaa9";
sha256 = "0xbqwfmws69n7iiz17n93h4jiw39cwyf7hxw0qi2c8cccr37b1nr";
+ fetchSubmodules = true;
};
-in stdenv.mkDerivation {
- name = "anura-${version}";
-
- src = source;
buildInputs = [
bash
@@ -33,6 +31,7 @@ in stdenv.mkDerivation {
cairo
libvpx
];
+
enableParallelBuilding = true;
installPhase = ''
@@ -46,6 +45,6 @@ in stdenv.mkDerivation {
description = "Game engine used by Frogatto";
license = licenses.zlib;
platforms = platforms.linux;
- maintainers = with stdenv.lib.maintainers; [ astro ];
+ maintainers = with maintainers; [ astro ];
};
}
Main things were:
|
@worldofpeace Thank you very much. I added your changes. Should I squash into one commit immediately or do you prefer added commits for this PR's discussion? |
You're very welcome 😄
I do prefer added commits for the discussion. Once we think it's mergeable we'll squash it back into one. |
I think this is good 👍 Last comment for improvement would be that the And if you do that be sure to add meta attributes to the |
Ok |
let | ||
description = "Action-adventure game, starring a certain quixotic frog"; | ||
engine = callPackage ./engine.nix { }; | ||
data = callPackage ./data.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These attributes are only accessible in this derivation.
You'd need move these to all-packages.nix like
anura-engine = callPackage ../games/frogatto/engine.nix { }; # remember alphabetical
frogatto-data = callPackage ../games/frogatto/data.nix { };
And then use that attribute in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ok, as frogatto seems to be its only user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The engine in its current form would not be useful for other consumers of the engine anyway.
@GrahamcOfBorg build frogato |
@GrahamcOfBorg build frogatto |
@Mic92 The version was incorrect in the commit msg Water off a ducks back now 😄 |
close enough. |
Motivation for this change
First time submission, please review thoroughly.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)