-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
tiny-dfr: init at 0.2.0 #277549
tiny-dfr: init at 0.2.0 #277549
Conversation
Thanks for packaging! How are you using this? I get this: $ sudo /tmp/tmp.Xx745C5nhu/result/bin/tiny-dfr
thread 'main' panicked at src/main.rs:314:43:
called `Result::unwrap()` on an `Err` value: No touchbar device found, attempted: [
/dev/dri/card2: Device or resource busy (os error 16),
/dev/dri/card1: Operation not supported (os error 95),
/dev/dri/card0: Device or resource busy (os error 16)
]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Others seem to be having trouble too: https://github.com/WhatAmISupposedToPutHere/tiny-dfr/issues |
I just tried building the package on my |
Interesting, im using the same year and model also on nixos-silicon. Are you just running the binary like I did above? From a graphical session? If so, what DE are you on? Wayland? Thanks for any details you can provide. |
nativeBuildInputs = [ pkg-config ]; | ||
buildInputs = [ cairo gdk-pixbuf glib libinput libxml2 pango udev ]; | ||
|
||
postConfigure = '' |
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.
postConfigure = '' | |
postPatch = '' |
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.
Why? I think this makes more semantic sense in configurePhase, since that's where build systems (when they actually support it like autoconf, cmake or meson, and unlike cargo) will do this sort of substitution based on configuration.
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.
Well, it's kinda a patch, so it should live in patchPhase
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.
is this blocking an addition of this pkg? I would personally go with patch phase since there is no real support for configuration upstream, however I don't think it's really essential
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.
There's no real support for patching upstream either, but the fact is that we have a configure phase, and replacing placeholder paths with environment-specific ones is exactly what the configure phase is for. I don't intend to change it.
@n8henrie I am using Hyprland. Interestingly enough I switched over to Heres what I did nix-build -A tiny-dfr
cd result/bin
sudo ./tiny-dfr |
Ok, thanks. I'm on plasma (wayland). I've been trying to get Hyprland to work but have been unable (tpwrules/nixos-apple-silicon#159 tpwrules/nixos-apple-silicon#136) |
@n8henrie a workaround was recently discovered. You should be able to get it working by adding the following to your nix config. environment.variables = {
WLR_DRM_DEVICES = "/dev/dri/card0";
}; |
@thedaringdev yes, I saw that thread! I'm excited to give it a shot the next time I reboot into NixOS (still mostly MacOS + nix-darwin on this machine). Thanks for making sure I had heard the good news. |
3177e36
to
a165e27
Compare
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.
can confirm it works perfectly for me on m2 pro with following config:
{ lib, pkgs, config, inputs, ... }:
{
options.services.tiny-dfr.enable = lib.mkEnableOption "tiny-dfr";
config = lib.mkIf config.services.tiny-dfr.enable (let
tiny-dfr = inputs.nixpkgs-alyssais.legacyPackages.aarch64-linux.tiny-dfr;
in {
environment.systemPackages = [ tiny-dfr ];
systemd.packages = [ tiny-dfr ];
services.udev.packages = [ tiny-dfr ];
environment.etc."tiny-dfr/screenshot.svg".text = ''
...some new svg
'';
environment.etc."tiny-dfr/config.toml".text = ''
...some tweaks
'';
});
}
Any updates on this? |
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.