New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wordgrinder: init at 0.6 #20607
wordgrinder: init at 0.6 #20607
Conversation
433f086
to
3b5ea8b
Compare
I'm still interested here... can someone tell me how to properly bring lua in scope? |
It seems that wordgrinder makefile is making some assumptions about where to find lua. Setting the correct environment variables might fix the problem. |
@@ -0,0 +1,27 @@ | |||
{ stdenv, fetchurl, pkgs }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer explicit dependencies over bringing pkgs
.
version = "0.6"; | ||
name = "wordgrinder-${version}"; | ||
|
||
src = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchFromGitHub
can be also used.
meta = { | ||
homepage = "http://cowlark.com/wordgrinder"; | ||
description = "Text-based word processor"; | ||
license = stdenv.lib.licenses.mit; # not sure, though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is MIT.
Well, now it builds but the tests do not run successfully... But I guess we can investigate a bit further now. I also updates the package to latest master of the upstream repo, because master contains some changes to the build setup which make packaging a lot easier (IMHO). Also, the 0.6 release is old (2015) - I will update this package to a new release as soon as there is one and then follow the normal releases If you're all okay with that. |
Can someone help me here? I fail to bring lua in scope properly, it seems. I just re-pushed the branch based on my latest master, ... and squashed the fixes. |
e9aa813
to
4c555f4
Compare
backtrace, for the lazy:
|
Can someone give some love here? Maybe @ericsagnes ? |
4c555f4
to
5dc13a5
Compare
@matthiasbeyer I took a quick test at building this (v0.6). makeFlags = [
"LUA_INCLUDE=${lua52Packages.lua}/include"
"LUA_LIB=${lua52Packages.lua}/lib/liblua.so"
]; But then it fails running the tests (end of the Makefile) : TEST tests/apply-markup.lua
Lua error: [string "src/lua/_prologue.lua"]:54: read from undefined local 'loadstring'
stack traceback:
[C]: in function 'error'
[string "src/lua/_prologue.lua"]:54: in function '__index'
[string "src/lua/xpattern.lua"]:27: in main chunk
make: *** [Makefile:458: .obj/lj_n/tests/apply-markup.lua.passed] Error 1
builder for ‘/nix/store/f0hmpdaam62amw10mld7cqawvwr819yc-wordgrinder-0.6.drv’ failed with exit code 2
error: build of ‘/nix/store/f0hmpdaam62amw10mld7cqawvwr819yc-wordgrinder-0.6.drv’ failed I haven't tried building the latest master though. Plus : I'm pretty sure the generic builder already set |
5dc13a5
to
e2c9cdf
Compare
e2c9cdf
to
1e634a4
Compare
After watching Bryan Lunduke talk about wordgrinder, I really want this to happen here. And I guess I'm almost there, it just does not find Xft:
|
Suggestions? Anyone? |
This builds and runs both ncurses and X11 programs : { stdenv, fetchFromGitHub, pkgconfig, makeWrapper
, lua52Packages, libXft, ncurses, readline, zlib }:
stdenv.mkDerivation rec {
name = "wordgrinder-${version}";
version = "0.6-db14181";
src = fetchFromGitHub {
repo = "wordgrinder";
owner = "davidgiven";
rev = "db141815e8bd1da6e684a1142a59492e516f3041";
sha256 = "1l1jqzcqiwnc8r1igfi7ay4pzzhdhss81znnmfr4rc1ia8bpdjc2";
};
makeFlags = [
"PREFIX=$(out)"
"LUA_INCLUDE=${lua52Packages.lua}/include"
"LUA_LIB=${lua52Packages.lua}/lib/liblua.so"
];
nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [
libXft
lua52Packages.lua
ncurses
readline
zlib
];
# To be able to find <Xft.h>
NIX_CFLAGS_COMPILE = "-I${libXft.dev}/include/X11";
# Binaries look for LuaFileSystem library (lfs.so) at runtime
postInstall = ''
wrapProgram $out/bin/wordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so";
wrapProgram $out/bin/xwordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so";
'';
meta = with stdenv.lib; {
description = "Text-based word processor";
homepage = https://cowlark.com/wordgrinder;
license = licenses.mit;
maintainers = with maintainers; [ matthiasbeyer ];
platforms = with stdenv.lib.platforms; linux;
};
} It's the latest commit before the author started using @matthiasbeyer : you can take this and make it your own, I don't mind. |
@c0bw3b I love you ❤️ I will test this out and push as soon as I tested it! Thank you very much! |
1e634a4
to
1be1a00
Compare
It works beautifully and I can't wait to start using it! @c0bw3b ❤️ |
@ericsagnes @c0bw3b @falsifian ... this is still not merged? Can someone please merge this? |
Does not build yet, as
lua5.2
is not found. Can someone help me? I'm not sure why it isn't found here...Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)