I’m trying to install st
terminal. I have an overlay which looks like this
final: prev:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
in {
st = prev.st.override {
conf = ''
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Operator Mono SSm Book:pixelsize=16:antialias=true:autohint=true";
static int borderpx = 10;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/usr/bin/fish";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
...more text after that
'';
};
}
This is exactly 100% the same config I use on Arch when running make install
and it works. Yet on NixOS when then running nixos-rebuild switch
I get
In file included from x.c:61:
config.h:37:10: error: conflicting types for 'worddelimiters'
37 | wchar_t *worddelimiters = L" ";
| ^~~~~~~~~~~~~~
In file included from x.c:20:
st.h:117:14: note: previous declaration of 'worddelimiters' was here
117 | extern char *worddelimiters;
| ^~~~~~~~~~~~~~
In file included from x.c:61:
config.h:177:38: warning: initialization of 'char *' from incompatible pointer type 'void (*)(const Arg *)' {aka 'void (*)(const union <anonymous> *)'} [-Wincompatible-pointer-types]
177 | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
| ^~~~~~~~
config.h:177:38: note: (near initialization for 'mshortcuts[0].s')
config.h:177:54: error: extra brace group at end of initializer
177 | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
| ^
and many more errors like this. Without the overlay it works but then I obviously don’t have my configuration. I have no idea where to even start debugging this