From 18c940962e0c21d783c375eaf77d8ffd61cfd8b5 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 29 Aug 2023 07:59:43 +0000 Subject: [PATCH] sxmo-utils: fix incorrect PREFIX this should help the appscripts (screenshotting and the like) --- pkgs/additional/sxmo-utils/common.nix | 8 ++++++-- pkgs/additional/sxmo-utils/default.nix | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/additional/sxmo-utils/common.nix b/pkgs/additional/sxmo-utils/common.nix index ef9d0f16..2d9513a6 100644 --- a/pkgs/additional/sxmo-utils/common.nix +++ b/pkgs/additional/sxmo-utils/common.nix @@ -127,8 +127,12 @@ stdenv.mkDerivation rec { buildInputs = [ bash ]; # needed here so stdenv's `patchShebangsAuto` hook sets the right interpreter - # TODO: DESTDIR/PREFIX here are wrong, and it breaks share/sxmo/appscripts/{sxmo_screenshot.sh,...} - makeFlags = [ "OPENRC=0" "DESTDIR=${placeholder "out"}" "PREFIX=" ]; + makeFlags = [ + "PREFIX=${placeholder "out"}" + "SYSCONFDIR=${placeholder "out"}/etc" + "DESTDIR=" + "OPENRC=0" + ]; preInstall = '' # busybox is used by setup_config_version.sh, but placing it in nativeBuildInputs breaks the nix builder PATH="$PATH:${buildPackages.busybox}/bin" diff --git a/pkgs/additional/sxmo-utils/default.nix b/pkgs/additional/sxmo-utils/default.nix index 2ca366ef..da0dc7a5 100644 --- a/pkgs/additional/sxmo-utils/default.nix +++ b/pkgs/additional/sxmo-utils/default.nix @@ -70,6 +70,11 @@ let url = "https://git.uninsane.org/colin/sxmo-utils/commit/8949c64451973212a8aa50375396ec375c676d1e.patch"; hash = "sha256-Okjjwa2FBJOrDVZGrfaUEPGQY749+V4w0gALIBp50hQ="; }) + (fetchpatch { + name = "Makefile: use SYSCONFDIR instead of hardcoding /etc"; + url = "https://git.uninsane.org/colin/sxmo-utils/commit/bbad10e074c335710e5ab171a0b1d96dddf160ed.patch"; + hash = "sha256-jqxzGLjYXuJV6NB/4zsPdjuzNVyUCxPSlGMDW5XetZ8="; + }) ## these might or might not be upstream-worthy ./0104-full-auto-rotate.patch