summary refs log tree commit diff
path: root/pkgs/os-specific/linux/system76-power
diff options
context:
space:
mode:
authorJasper Woudenberg <mail@jasperwoudenberg.com>2021-06-12 11:35:19 +0200
committerJasper Woudenberg <mail@jasperwoudenberg.com>2021-06-13 22:11:42 +0200
commit04d20258ea8945b644fc54188291b4c31269e162 (patch)
treef860ebce9647ba73d53f6cf821c80eecac3cbeba /pkgs/os-specific/linux/system76-power
parentb94e1977e0c89060d3ba63bbfa6372e0f0d231b3 (diff)
downloadnixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar.gz
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar.bz2
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar.lz
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar.xz
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.tar.zst
nixpkgs-04d20258ea8945b644fc54188291b4c31269e162.zip
system76-power: init at 1.1.16
Diffstat (limited to 'pkgs/os-specific/linux/system76-power')
-rw-r--r--pkgs/os-specific/linux/system76-power/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/system76-power/default.nix b/pkgs/os-specific/linux/system76-power/default.nix
new file mode 100644
index 00000000000..fbc26ca8719
--- /dev/null
+++ b/pkgs/os-specific/linux/system76-power/default.nix
@@ -0,0 +1,30 @@
+{ pkg-config, libusb1, dbus, lib, rustPlatform, fetchFromGitHub }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "system76-power";
+  version = "1.1.16";
+
+  src = fetchFromGitHub {
+    owner = "pop-os";
+    repo = "system76-power";
+    rev = version;
+    sha256 = "sha256-OtrhvUkNNgg6KlrqjwiBKL4zuQZBWevb0xgtSlEW2rQ=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ dbus libusb1 ];
+
+  cargoSha256 = "sha256-ImACDbnUbwc0ZXgF3xxzes8+vUjt76B1xxgqzhgAYX4=";
+
+  postInstall = ''
+    install -D -m 0644 data/system76-power.conf $out/etc/dbus-1/system.d/system76-power.conf
+  '';
+
+  meta = with lib; {
+    description = "System76 Power Management";
+    homepage = "https://github.com/pop-os/system76-power";
+    license = licenses.gpl3Plus;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = [ maintainers.jwoudenberg ];
+  };
+}