Skip to content

Commit

Permalink
fix: avoid libexecdir on nixos for now
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Jun 29, 2023
1 parent 539968d commit 864b362
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" ];
});
Expand Down

0 comments on commit 864b362

Please sign in to comment.