nixexprs/desktop-tools-master.nix

64 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-29 02:31:03 +02:00
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "desktop-tools";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
xorg.libX11
xorg.libXext
xorg.libXdmcp
libpulseaudio
dbus.dev
python3
2023-07-04 02:44:33 +02:00
] ++ lib.optionals (full && stdenv.isLinux) [
2023-06-29 02:31:03 +02:00
gnome.gdm.dev
glib
pcre2
systemd.dev
2023-07-04 02:44:33 +02:00
2023-06-29 02:31:03 +02:00
# To address pkg-config warnings for glib.
util-linux
libselinux
libsepol
pcre
];
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";
};
# 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"
];
doCheck = true;
meta = with pkgs.lib; {
description = "Desktop tools";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}