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

autorandr: embed path to xrandr #35314

Merged
merged 1 commit into from Feb 22, 2018
Merged

autorandr: embed path to xrandr #35314

merged 1 commit into from Feb 22, 2018

Conversation

ghost
Copy link

@ghost ghost commented Feb 22, 2018

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
    • 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/)
  • Fits CONTRIBUTING.md.

@ghost ghost mentioned this pull request Feb 22, 2018
7 tasks
@dotlambda
Copy link
Member

What's the benefit?

@ghost
Copy link
Author

ghost commented Feb 22, 2018

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Btw, there's a wrapPython in the expression that isn't used anywhere.

@ghost
Copy link
Author

ghost commented Feb 22, 2018

@dotlambda Fixed, thanks!

@adisbladis
Copy link
Member

@GrahamcOfBorg build autorandr

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

    udevadm control --reload-rules

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4/lib  /nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4/bin 
patching script interpreter paths in /nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4
/nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4/bin/autorandr: interpreter directive changed from "/usr/bin/env python" to "/nix/store/p1bp0kpmxi7nzrla7n7c4waqic0a2myk-python3-3.6.4/bin/python"
checking for references to /tmp/nix-build-autorandr-1.4.drv-0 in /nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4...
/nix/store/2parkw6k0idq8bmja2yzxz7mmsplgn9a-autorandr-1.4

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

    udevadm control --reload-rules

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4/lib  /nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4/bin
patching script interpreter paths in /nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4
/nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4/bin/autorandr: interpreter directive changed from "/usr/bin/env python" to "/nix/store/9yr86q335k2k5ccznfcxsw0dq11zrwsw-python3-3.6.4/bin/python"
checking for references to /build in /nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4...
/nix/store/8xkyd70rdbrsxv96cwr64jzpr85ssqhh-autorandr-1.4

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

error: while evaluating the attribute 'installPhase' of the derivation 'autorandr-1.4' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix:148:11:
while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/all-packages.nix:13698:13:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:117:8:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/systemd/default.nix:1:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:74:12:
assertion failed at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/systemd/default.nix:13:1

@adisbladis
Copy link
Member

Thank you!

version = "1.4";
in
stdenv.mkDerivation {
name = "autorandr-${version}";

buildInputs = [ python ];
nativeBuildInputs = [ makeWrapper ];

# no wrapper, as autorandr --batch does os.environ.clear()
Copy link
Member

Choose a reason for hiding this comment

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

Not environ.clear, but it inherits PATH from other processes running in x11 sessions, as I discovered later.

@ghost ghost deleted the autorandr branch February 22, 2018 15:40
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

4 participants