NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.38k stars 13.61k forks source link

iio-sensor-proxy #192978

Closed huantianad closed 7 months ago

huantianad commented 1 year ago
Checklist
Project name

nix search name: iio-sensor-proxy

current version: 3.0 desired version: 3.4

Notify maintainers

maintainers: @peterhoeg

Note for maintainers

Please tag this issue in your PR.

peterhoeg commented 1 year ago

I unfortunately no longer have hardware that works with iio-sensor-proxy, so I have no way of testing out a new version.

PJungkamp commented 1 year ago

I got iio-sensor-proxy working on the latest version. I'm still somewhat new to Nix, but here is what changed from 3.0 to 3.4.

Here's my overlay which I used to make it work:

final: prev: {
  iio-sensor-proxy = prev.iio-sensor-proxy.overrideAttrs (finalAttrs: prevAttrs: rec {
    version = "3.4";
    src = final.fetchFromGitLab {
      domain = "gitlab.freedesktop.org";
      owner = "hadess";
      repo = "iio-sensor-proxy";
      rev = version;
      sha256 = "sha256-O1rob/LVjNNY4F0d/Z9h8ZO7gVHZR8fvRhPpZ6GcyX0=";
    };
    patchPhase = ''
      sed -i "s|^polkit_policy_directory = .*\$|polkit_policy_directory = '$out/share/polkit-1/actions'|" meson.build
    '';
    configurePhase = null;
    mesonFlags = [
      "-Dudevrulesdir=${placeholder "out"}/lib/udev"
      "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
    ];
    nativeBuildInputs = with final; [
      pkg-config
      meson
      ninja
    ];
    buildInputs = with final; [
      glib
      libgudev
      polkit
      systemd
    ];
  });
}
wrenix commented 8 months ago

@PJungkamp do you like to create an pullrequest ?

applePrincess commented 7 months ago

Close this as at be9851316f0ce73f2404a20e376cec886f239aeb, iio-sensor-proxy has version 3.5.