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

networkmanager_dmenu: init at unstable-2017-04-13 #23321

Merged
merged 2 commits into from May 1, 2017

Conversation

jensbin
Copy link
Contributor

@jensbin jensbin commented Mar 1, 2017

Motivation for this change

networkmanager_dmenu let yoy control NetworkManager via dmenu. This wasn't available in the nixpkgs yet.

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 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.

@jensbin jensbin changed the title Adding networkmanager_dmenu networkmanager_dmenu: new Mar 1, 2017

buildInputs = [ glib python pygobject3 makeWrapper gobjectIntrospection networkmanager ];

phases = "unpackPhase installPhase";
Copy link
Member

Choose a reason for hiding this comment

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

This probably skip more build phases you want. Does dontBuild = true also works here?

cp networkmanager_dmenu $out/bin/
wrapProgram $out/bin/networkmanager_dmenu \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})"
Copy link
Member

@Mic92 Mic92 Mar 1, 2017

Choose a reason for hiding this comment

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

pythonPackages.wrapPython is usually preferred here: you can take a look at pkgs/tools/bluetooth/blueman/default.nix on how to use it.

let inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
name = "networkmanager_dmenu-${version}";
version = "git-20170301";
Copy link
Member

@Mic92 Mic92 Mar 1, 2017

Choose a reason for hiding this comment

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

Please use networkmanager_dmenu-unstable-<commit_date> (example: networkmanager_dmenu-unstable-2014-09-23) for unstable packages here.
(Side note for other maintainers: The package maintainer seems to be not eager to do regularly releases. He maintains a git-based Archlinux package.)

description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet";
homepage = https://github.com/firecat53/networkmanager-dmenu;
license = stdenv.lib.licenses.mit;
maintainers = [ ];
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to maintain this package?

@Mic92 Mic92 changed the title networkmanager_dmenu: new networkmanager_dmenu: init at 2017-02-18 Mar 1, 2017
@Mic92 Mic92 changed the title networkmanager_dmenu: init at 2017-02-18 networkmanager_dmenu: init at unstable-2017-02-18 Mar 1, 2017
@Mic92
Copy link
Member

Mic92 commented Mar 1, 2017

Please also change the commit title as I did with the pull request.

@jensbin
Copy link
Contributor Author

jensbin commented Mar 4, 2017

Apologies for all the commits. Should be fine now.

@jensbin
Copy link
Contributor Author

jensbin commented Mar 8, 2017

Is something missing?

@jensbin jensbin changed the title networkmanager_dmenu: init at unstable-2017-02-18 networkmanager_dmenu: init at unstable-2017-04-01 Apr 5, 2017
@jensbin jensbin changed the title networkmanager_dmenu: init at unstable-2017-04-01 networkmanager_dmenu: init at unstable-2017-04-13 Apr 15, 2017
@7c6f434c
Copy link
Member

Do you know you can force-push to the PR branch? 10 commits for a simple package addition does seem a bit excessive,

let inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
name = "networkmanager_dmenu-${version}";
version = "unstable-2017-04-13";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't want to get into the package naming / versioning, but I'd just like to point out that Nix (as in "nix-env -u pkg") will see this as name=networkmanager_dmenu-unstable, version=2017-04-13. So you might want to move that "unstable" string into the name attribute, so that Nix and the attributes agree with each other.

(Nix doesn't look at the version attribute, it parses version info from the package name.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am open to your suggestion. I thought having the version defining the unstable state is what the previous suggestion was.

Copy link
Member

Choose a reason for hiding this comment

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

Technically the other suggestion did not say whether unstable is a part of the version, it was just that it is desired in the resulting derivation name.

@jensbin
Copy link
Contributor Author

jensbin commented May 1, 2017

Hi @7c6f434c, I wasn't sure what the best practice is. Next time I will force pull. Thank you for mentioning this.

@7c6f434c 7c6f434c merged commit ee790bf into NixOS:master May 1, 2017
@jensbin jensbin deleted the networkmanager_dmenu branch May 1, 2017 17:33
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