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
Add csfml package #33000
Add csfml package #33000
Conversation
version = "2.4"; | ||
in | ||
|
||
stdenv.mkDerivation rec { |
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.
It seems that rec
is not needed.
stdenv.mkDerivation rec { | ||
name = "csfml-${version}"; | ||
src = fetchurl { | ||
url = "https://github.com/SFML/CSFML/archive/${version}.tar.gz"; |
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 use fetchFromGitHub
for this kind of URLs: the archive may get regenerated, which may invalidate the hash.
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.
Is the preferred choice of rev
for this a tag (in this case, "${version}"
, or "2.4"
) or a commit hash?
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'm attempting to revise this patch to use fetchFromGithub
, but I'm seeing the following error:
these derivations will be built:
/nix/store/57si6znxrp5r6s81m50mxj5pddm414hh-source.drv
/nix/store/7pkcj3k8ln1zhdpj5ph1599wmb0p93hz-csfml-2.4.drv
building path(s) ‘/nix/store/hr9zs38gy9axf3jqxl49d6580md36wil-source’
trying https://github.com/SFML/CSFML/archive/b5facb85d13bff451a5fd2d088a97472a685576c.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 152 0 152 0 0 152 0 --:--:-- --:--:-- --:--:-- 894
100 123k 100 123k 0 0 123k 0 0:00:01 --:--:-- 0:00:01 1233k
unpacking source archive /tmp/nix-build-source.drv-0/b5facb85d13bff451a5fd2d088a97472a685576c.tar.gz
output path ‘/nix/store/hr9zs38gy9axf3jqxl49d6580md36wil-source’ has r:sha256 hash ‘1q716gd7c7jlxzwpq5z4rjj5lsrn71ql2djphccdf9jannllqizn’ when ‘01cj7fzbdi8xsmwfdawwd00x81pv94fzmm6pqgp9d3973f3zrh92’ was expected
cannot build derivation ‘/nix/store/7pkcj3k8ln1zhdpj5ph1599wmb0p93hz-csfml-2.4.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/7pkcj3k8ln1zhdpj5ph1599wmb0p93hz-csfml-2.4.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies
The hash it mentions not matching (01cj7fzbdi8xsmwfdawwd00x81pv94fzmm6pqgp9d3973f3zrh92
) doesn't appear anywhere in my package, so I'm confused about what I've screwed up. I assume that it's a problem with the sha256sum
value I added (22c1fc871b278d96eec3d7d4fa1d49fb06d401689cabe678d51dc5b6be3b9205
, as obtained by running wget http://github.com/SFML/CSFML/archive/b5facb85d13bff451a5fd2d088a97472a685576c.tar.gz && sha256sum b5facb85d13bff451a5fd2d088a97472a685576c.tar.gz
), but I don't understand what could have gone wrong.
url = "https://github.com/SFML/CSFML/archive/${version}.tar.gz"; | ||
sha256 = "4e3d9a03afafbd3a507c39457a7619b68616ec79e870b975e09665e924f9c4c6"; | ||
}; | ||
#preInstall = "echo 'SFML dir:' '${sfml}'"; |
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 remove such debug comments.
#preInstall = "echo 'SFML dir:' '${sfml}'"; | ||
buildInputs = [ cmake sfml ]; | ||
cmakeFlags = [ "-DCMAKE_MODULE_PATH=${sfml}/share/SFML/cmake/Modules/" | ||
"-DSFML_INSTALL_PKGCONFIG_FILES=yes" |
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 variable is not used.
It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python. | ||
''; | ||
license = licenses.zlib; | ||
maintainers = [ maintainers.astsmtl ]; |
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.
Is this you, @jpdoyle?
''; | ||
license = licenses.zlib; | ||
maintainers = [ maintainers.astsmtl ]; | ||
platforms = platforms.linux; |
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.
Seems to build fine on darwin
as well.
@@ -10826,6 +10826,7 @@ with pkgs; | |||
simp_le = callPackage ../tools/admin/simp_le { }; | |||
|
|||
sfml = callPackage ../development/libraries/sfml { }; | |||
csfml = callPackage ../development/libraries/csfml { }; |
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 alphabetical order is usually preferred.
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 figure it's a good idea to group these together because csfml
is just a binding for sfml
, much like cppzmq
and czmq
for zeromq
. I can definitely make this change if it's a strong preference though.
@GrahamcOfBorg eval (sorry for the noise, master was broken by a merge) |
@vbgl have my revisions addressed your concerns? |
Motivation for this change
I needed this library, and it was not in nixpkgs.
Things done
Tested by running
rust-sfml
examples, which depend oncsfml
.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)