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
Conversation
|
||
buildInputs = [ glib python pygobject3 makeWrapper gobjectIntrospection networkmanager ]; | ||
|
||
phases = "unpackPhase installPhase"; |
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 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})" |
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.
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"; |
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 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 = [ ]; |
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.
Do you want to maintain this package?
Please also change the commit title as I did with the pull request. |
Apologies for all the commits. Should be fine now. |
Is something missing? |
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"; |
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 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.)
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 am open to your suggestion. I thought having the version defining the unstable state is what the previous suggestion was.
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.
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.
Hi @7c6f434c, I wasn't sure what the best practice is. Next time I will force pull. Thank you for mentioning this. |
727ee05
to
4c6d267
Compare
Motivation for this change
networkmanager_dmenu let yoy control NetworkManager via dmenu. This wasn't available in the nixpkgs yet.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)