-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
corsix-th: darwin build, add maintainer #318535
Conversation
42baab8
to
7b45f78
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4061 |
7b45f78
to
7979f00
Compare
7979f00
to
c72f3e2
Compare
c72f3e2
to
d476f5d
Compare
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.
- i don't see a reason to remove the
finalAttrs
pattern - can put lua.withPackages in the buildInputs. no need for luaEnv attribute
- i think
lua.withPackages
brings inlua
so can removelua
from buildInputs
suggested changes
diff --git a/pkgs/games/corsix-th/default.nix b/pkgs/games/corsix-th/default.nix
index d50c55a0718d..885de2612361 100644
--- a/pkgs/games/corsix-th/default.nix
+++ b/pkgs/games/corsix-th/default.nix
@@ -18,14 +18,14 @@
, nix-update-script
}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
pname = "corsix-th";
version = "0.67";
src = fetchFromGitHub {
owner = "CorsixTH";
repo = "CorsixTH";
- rev = "v${version}";
+ rev = "v${finalAttrs.version}";
hash = "sha256-WA/VJqHXzBfVUBNtxCVsGBRzSRQ0pvDvAy03ntc0KZE=";
};
@@ -33,14 +33,12 @@ stdenv.mkDerivation rec {
./darwin-cmake-no-fixup-bundle.patch
];
- luaEnv = lua.withPackages(p: with p; [ luafilesystem lpeg luasec luasocket ]);
nativeBuildInputs = [ cmake doxygen makeWrapper ];
buildInputs = [
ffmpeg
freetype
- lua
- luaEnv
+ (lua.withPackages(p: with p; [ luafilesystem lpeg luasec luasocket ]))
SDL2
SDL2_mixer
timidity
@@ -74,4 +72,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ hughobrien matteopacini ];
platforms = platforms.linux ++ platforms.darwin;
};
-}
+})
alternatively if don't want to expand luaEnv can put it in a let.
buildInputs = let
luaEnv = lua.withPackages(p: with p; [ luafilesystem lpeg luasec luasocket ]);
in
[
...
luaEnv
...
];
@paparodeo removing |
d476f5d
to
46e5ece
Compare
46e5ece
to
e9c1ebb
Compare
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.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1734 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1745 |
Result of 1 package built:
|
Description of changes
corsix-th
.nix-update-script
aspassthru.updateScript
Tested on
aarch64-darwin
. Also rebuilt onaarch64-linux
to ensure that my changes did not break stuff.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.