create and document build.nix
This commit is contained in:
parent
4ee558f906
commit
417e443ed3
24
just/Makefile
Normal file
24
just/Makefile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FENNEL?=$(fennel)
|
||||||
|
PREFIX?=/usr/local
|
||||||
|
|
||||||
|
PROGRAM_NAME=just
|
||||||
|
MAIN=$(PROGRAM_NAME).fnl
|
||||||
|
SOURCES=$(MAIN) listeners.fnl viewplex.fnl webview.fnl
|
||||||
|
|
||||||
|
$(PROGRAM_NAME): $(SOURCES) Makefile
|
||||||
|
(echo -e "#!/usr/bin/env lua\n" ; \
|
||||||
|
: we reset package.path so that --require-as-include cannot find ; \
|
||||||
|
: and inline third-party modules ; \
|
||||||
|
lua -e 'package.path="./?.lua"' $(FENNEL) --require-as-include --compile $(MAIN) ) > $@
|
||||||
|
chmod +x $@
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p $(PREFIX)/bin $(PREFIX)/lib/$(PROGRAM_NAME)
|
||||||
|
cp $(PROGRAM_NAME) $(PREFIX)/bin
|
||||||
|
# cp interface.xml styles.css $(PREFIX)/lib/$(PROGRAM_NAME)
|
||||||
|
|
||||||
|
test:
|
||||||
|
for i in *-test.fnl ; do lua $(fennel) $$i; done
|
||||||
|
|
||||||
|
easylist.txt:
|
||||||
|
curl https://easylist.to/easylist/easylist.txt -O
|
@ -2,6 +2,22 @@
|
|||||||
|
|
||||||
Touchscreen-friendly wrapper around Webkit
|
Touchscreen-friendly wrapper around Webkit
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
If you have Nix
|
||||||
|
|
||||||
|
nix-build build.nix
|
||||||
|
|
||||||
|
Otherwise, very approximately
|
||||||
|
|
||||||
|
* find and install the Lua packages described by the lua5_3.withPackages form in `default.nix`
|
||||||
|
* install [Fennel](https://fennel-lang.org/setup#downloading-fennel)
|
||||||
|
* `make`
|
||||||
|
|
||||||
|
This *should* result in an executable called `just`, but
|
||||||
|
YMMV. Consider Nix?
|
||||||
|
|
||||||
|
|
||||||
## TO DO
|
## TO DO
|
||||||
|
|
||||||
* functional
|
* functional
|
||||||
|
2
just/build.nix
Normal file
2
just/build.nix
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
with import <nixpkgs> {} ;
|
||||||
|
callPackage ./. {}
|
@ -41,5 +41,7 @@ in stdenv.mkDerivation {
|
|||||||
nativeBuildInputs = [ lua makeWrapper ];
|
nativeBuildInputs = [ lua makeWrapper ];
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/just --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
(local { : Gtk : Gdk : WebKit2 : cairo } lgi)
|
(local { : Gtk : Gdk : WebKit2 : cairo } lgi)
|
||||||
|
|
||||||
(local {: view} (require :fennel))
|
(if (os.getenv "JUST_HACKING")
|
||||||
|
(local {: view} (require :fennel)))
|
||||||
|
|
||||||
(local Listeners (require :listeners))
|
(local Listeners (require :listeners))
|
||||||
(local Webview (require :webview))
|
(local Webview (require :webview))
|
||||||
|
Loading…
Reference in New Issue
Block a user