From 864b3626e587d9a35a08ad15d16b9be827323d24 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 28 Jun 2023 22:35:22 -0400 Subject: [PATCH] fix: avoid libexecdir on nixos for now --- Makefile | 4 ++-- flake.nix | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 35152e4..0707839 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ prefix ?= /usr/local bindir = $(prefix)/bin libdir = $(prefix)/lib -libexecdir = $(prefix)/libexec +libexecdir ?= $(prefix)/libexec includedir = $(prefix)/include datarootdir = $(prefix)/share datadir = $(datarootdir) @@ -34,7 +34,7 @@ $(BIN): Cargo.toml Cargo.lock src/main.rs vendor-check install: install -Dm0755 target/$(TARGET)/$(BIN) $(DESTDIR)$(libexecdir)/$(BIN) - install -Dm0644 data/$(DBUS_NAME).service $(DESTDIR)/$(datadir)/dbus-1/services/$(DBUS_NAME).service + install -Dm0644 data/$(DBUS_NAME).service $(DESTDIR)/$(datadir)/systemd/user/$(DBUS_NAME).service install -Dm0644 data/cosmic.portal $(DESTDIR)/$(datadir)/xdg-desktop-portal/portals/cosmic.portal ## Cargo Vendoring diff --git a/flake.nix b/flake.nix index 0801e1f..8ba3a2d 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ ./data ]; }; - nativeBuildInputs = with pkgs; [ pkg-config rustPlatform.bindgenHook ]; + nativeBuildInputs = with pkgs; [ pkg-config rustPlatform.bindgenHook gnumake ]; buildInputs = with pkgs; [ pipewire libxkbcommon @@ -49,9 +49,12 @@ inherit xdg-desktop-portal-cosmic; }; - packages.default = xdg-desktop-portal-cosmic.overrideAttrs (oldAttrs: rec { + # FIXME reference the libexecdir for xdp-cosmic in the nix store in cosmic-session + # then the hack putting xdp-cosmic into bin can be removed + packages.default = xdg-desktop-portal-cosmic + .overrideAttrs (oldAttrs: rec { installPhase = '' - make install prefix=$out + make install prefix=$out libexecdir=$out/bin ''; passthru.providedSessions = [ "cosmic" ]; });