Compare commits

...

14 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
af24a4ea4c Update xK 2024-04-03 16:17:08 +02:00
9bf1b20046 Update hex 2024-02-10 11:21:32 +01:00
87588c12cd Update nncmpp 2024-02-10 10:11:48 +01:00
b72b93128b Fix filetype filtering in fiv 2024-01-11 19:02:24 +01:00
02f1912055 Fix missing icons 2024-01-11 18:26:06 +01:00
e747c8f084 Avoid using Swift on Linux 2023-07-06 06:42:48 +02:00
d460bbda07 Add razer-bw-te-ctl 2023-07-05 00:42:08 +02:00
8e0826b8b3 Update xK 2023-07-04 23:23:45 +02:00
8a97713fa1 Avoid uppercase letters in derivation names 2023-07-04 22:33:23 +02:00
10 changed files with 121 additions and 17 deletions

View File

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

View File

@@ -43,13 +43,9 @@ pkgs.stdenv.mkDerivation rec {
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 = [
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
"-DSETUID="
];
doCheck = true;

View File

@@ -20,9 +20,11 @@ pkgs.stdenv.mkDerivation rec {
];
buildInputs = with pkgs; [
gnome.adwaita-icon-theme
gtk3
libwebp
libraw
shared-mime-info
# WIP
libepoxy
@@ -74,8 +76,13 @@ pkgs.stdenv.mkDerivation rec {
"-Dresvg=enabled"
];
# See nixpkgs commit b1e73fa2e086f1033a33d93524ae2a1781d12b95 about icons.
# It might make sense to name {hicolor,gnome.adwaita}-icon-theme/share
# explicitly, to limit undesired dependencies.
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
--prefix XDG_DATA_DIRS : "${pkgs.shared-mime-info}/share"
--prefix PATH : $out/bin:${pkgs.lib.makeBinPath [ pkgs.exiftool ]}
)
'';

View File

@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
# Tests
desktop-file-utils
] ++ lib.optionals full [
librsvg
];
buildInputs = with pkgs; [
@@ -28,6 +30,7 @@ pkgs.stdenv.mkDerivation rec {
] ++ lib.optionals full [
lua5_3
libpng
xorg.libXft
xorg.libXau
xorg.libXdmcp

View File

@@ -12,6 +12,8 @@ pkgs.stdenv.mkDerivation rec {
go
nodejs
] ++ lib.optionals stdenv.isDarwin [
# This was broken on Linux.
swift
];

View File

@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
];
buildInputs = with pkgs; [
gnome.adwaita-icon-theme
gtk3
json-glib
lua5_2
@@ -53,6 +54,15 @@ pkgs.stdenv.mkDerivation rec {
"-DBUILD_TESTING=ON"
];
# See nixpkgs commit b1e73fa2e086f1033a33d93524ae2a1781d12b95 about icons.
# It might make sense to name {hicolor,gnome.adwaita}-icon-theme/share
# explicitly, to limit undesired dependencies.
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
)
'';
doCheck = true;
checkPhase = with pkgs; ''

View File

@@ -13,6 +13,8 @@ pkgs.stdenv.mkDerivation rec {
# Tests
libxml2
desktop-file-utils
] ++ lib.optionals full [
librsvg
];
buildInputs = with pkgs; [
@@ -30,6 +32,7 @@ pkgs.stdenv.mkDerivation rec {
] ++ lib.optionals full [
fftw
fftwSinglePrec
libpng
libpulseaudio
xorg.libXft
xorg.libXau

View File

@@ -13,7 +13,7 @@ pkgs.stdenv.mkDerivation rec {
];
buildInputs = with pkgs; [
libusb
libusb1
] ++ lib.optionals full [
gtk3
@@ -54,4 +54,3 @@ pkgs.stdenv.mkDerivation rec {
license = licenses.bsd0;
};
}

46
usb-drivers-master.nix Normal file
View File

@@ -0,0 +1,46 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "usb-drivers";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
help2man
] ++ lib.optionals stdenv.isDarwin [
librsvg
];
buildInputs = with pkgs; [
libusb1
hidapi
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DSETUID="
];
doCheck = true;
meta = with pkgs.lib; {
description = "User space USB drivers";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

View File

@@ -3,7 +3,9 @@
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "xK";
_pname = "xK";
pname = pkgs.lib.strings.toLower _pname;
_version = pkgs.lib.strings.fileContents (src + "/xK-version");
version = "master";
nativeBuildInputs = with pkgs; [
@@ -37,12 +39,12 @@ pkgs.stdenv.mkDerivation rec {
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
path = ../${_pname}/git;
name = "${_pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
url = "https://git.janouch.name/p/${_pname}.git";
submodules = true;
ref = "master";
};
@@ -55,12 +57,13 @@ pkgs.stdenv.mkDerivation rec {
];
xP = pkgs.buildGoModule rec {
pname = "xP";
_pname = "xP";
pname = pkgs.lib.strings.toLower _pname;
inherit version src doCheck meta;
modRoot = "./${pname}/";
modRoot = "./${_pname}/";
# vendorHash = pkgs.lib.fakeHash;
vendorHash = "sha256-TK3rivjzYZwG8bfia22iQO5ZKnBzeIidsHNl6jnQUio=";
vendorHash = "sha256-feaUOP+joGnpjqniCtstRGHwcMyGNZ95PwEXWzjmjIk=";
mithril = pkgs.fetchurl {
url = "https://unpkg.com/mithril@2.2.3/mithril.js";
@@ -85,22 +88,55 @@ pkgs.stdenv.mkDerivation rec {
};
xS = pkgs.buildGoModule rec {
pname = "xS";
_pname = "xS";
pname = pkgs.lib.strings.toLower _pname;
inherit version src doCheck meta;
modRoot = "./${pname}/";
modRoot = "./${_pname}/";
vendorHash = null;
# This invokes a premature build that may miss compiler flags.
preBuild = ''
make
'';
ldflags = [ "-X 'main.projectVersion=${_version}'" ];
postInstall = ''
mkdir -p $out/share/man/man1
mv xS.1 $out/share/man/man1
'';
};
xN = pkgs.buildGoModule rec {
_pname = "xN";
pname = pkgs.lib.strings.toLower _pname;
inherit version src doCheck meta;
modRoot = "./${_pname}/";
vendorHash = null;
# This invokes a premature build that may miss compiler flags.
preBuild = ''
make
'';
ldflags = [ "-X 'main.projectVersion=${_version}'" ];
postInstall = ''
mkdir -p $out/share/man/man1
mv xN.1 $out/share/man/man1
'';
};
# 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.
postInstall = pkgs.lib.optionals full ''
makeWrapper ${xP}/lib/xP/xP $out/bin/xP --chdir ${xP}/share/xP/public
makeWrapper ${xS}/bin/xS $out/bin/xS
makeWrapper ${xN}/bin/xN $out/bin/xN
ln -s ${xS}/share/man/man1/* ${xN}/share/man/man1/* $out/share/man/man1
'';
doCheck = true;
@@ -108,7 +144,7 @@ pkgs.stdenv.mkDerivation rec {
meta = with pkgs.lib; {
description = "IRC daemon, bot, TUI client"
+ optionals full " and its web frontend";
homepage = "https://git.janouch.name/p/${pname}";
homepage = "https://git.janouch.name/p/${_pname}";
platforms = platforms.all;
license = licenses.bsd0;
};