-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
sfml: 2.5.1 -> 2.6.1; csfml: 2.5.2 -> 2.6.1 #312161
Open
drawbu
wants to merge
17
commits into
NixOS:master
Choose a base branch
from
drawbu:udpate-csfml-sfml
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
be8b504
sfml: 2.5.1 -> 2.6.1
drawbu 4185a7e
csfml: 2.5.2 -> 2.6.0
drawbu bd2dca4
sfml: use correct hash
drawbu 007724e
sfml: reformat with nixfmt-rfc-style
drawbu d92cae9
csfml: reformat with nixfmt-rfc-style
drawbu 0ccfd7f
sfml: use finalAttrs instead of rec
drawbu a8fc0dd
csfml: use finalAttrs instead of rec
drawbu 8fd5b41
sfml: move to by-name
drawbu 5a41764
csfml: move to by-name
drawbu 2221cab
sfml: fix pkg-config
drawbu 2c67068
sfml: fix pkg-config
drawbu 37fb5de
csfml: 2.6.0 -> 2.6.1
drawbu 0de0712
csfml: mark platform to unix instead of linux
drawbu c15a08a
csfml: use substitutePatch instead of file patch
drawbu 63ba299
{csfml,sfml}: add drawbu to meta.maintainers
drawbu aac0c39
csfml: replace `prePatch` with `postPatch`
drawbu 043ce09
sfml: applied `nixfmt-rfc-style`
drawbu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
35 changes: 24 additions & 11 deletions
35
pkgs/development/libraries/csfml/default.nix → pkgs/by-name/cs/csfml/package.nix
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
{ lib, stdenv, fetchFromGitHub, cmake, sfml }: | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
sfml, | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "csfml"; | ||
version = "2.5.2"; | ||
version = "2.6.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SFML"; | ||
repo = "CSFML"; | ||
rev = version; | ||
sha256 = "sha256-A5C/4SnxUX7mW1wkPWJWX3dwMhrJ79DkBuZ7UYzTOqE="; | ||
repo = "CSFML"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-ECt0ySDpYWF0zuDBSnQzDwUm4Xj4z1+XSC55D6yivac="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
buildInputs = [ sfml ]; | ||
cmakeFlags = [ "-DCMAKE_MODULE_PATH=${sfml}/share/SFML/cmake/Modules/" ]; | ||
|
||
meta = with lib; { | ||
postPatch = '' | ||
substituteInPlace tools/pkg-config/* \ | ||
--replace-fail 'libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@' "libdir=@CMAKE_INSTALL_FULL_LIBDIR@" | ||
''; | ||
|
||
drawbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
meta = { | ||
homepage = "https://www.sfml-dev.org/"; | ||
description = "Simple and fast multimedia library"; | ||
longDescription = '' | ||
SFML is a simple, fast, cross-platform and object-oriented multimedia API. | ||
It provides access to windowing, graphics, audio and network. | ||
It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python. | ||
''; | ||
license = licenses.zlib; | ||
maintainers = [ maintainers.jpdoyle ]; | ||
platforms = platforms.linux; | ||
license = lib.licenses.zlib; | ||
maintainers = with lib.maintainers; [ drawbu jpdoyle ]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
} | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index fc9a268e..512eb6a7 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -301,6 +301,9 @@ endif() | ||
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML") | ||
|
||
if(SFML_INSTALL_PKGCONFIG_FILES) | ||
+ file(RELATIVE_PATH SFML_RELATIVE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
+ set(SFML_PKGCONFIG_DIR "/${SFML_RELATIVE_INSTALL_LIBDIR}/pkgconfig") | ||
+ | ||
sfml_set_option(SFML_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${SFML_PKGCONFIG_DIR}" PATH "Install directory for SFML's pkg-config .pc files") | ||
|
||
foreach(sfml_module IN ITEMS all system window graphics audio network) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
libX11, | ||
freetype, | ||
libjpeg, | ||
openal, | ||
flac, | ||
libvorbis, | ||
glew, | ||
libXrandr, | ||
libXrender, | ||
udev, | ||
xcbutilimage, | ||
darwin, | ||
libXcursor, | ||
fetchpatch, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "sfml"; | ||
version = "2.6.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SFML"; | ||
repo = "SFML"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-R+ULgaKSPadcPNW4D2/jlxMKHc1L9e4FprgqLRuyZk4="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
buildInputs = | ||
[ | ||
freetype | ||
libjpeg | ||
openal | ||
flac | ||
libvorbis | ||
glew | ||
] | ||
++ lib.optional stdenv.hostPlatform.isLinux udev | ||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ | ||
libX11 | ||
libXrandr | ||
libXrender | ||
xcbutilimage | ||
libXcursor | ||
] | ||
++ lib.optionals stdenv.hostPlatform.isDarwin ( | ||
with darwin.apple_sdk.frameworks; | ||
[ | ||
IOKit | ||
Foundation | ||
AppKit | ||
OpenAL | ||
] | ||
); | ||
|
||
cmakeFlags = [ | ||
"-DSFML_INSTALL_PKGCONFIG_FILES=yes" | ||
"-DSFML_MISC_INSTALL_PREFIX=share/SFML" | ||
"-DSFML_BUILD_FRAMEWORKS=no" | ||
"-DSFML_USE_SYSTEM_DEPS=yes" | ||
]; | ||
|
||
patches = [ | ||
# Fix pkg-config | ||
# See https://github.com/SFML/SFML/issues/2815 | ||
# Also, too much changes in CMakeLists.txt and changelog.md, | ||
# so we patchin cmake ourself | ||
(fetchpatch { | ||
url = "https://patch-diff.githubusercontent.com/raw/SFML/SFML/pull/2835.patch"; | ||
hash = "sha256-kdOAXR9YPQllx64z9dgwCV+vy0cJvIsZZboZKFc4Q8Q="; | ||
excludes = [ | ||
"changelog.md" | ||
"CMakeLists.txt" | ||
]; | ||
}) | ||
./CMakeLists.txt-pkgconfig.patch | ||
]; | ||
|
||
drawbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
meta = { | ||
homepage = "https://www.sfml-dev.org/"; | ||
description = "Simple and fast multimedia library"; | ||
longDescription = '' | ||
SFML is a simple, fast, cross-platform and object-oriented multimedia API. | ||
It provides access to windowing, graphics, audio and network. | ||
It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python. | ||
''; | ||
license = lib.licenses.zlib; | ||
maintainers = with lib.maintainers; [ | ||
drawbu | ||
astsmtl | ||
]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
}) |
This file was deleted.
Oops, something went wrong.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please try to upstream this
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.
Sorry for late response
SFML/CSFML#374