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

solaar: add unreleased but supported master branch version #43991

Merged
merged 4 commits into from Aug 8, 2018

Conversation

ysndr
Copy link
Member

@ysndr ysndr commented Jul 23, 2018

Motivation for this change

Having a Logitech MX Master 2x I the current upstream version of solaar is needed. As there are no version steps for a long time I named this one master and kept the existing solaar package which tracks releases.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@@ -0,0 +1,42 @@
{fetchFromGitHub, stdenv, gtk3, python34Packages, gobjectIntrospection}:
python34Packages.buildPythonApplication rec {
name = "solaar-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

the name part should be solaar-unstable and the version part should be the date, YYYY-MM-DD
https://nixos.org/nixpkgs/manual/#sec-package-naming

Copy link
Member

Choose a reason for hiding this comment

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

Given the age of the current release it might be better to upgrade the current stable package to master rather maintaining two packages.

Copy link
Member Author

Choose a reason for hiding this comment

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

thats what I thought as well
would we go and remove that stable package or alter it to point to the master branch?

Copy link
Member

Choose a reason for hiding this comment

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

Just point it to master.

propagatedBuildInputs = [python34Packages.pygobject3 python34Packages.pyudev gobjectIntrospection gtk3];
postInstall = ''
wrapProgram "$out/bin/solaar" \
--prefix PYTHONPATH : "$PYTHONPATH" \
Copy link
Member

Choose a reason for hiding this comment

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

--set PYTHONPATH typically has preference, since otherwise you may break your application if you have some PYTHONPATH set.

Copy link
Member Author

Choose a reason for hiding this comment

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

do you mean

wrapProgram "$out/bin/solaar" \
    --set PYTHONPATH : "$PYTHONPATH" \

?

@matthewbauer
Copy link
Member

I would say that we should just replace the old version with this. We don't want to duplicate packages more than already is done. Very weird that they have not made a release though. Maybe open an issue about it?

src = fetchFromGitHub {
owner = "pwr";
repo = "Solaar";
rev = "master";
Copy link
Member

Choose a reason for hiding this comment

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

This should be a tag or commit that will not change. This hash will change each time with master.

@ryantm
Copy link
Member

ryantm commented Aug 8, 2018

@GrahamcOfBorg build solaar

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: solaar

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: solaar

Partial log (click to expand)

reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'share/locale'
writing manifest file 'lib/solaar.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/svjjfvq6a55nvgl8glxmdhy82di9iims-solaar-unstable-2018-02-02

@ryantm
Copy link
Member

ryantm commented Aug 8, 2018

Looks like there is some recent talk of forking the project pwr-Solaar/Solaar#407

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: solaar

Partial log (click to expand)

reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'share/locale'
writing manifest file 'lib/solaar.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/i1yqmwf3637naq9bjpilxws3k4chvr4c-solaar-unstable-2018-02-02

@ysndr
Copy link
Member Author

ysndr commented Aug 8, 2018

@ryantm
That's interesting, I haven't noticed that issue. But until the fork is made I think we should include solaar as it is, what do you think?

@ryantm ryantm merged commit 122c5f9 into NixOS:master Aug 8, 2018
@ryantm
Copy link
Member

ryantm commented Aug 8, 2018

Sure. I squashed and merged it.

@Ericson2314 Ericson2314 removed their request for review August 8, 2018 19:21
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

6 participants