1
0
Fork 0

nvim: Remove local lpeg patch
All checks were successful
Build / build-amd64-linux (push) Successful in 8m54s
Build / build-arm64-linux (push) Successful in 46m2s

This commit is contained in:
Daniel Kempkens 2023-10-05 18:12:34 +02:00
parent 921aa34b66
commit 7345d7d0c6
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 12 additions and 103 deletions

View file

@ -45,11 +45,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1696489697, "lastModified": 1696505474,
"narHash": "sha256-cXEjQ/203ABFWqV/Jg9pfPITs5oEQctwjczbD2641Xc=", "narHash": "sha256-i+uB553ud0rWZoNqZ/D1DI8PI+LdMWAAqYG5bZt4j9Q=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "0ff13a6a5a0a4d534f4ce9619fa4ccb02f126d53", "rev": "f67517bba30b6233bea85e1f6a8505171142d4ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,16 +61,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1696193975, "lastModified": 1696434248,
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", "narHash": "sha256-qivb3b3b5Cxe5/8qwCJ4CJCw/ENtim5zlhDItGR0p1I=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", "rev": "349bdd9653c42f1793d338b43aefe08883c5ebee",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable-small",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -1,7 +1,7 @@
{ {
description = "Collection of (useful) tools"; description = "Collection of (useful) tools";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
@ -31,18 +31,15 @@
if lib.hasSuffix "darwin" system then rec { if lib.hasSuffix "darwin" system then rec {
agilebits-op = import ./packages/agilebits-op.nix { inherit pkgs lib; }; agilebits-op = import ./packages/agilebits-op.nix { inherit pkgs lib; };
cliclick = import ./packages/cliclick.nix { inherit pkgs lib; }; cliclick = import ./packages/cliclick.nix { inherit pkgs lib; };
liblpeg = import ./packages/liblpeg-darwin.nix { inherit pkgs; };
neovim-nightly = import ./packages/neovim-nightly.nix { inherit (inputs'.neovim-flake.packages) neovim; inherit liblpeg lib; };
phantomjs = import ./packages/phantomjs.nix { inherit pkgs lib; }; phantomjs = import ./packages/phantomjs.nix { inherit pkgs lib; };
} else { } else { };
neovim-nightly = import ./packages/neovim-nightly.nix { inherit (inputs'.neovim-flake.packages) neovim; inherit lib; };
};
in in
{ {
anonymous-overflow = import ./packages/anonymous-overflow.nix { inherit pkgs lib; }; anonymous-overflow = import ./packages/anonymous-overflow.nix { inherit pkgs lib; };
fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; }; fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; };
headscale-ui = import ./packages/headscale-ui.nix { inherit pkgs lib; }; headscale-ui = import ./packages/headscale-ui.nix { inherit pkgs lib; };
lexical = import ./packages/lexical.nix { inherit pkgs lib; }; lexical = import ./packages/lexical.nix { inherit pkgs lib; };
neovim-nightly = import ./packages/neovim-nightly.nix { inherit (inputs'.neovim-flake.packages) neovim; inherit lib; };
nitter-unstable = import ./packages/nitter-unstable.nix { inherit pkgs lib; }; nitter-unstable = import ./packages/nitter-unstable.nix { inherit pkgs lib; };
q = import ./packages/q.nix { inherit pkgs lib; }; q = import ./packages/q.nix { inherit pkgs lib; };
rexit = import ./packages/rexit.nix { inherit pkgs lib; }; rexit = import ./packages/rexit.nix { inherit pkgs lib; };

View file

@ -1,22 +0,0 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
pname = "liblpeg";
inherit (pkgs.luajitPackages.lpeg) version src;
nativeBuildInputs = [ pkgs.fixDarwinDylibNames ];
buildInputs = [ pkgs.luajit ];
patches = [ ../patches/liblpeg-makefile.patch ];
installPhase = ''
install -D lpeg.dylib $out/lib/lpeg.dylib
'';
meta = {
homepage = "http://www.inf.puc-rio.br/~roberto/lpeg.html";
description = "Parsing Expression Grammars For Lua";
license.fullName = "MIT/X11";
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
};
}

View file

@ -1,18 +1,3 @@
{ neovim, liblpeg ? null, lib, ... }: { neovim, lib, ... }:
neovim.overrideAttrs (oa: { neovim
nativeBuildInputs = oa.nativeBuildInputs ++ lib.optionals (liblpeg != null) [
liblpeg
];
patches = builtins.filter
(p:
let
patch =
if builtins.typeOf p == "set"
then baseNameOf p.name
else baseNameOf p;
in
patch != "use-the-correct-replacement-args-for-gsub-directive.patch")
oa.patches;
})

View file

@ -1,51 +0,0 @@
--- a/makefile 2019-03-11 15:08:29
+++ b/makefile 2023-05-03 17:12:18
@@ -1,30 +1,7 @@
+.DEFAULT_GOAL := macosx
+
LIBNAME = lpeg
-LUADIR = ../lua/
-COPT = -O2 -DNDEBUG
-# COPT = -g
-
-CWARNS = -Wall -Wextra -pedantic \
- -Waggregate-return \
- -Wcast-align \
- -Wcast-qual \
- -Wdisabled-optimization \
- -Wpointer-arith \
- -Wshadow \
- -Wsign-compare \
- -Wundef \
- -Wwrite-strings \
- -Wbad-function-cast \
- -Wdeclaration-after-statement \
- -Wmissing-prototypes \
- -Wnested-externs \
- -Wstrict-prototypes \
-# -Wunreachable-code \
-
-
-CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
-CC = gcc
-
FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
# For Linux
@@ -33,11 +10,14 @@ macosx:
# For Mac OS
macosx:
- $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
+ $(MAKE) lpeg.dylib "DLLFLAGS = -dynamiclib -undefined dynamic_lookup"
lpeg.so: $(FILES)
env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
+lpeg.dylib: $(FILES)
+ env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.dylib
+
$(FILES): makefile
test: test.lua re.lua lpeg.so