Fix nix build (forgot it was building from git source); patch to load module & put fns in module
This commit is contained in:
42
default.nix
42
default.nix
@@ -1,40 +1,10 @@
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "riverguile";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://git.sr.ht/~leon_plickat/riverguile/";
|
||||
rev = "744ce4b1eb5950d0dc795d64bfac6b7738eec6f1";
|
||||
hash = "sha256-80XVaq+17Vu+DAs7pjt3cu5wiK37680A7S6qIulPRLc=";
|
||||
};
|
||||
patches = [
|
||||
(pkgs.writeText "nix-build.patch" ''
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 915f7ac..ff2b3c2 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
SCANNER := wayland-scanner
|
||||
|
||||
-PREFIX=/usr/local
|
||||
+PREFIX=''${out}
|
||||
BINDIR=$(PREFIX)/bin
|
||||
DATADIR=$(PREFIX)/share
|
||||
MODULEDIR=$(DATADIR)/guile/3.0
|
||||
diff --git a/src/call-idle-handler.c b/src/call-idle-handler.c
|
||||
index 727656e..b4d4474 100644
|
||||
--- a/src/call-idle-handler.c
|
||||
+++ b/src/call-idle-handler.c
|
||||
@@ -8,7 +8,7 @@ static void *call_idle_handler_inner (void *data)
|
||||
struct Call_idle_handler_parameters *params =
|
||||
(struct Call_idle_handler_parameters *)data;
|
||||
|
||||
- SCM event;
|
||||
+ SCM event = { 0 };
|
||||
switch (params->event)
|
||||
{
|
||||
case IDLE: event = scm_from_utf8_symbol("idle"); break;
|
||||
'')
|
||||
];
|
||||
buildInputs = with pkgs; [wayland-scanner wayland guile];
|
||||
nativeBuildInputs = [pkgs.pkg-config];
|
||||
src = ./.;
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/riverguile --set GUILE_LOAD_PATH "$out/share/guile/3.0/"
|
||||
'';
|
||||
buildInputs = with pkgs; [wayland guile];
|
||||
nativeBuildInputs = with pkgs; [pkg-config makeBinaryWrapper wayland wayland-scanner];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user