nixpkgs/pkgs/by-name/tu/tuxedo-rs/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

52 lines
1.4 KiB
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, testers
, tuxedo-rs
}:
rustPlatform.buildRustPackage rec {
pname = "tuxedo-rs";
version = "0.3.1";
# 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 = "tailor-v${version}";
hash = "sha256-+NzwUs8TZsA0us9hI1UmEKdiOo9IqTRmTOHs4xmC7MY=";
};
# Some of the tests are impure and rely on files in /etc/tailord
doCheck = false;
cargoHash = "sha256-HtyCKQ0xDIXevgr4FAnVJcDI8G6vR9fLHFghe9+ADiU=";
passthru.tests.version = testers.testVersion {
package = tuxedo-rs;
command = "${meta.mainProgram} --version";
version = version;
};
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 xaverdh ];
platforms = platforms.linux;
mainProgram = "tailor";
};
}