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

kmsxx and pykms: init at 2017-10-03 #30167

Merged
merged 3 commits into from Oct 13, 2017
Merged

kmsxx and pykms: init at 2017-10-03 #30167

merged 3 commits into from Oct 13, 2017

Conversation

ghost
Copy link

@ghost ghost commented Oct 6, 2017

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@ghost ghost requested a review from FRidh as a code owner October 6, 2017 20:32

nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libdrm ] ++ stdenv.lib.optional (pythonBindings != null) pythonBindings;

Copy link
Member

Choose a reason for hiding this comment

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

in order for it to be discoverable by python.buildEnv, it needs

pythonPath = [ ];

Furthermore, it would be good to add

passthru.python = pythonBindings;

Copy link
Member

@FRidh FRidh Oct 8, 2017

Choose a reason for hiding this comment

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

optional (pythonBindings != null) ?

Copy link
Author

Choose a reason for hiding this comment

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

@FRidh Sorry, don't understand. You said we should build python bindings in any case.

@@ -0,0 +1,27 @@
{ stdenv, fetchgit, cmake, pkgconfig, libdrm, pythonBindings ? null }:
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to just pass in python and build the bindings regardless. We could (perhaps later) put them in a separate output.

@@ -15595,6 +15595,10 @@ in {
pika-pool = callPackage ../development/python-modules/pika-pool { };
platformio = callPackage ../development/python-modules/platformio { };

pykms = callPackage ../development/libraries/kmsxx {
pythonBindings = python;
Copy link
Member

Choose a reason for hiding this comment

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

The manual says

Dependencies:

  • libdrm
  • Python 3.x (for python bindings)

...so it should be disabled for Python 2.x.


Nevermind: tomba/kmsxx@643d678

stdenv.mkDerivation rec {
name = "kmsxx-2017-10-03";

src = fetchgit {
Copy link
Member

Choose a reason for hiding this comment

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

You can use fetchFromGitHub with fetchSubModules.

description = "C++11 library, utilities and python bindings for Linux kernel mode setting";
homepage = https://github.com/tomba/kmsxx;
license = licenses.mpl20;
maintainers = [ maintainers.gnidorah ];
Copy link
Member

Choose a reason for hiding this comment

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

nitpack alert: maintainers = with maintainers; [ gnidorah ];

@@ -15595,6 +15595,8 @@ in {
pika-pool = callPackage ../development/python-modules/pika-pool { };
platformio = callPackage ../development/python-modules/platformio { };

pykms = callPackage ../development/libraries/kmsxx { };
Copy link
Member

Choose a reason for hiding this comment

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

We are already using pykms for something else although it's not under pythonPackages.

Copy link
Author

Choose a reason for hiding this comment

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

@peterhoeg ?
$ grep -Ir pykms | grep -v .git
pkgs/top-level/python-packages.nix: pykms = callPackage ../development/libraries/kmsxx { };

Copy link
Author

Choose a reason for hiding this comment

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

@peterhoeg Ok, seeing it after rebase. But that's another package. Need to do something with name.

@Mic92
Copy link
Member

Mic92 commented Oct 13, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants