Compare commits

..

19 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
d91b0b04ab Fix xK on macOS ARM 2023-07-04 03:10:24 +02:00
4bb96d49ef Fix pdf-simple-sign check on macOS 2023-07-04 03:01:45 +02:00
3bbb7d522a Fix neetdraw on macOS 2023-07-04 02:56:52 +02:00
58c2c19d9f Add missing desktop-tools runtime dependency 2023-07-04 02:55:08 +02:00
40cab414cf Fix desktop-tools on macOS 2023-07-04 02:44:33 +02:00
12 changed files with 130 additions and 21 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

@@ -17,12 +17,13 @@ pkgs.stdenv.mkDerivation rec {
xorg.libXdmcp xorg.libXdmcp
libpulseaudio libpulseaudio
dbus.dev dbus.dev
] ++ lib.optionals full [ python3
] ++ lib.optionals (full && stdenv.isLinux) [
gnome.gdm.dev gnome.gdm.dev
glib glib
pcre2 pcre2
systemd.dev systemd.dev
] ++ lib.optionals (full && stdenv.isLinux) [
# To address pkg-config warnings for glib. # To address pkg-config warnings for glib.
util-linux util-linux
libselinux libselinux
@@ -42,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

@@ -20,9 +20,11 @@ pkgs.stdenv.mkDerivation rec {
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
gnome.adwaita-icon-theme
gtk3 gtk3
libwebp libwebp
libraw libraw
shared-mime-info
# WIP # WIP
libepoxy libepoxy
@@ -74,8 +76,13 @@ pkgs.stdenv.mkDerivation rec {
"-Dresvg=enabled" "-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 = '' preFixup = ''
gappsWrapperArgs+=( 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 ]} --prefix PATH : $out/bin:${pkgs.lib.makeBinPath [ pkgs.exiftool ]}
) )
''; '';

View File

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

View File

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

View File

@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
gnome.adwaita-icon-theme
gtk3 gtk3
json-glib json-glib
lua5_2 lua5_2
@@ -53,6 +54,15 @@ pkgs.stdenv.mkDerivation rec {
"-DBUILD_TESTING=ON" "-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; doCheck = true;
checkPhase = with pkgs; '' checkPhase = with pkgs; ''

View File

@@ -13,6 +13,7 @@ pkgs.stdenv.mkDerivation rec {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
ncurses ncurses
libiconv
libev libev
# Termo demo-glib.c # Termo demo-glib.c

View File

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

View File

@@ -14,7 +14,6 @@ let
ncurses ncurses
inkscape inkscape
#(groff.override { enableGhostscript = true; }) #(groff.override { enableGhostscript = true; })
libreoffice
imagemagick imagemagick
openssl openssl
@@ -22,6 +21,9 @@ let
nss.tools nss.tools
# pdfsig # pdfsig
(poppler.override { utils = true; }) (poppler.override { utils = true; })
] ++ lib.optionals stdenv.isLinux [
# Missing on macOS as of writing.
libreoffice
]; ];
src = if local then src = if local then

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
@@ -54,4 +54,3 @@ pkgs.stdenv.mkDerivation rec {
license = licenses.bsd0; 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 , full ? true
}: }:
pkgs.stdenv.mkDerivation rec { pkgs.stdenv.mkDerivation rec {
pname = "xK"; _pname = "xK";
pname = pkgs.lib.strings.toLower _pname;
_version = pkgs.lib.strings.fileContents (src + "/xK-version");
version = "master"; version = "master";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
@@ -28,20 +30,21 @@ pkgs.stdenv.mkDerivation rec {
tcl tcl
perl perl
ruby ruby
tinycc
python3 python3
] ++ lib.optionals (full && !tinycc.meta.broken) [
tinycc
] ++ lib.optionals (!full) [ ] ++ lib.optionals (!full) [
libedit libedit
]; ];
src = if local then src = if local then
builtins.path { builtins.path {
path = ../${pname}/git; path = ../${_pname}/git;
name = "${pname}"; name = "${_pname}";
} }
else else
fetchGit { fetchGit {
url = "https://git.janouch.name/p/${pname}.git"; url = "https://git.janouch.name/p/${_pname}.git";
submodules = true; submodules = true;
ref = "master"; ref = "master";
}; };
@@ -54,12 +57,13 @@ pkgs.stdenv.mkDerivation rec {
]; ];
xP = pkgs.buildGoModule rec { xP = pkgs.buildGoModule rec {
pname = "xP"; _pname = "xP";
pname = pkgs.lib.strings.toLower _pname;
inherit version src doCheck meta; inherit version src doCheck meta;
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";
@@ -84,22 +88,55 @@ pkgs.stdenv.mkDerivation rec {
}; };
xS = pkgs.buildGoModule rec { xS = pkgs.buildGoModule rec {
pname = "xS"; _pname = "xS";
pname = pkgs.lib.strings.toLower _pname;
inherit version src doCheck meta; inherit version src doCheck meta;
modRoot = "./${pname}/"; modRoot = "./${_pname}/";
vendorHash = null; vendorHash = null;
# This invokes a premature build that may miss compiler flags. # This invokes a premature build that may miss compiler flags.
preBuild = '' preBuild = ''
make 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. # 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
makeWrapper ${xS}/bin/xS $out/bin/xS 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; doCheck = true;
@@ -107,7 +144,7 @@ pkgs.stdenv.mkDerivation rec {
meta = with pkgs.lib; { meta = with pkgs.lib; {
description = "IRC daemon, bot, TUI client" description = "IRC daemon, bot, TUI client"
+ optionals full " and its web frontend"; + optionals full " and its web frontend";
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;
}; };