-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
68 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,25 @@ | ||
{ | ||
self, | ||
nixpkgs, | ||
}: final: prev: | ||
with final.pkgs.stdenv; let | ||
# XXX: The nixos-22.11 rustPlatform is too old to build this. | ||
#TODO: We should use final.pkgs.rustPlatform when NixOS 23.05 has been released. | ||
pkgs = import nixpkgs {inherit (final.pkgs) system;}; | ||
rustPlatform = pkgs.rustPlatform; | ||
{self}: final: prev: let | ||
pkgs = prev; | ||
lib = final.lib; | ||
|
||
tuxedo-rs = with pkgs.lib; let | ||
tuxedo-rs = pkgs.tuxedo-rs.overrideAttrs (oa: { | ||
src = self; | ||
in | ||
rustPlatform.buildRustPackage { | ||
pname = "tuxedo-rs"; | ||
inherit ((importTOML "${src}/tailord/Cargo.toml").package) version; | ||
|
||
inherit src; | ||
|
||
doCheck = false; | ||
|
||
cargoLock = { | ||
lockFile = self + "/Cargo.lock"; | ||
}; | ||
|
||
postInstall = '' | ||
mkdir -p $out/share/dbus-1/system.d | ||
cp ${self}/tailord/com.tux.Tailor.conf $out/share/dbus-1/system.d | ||
''; | ||
|
||
meta = with final.lib; { | ||
description = "Daemon handling fan, keyboard and general HW support for Tuxedo laptops (part of tuxedo-rs)"; | ||
homepage = "https://github.com/AaronErhardt/tuxedo-rs"; | ||
license = licenses.gpl2Only; | ||
}; | ||
}; | ||
|
||
tailor_gui = with pkgs.lib; let | ||
src = builtins.path { | ||
path = self + "/tailor_gui"; | ||
name = "tailor_gui"; | ||
version = ((lib.importTOML "${self}/tailord/Cargo.toml").package).version; | ||
cargoDeps = pkgs.rustPlatform.importCargoLock { | ||
lockFile = self + "/Cargo.lock"; | ||
}; | ||
in | ||
mkDerivation { | ||
name = "tailor_gui"; | ||
}); | ||
|
||
inherit ((importTOML (src + "/Cargo.toml")).package) version; | ||
|
||
inherit src; | ||
|
||
cargoDeps = rustPlatform.importCargoLock { | ||
lockFile = self + "/tailor_gui/Cargo.lock"; | ||
}; | ||
|
||
nativeBuildInputs = with rustPlatform; | ||
[ | ||
rust.cargo | ||
rust.rustc | ||
cargoSetupHook | ||
] | ||
++ (with pkgs; [ | ||
pkg-config | ||
desktop-file-utils | ||
appstream-glib | ||
makeWrapper | ||
]); | ||
|
||
buildInputs = with pkgs; [ | ||
meson | ||
ninja | ||
libadwaita | ||
gtk4 | ||
]; | ||
|
||
postFixup = '' | ||
wrapProgram $out/bin/tailor_gui --set XDG_DATA_DIRS "$out/share/gsettings-schemas/tailor_gui" | ||
''; | ||
tailor-gui = pkgs.tailor-gui.overrideAttrs (oa: { | ||
src = self; | ||
version = ((lib.importTOML "${self}/tailor_gui/Cargo.toml").package).version; | ||
cargoDeps = pkgs.rustPlatform.importCargoLock { | ||
lockFile = self + "/tailor_gui/Cargo.lock"; | ||
}; | ||
}); | ||
in { | ||
inherit | ||
tuxedo-rs | ||
tailor_gui | ||
tailor-gui | ||
; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.