From 0a4d37aea281ec1ece4e4dad1eb7d2a42d457810 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 31 Aug 2024 14:47:51 -0400 Subject: [PATCH] gnome-monitor-config: fix cross compilation, set strictDeps --- .../gn/gnome-monitor-config/package.nix | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/gn/gnome-monitor-config/package.nix b/pkgs/by-name/gn/gnome-monitor-config/package.nix index ef399902ef657..589f3dcdddcab 100644 --- a/pkgs/by-name/gn/gnome-monitor-config/package.nix +++ b/pkgs/by-name/gn/gnome-monitor-config/package.nix @@ -1,14 +1,15 @@ -{ lib -, fetchFromGitHub -, stdenv -, meson -, ninja -, pkg-config -, cairo -, glib +{ + lib, + fetchFromGitHub, + stdenv, + meson, + ninja, + pkg-config, + cairo, + glib, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gnome-monitor-config"; version = "0-unstable-2023-09-26"; @@ -19,10 +20,17 @@ stdenv.mkDerivation rec { hash = "sha256-uVWhQ5SCyadDkeOd+pY2cYZAQ0ZvWMlgndcr1ZIEf50="; }; + strictDeps = true; + + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja pkg-config + glib ]; buildInputs = [ @@ -30,11 +38,10 @@ stdenv.mkDerivation rec { glib ]; - installPhase = '' - runHook preInstall - mkdir -p $out/bin - mv src/gnome-monitor-config $out/bin - runHook postInstall + postPatch = '' + substituteInPlace src/meson.build \ + --replace-fail "executable('gnome-monitor-config', src" \ + "executable('gnome-monitor-config', src, install : true" ''; meta = with lib; {