From c9e2bc6920c01684b3fd4a7724716ba730bfa903 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Tue, 26 Sep 2023 23:26:47 +0200 Subject: [PATCH] tuxedo-rs: init at 0.2.2 --- pkgs/os-specific/linux/tailor-gui/default.nix | 60 +++++++++++++++++++ pkgs/os-specific/linux/tuxedo-rs/default.nix | 47 +++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 111 insertions(+) create mode 100644 pkgs/os-specific/linux/tailor-gui/default.nix create mode 100644 pkgs/os-specific/linux/tuxedo-rs/default.nix diff --git a/pkgs/os-specific/linux/tailor-gui/default.nix b/pkgs/os-specific/linux/tailor-gui/default.nix new file mode 100644 index 000000000000..86964ab4d36a --- /dev/null +++ b/pkgs/os-specific/linux/tailor-gui/default.nix @@ -0,0 +1,60 @@ +{ stdenv +, lib +, rustPlatform +, cargo +, rustc +, pkg-config +, desktop-file-utils +, appstream-glib +, wrapGAppsHook4 +, meson +, ninja +, libadwaita +, gtk4 +, tuxedo-rs +}: +let + src = tuxedo-rs.src; + sourceRoot = "source/tailor_gui"; + pname = "tailor_gui"; + version = tuxedo-rs.version; +in +stdenv.mkDerivation { + + inherit src sourceRoot pname version; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src sourceRoot; + name = "${pname}-${version}"; + hash = "sha256-DUaSLv1V6skWXQ7aqD62uspq+I9KiWmjlwwxykVve5A="; + }; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + pkg-config + desktop-file-utils + appstream-glib + wrapGAppsHook4 + ]; + + buildInputs = [ + cargo + rustc + meson + ninja + libadwaita + gtk4 + ]; + + meta = with lib; { + description = "Rust GUI for interacting with hardware from TUXEDO Computers"; + longDescription = '' + An alternative to the TUXEDO Control Center (https://www.tuxedocomputers.com/en/TUXEDO-Control-Center.tuxedo), + written in Rust. + ''; + homepage = "https://github.com/AaronErhardt/tuxedo-rs"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ mrcjkb ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/tuxedo-rs/default.nix b/pkgs/os-specific/linux/tuxedo-rs/default.nix new file mode 100644 index 000000000000..c9fb057da68b --- /dev/null +++ b/pkgs/os-specific/linux/tuxedo-rs/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, rustPlatform +}: +let + + # NOTE: This src is shared with tailor-gui. + # When updating, the tailor-gui.cargoDeps hash needs to be updated. + src = fetchFromGitHub { + owner = "AaronErhardt"; + repo = "tuxedo-rs"; + rev = "a77a9f6c64e6dd1ede3511934392cbc16271ef6b"; + hash = "sha256-bk17vI1gLHayvCWfmZdCMqgmbJFOTDaaCaHcj9cLpMY="; + }; + +in +rustPlatform.buildRustPackage { + pname = "tuxedo-rs"; + version = "0.2.2"; + + inherit src; + + # Some of the tests are impure and rely on files in /etc/tailord + doCheck = false; + + cargoHash = "sha256-vuXqab9W8NSD5U9dk15xM4fM/vd/fGgGdsvReMncWHg="; + + postInstall = '' + install -Dm444 tailord/com.tux.Tailor.conf -t $out/share/dbus-1/system.d + ''; + + meta = with lib; { + description = "Rust utilities for interacting with hardware from TUXEDO Computers"; + longDescription = '' + An alternative to the TUXEDO Control Center daemon. + + Contains the following binaries: + - tailord: Daemon handling fan, keyboard and general HW support for Tuxedo laptops + - tailor: CLI + ''; + homepage = "https://github.com/AaronErhardt/tuxedo-rs"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ mrcjkb ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4775683e3a6c..0c995a9173bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35862,6 +35862,8 @@ with pkgs; tailor = callPackage ../applications/version-management/tailor { }; + tailor-gui = callPackage ../os-specific/linux/tailor-gui { }; + taizen = callPackage ../applications/misc/taizen { }; talosctl = callPackage ../applications/networking/cluster/talosctl { }; @@ -36192,6 +36194,8 @@ with pkgs; tut = callPackage ../applications/misc/tut { }; + tuxedo-rs = callPackage ../os-specific/linux/tuxedo-rs { }; + tuxguitar = callPackage ../applications/editors/music/tuxguitar { jre = jre8; swt = swt_jdk8;