Compare commits

...

5 Commits

Author SHA1 Message Date
af116224d4 Fix up usb-drivers
It still won't build on macOS, because of impure iconutils.
2024-12-04 18:26:48 +01:00
7e488f71f8 Update dependencies 2024-11-25 06:56:42 +01:00
dd3dca74c0 Update xK 2024-11-25 06:48:34 +01:00
742455838e Add a helpful comment 2024-11-25 06:23:32 +01:00
ac7a789e5e Fix/+/- desktop-tools/usb-drivers/razer-bw-te-ctl 2024-11-25 06:15:43 +01:00
5 changed files with 17 additions and 10 deletions

View File

@@ -3,6 +3,8 @@
# in all available configurations--Nix introspection is a bit complicated, # in all available configurations--Nix introspection is a bit complicated,
# so they're listed explicitly. # so they're listed explicitly.
# In case of stale checkouts: rm -rf ~/.cache/nix
build() { build() {
echo "$(tput bold)-- Building $*$(tput sgr0)" echo "$(tput bold)-- Building $*$(tput sgr0)"
nix-build --arg local ${LOCAL:-false} "$@" nix-build --arg local ${LOCAL:-false} "$@"

View File

@@ -43,13 +43,9 @@ pkgs.stdenv.mkDerivation rec {
ref = "master"; ref = "master";
}; };
# It's a weird mess, gdm.pc.in includes the subdirectory in includedir.
patchPhase = ''
sed -i 's|gdm-user-switching.h>|gdm/&|' gdm-switch-user.c
'';
cmakeFlags = [ cmakeFlags = [
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system" "-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
"-DSETUID="
]; ];
doCheck = true; doCheck = true;

View File

@@ -13,7 +13,7 @@ pkgs.stdenv.mkDerivation rec {
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
libusb libusb1
] ++ lib.optionals full [ ] ++ lib.optionals full [
gtk3 gtk3

View File

@@ -3,17 +3,20 @@
, full ? true , full ? true
}: }:
pkgs.stdenv.mkDerivation rec { pkgs.stdenv.mkDerivation rec {
pname = "razer-bw-te-ctl"; pname = "usb-drivers";
version = "master"; version = "master";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
cmake cmake
pkg-config pkg-config
help2man help2man
] ++ lib.optionals stdenv.isDarwin [
librsvg
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
libusb libusb1
hidapi
]; ];
src = if local then src = if local then
@@ -28,10 +31,14 @@ pkgs.stdenv.mkDerivation rec {
ref = "master"; ref = "master";
}; };
cmakeFlags = [
"-DSETUID="
];
doCheck = true; doCheck = true;
meta = with pkgs.lib; { meta = with pkgs.lib; {
description = "Razer BlackWidow Tournament Edition control utility"; description = "User space USB drivers";
homepage = "https://git.janouch.name/p/${pname}"; homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all; platforms = platforms.all;
license = licenses.bsd0; license = licenses.bsd0;

View File

@@ -63,7 +63,7 @@ pkgs.stdenv.mkDerivation rec {
modRoot = "./${_pname}/"; modRoot = "./${_pname}/";
# vendorHash = pkgs.lib.fakeHash; # vendorHash = pkgs.lib.fakeHash;
vendorHash = "sha256-TK3rivjzYZwG8bfia22iQO5ZKnBzeIidsHNl6jnQUio="; vendorHash = "sha256-feaUOP+joGnpjqniCtstRGHwcMyGNZ95PwEXWzjmjIk=";
mithril = pkgs.fetchurl { mithril = pkgs.fetchurl {
url = "https://unpkg.com/mithril@2.2.3/mithril.js"; url = "https://unpkg.com/mithril@2.2.3/mithril.js";
@@ -129,6 +129,8 @@ pkgs.stdenv.mkDerivation rec {
''; '';
}; };
# Ignoring xA, as it is huge, and already checked through CI.
# While we can't include them in this derivation, we can link to them. # While we can't include them in this derivation, we can link to them.
postInstall = pkgs.lib.optionals full '' postInstall = pkgs.lib.optionals full ''
makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public