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
autorandr: 59f6aec0b -> 53d29f9 #20744
Conversation
LGTM from a explanation point of view. Have not reviewed the code.
…On Sat, Nov 26, 2016 at 3:47 PM Mention Bot ***@***.***> wrote:
@kampka <https://github.com/kampka>, thanks for your PR! By analyzing the
history of the files in this pull request, we identified @coroa
<https://github.com/coroa>, @grahamc <https://github.com/grahamc> and
@rycee <https://github.com/rycee> to be potential reviewers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20744 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAErrNSLJ0MLn4RjDo1FNASBDz_V0md0ks5rCJrQgaJpZM4K8_NL>
.
|
Haven't had time to look at this but at some point I used the Python branch myself and this was the expression I used: { stdenv, fetchFromGitHub, python3Packages, xrandr }:
stdenv.mkDerivation rec {
name = "autorandr-${version}";
version = "20160509";
src = fetchFromGitHub {
owner = "phillipberndt";
repo = "autorandr";
rev = "6cd92b657027423721a29dfe0c7080483cdfc81e";
sha256 = "01m8q8jqz8jmvsfpw1jb13yc11wrfim9hj7c496advp21krj7ynz";
};
buildInputs = [ python3Packages.python python3Packages.wrapPython ];
patchPhase = ''
substituteInPlace autorandr.py \
--replace "popen(\"xrandr" "popen(\"${xrandr}/bin/xrandr" \
--replace "\"xrandr\"" "\"${xrandr}/bin/xrandr\""
'';
installPhase = ''
mkdir -p $out/bin $out/etc/bash_completion.d
cp -v contrib/bash_completion/autorandr $out/etc/bash_completion.d
cp -v autorandr.py $out/bin/autorandr
wrapPythonPrograms
'';
meta = with stdenv.lib; {
description = "Automatic display configuration selector based on connected devices";
homepage = https://github.com/phillipberndt/autorandr/;
maintainers = [ maintainers.coroa ];
license = licenses.gpl3Plus;
};
} I don't know how relevant it is now but maybe there is something of interest to have there? I notice, for example, that the bash completion is not installed in this proposed PR. Also, since the package is built from a git revision and not a formal release I believe the name should include "unstable" , i.e., |
''; | ||
|
||
src = fetchgit { |
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.
fetchFromGitHub is preferred here.
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.
Done.
mkdir -p $out/bin $out/libexec | ||
cp autorandr.py $out/libexec | ||
makeWrapper "${python.interpreter} $out/libexec/autorandr.py" $out/bin/autorandr \ | ||
--prefix PYTHONPATH : "$PYTHONPATH" |
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.
Looks like a job for wrapPythonProgramsIn
.
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.
Changed to wrapPythonProgramsIn.
cee661d
to
eb8dc60
Compare
@rycee Thanks for sharing your expression, it was very useful. I am aware of the naming policy, but I am unsure how renaming the derivation will impact the upgrade path. |
eb8dc60
to
4bf2e1c
Compare
@kampka if you mean the unstable prefix. you can change it without breaking anything. |
4bf2e1c
to
dcc2bfd
Compare
@Mic92 Alright, done. |
@kampka you have not uploaded any updates so far. |
@Mic92 I have squashed the commits, sorry if that confuses the process. Anyways, I noticed there is still an issue with the python version that I am having trouble fixing. [1] https://github.com/phillipberndt/autorandr/blob/master/autorandr.py#L791 |
@kampka ok usually github rendered such changes differently. |
Upgrading of imperatively installed programs (
Use |
Ping? |
Motivation for this change
This PR changes autorandr to the python branch of phillipberndt's for of autorandr.
The main reason for this is that the legacy branch seems to no longer work with a current version of xrandr, resulting in an
failed to parse 'x' as a position
error when trying to apply a profile.In addition, disper support, the reason I believe for using the legacy branch, is no longer valid as disper itself does not support nvidia drivers of version >= 300 as of version 0.3.1 with the reasoning that those drivers support xrandr. Xrandr support however in incomplete in disper, making it effectively defunct on non-legacy hardware.
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/
)