From 7345d7d0c69bd5769f8127d972e0644bc2a3bf88 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 5 Oct 2023 18:12:34 +0200 Subject: [PATCH] nvim: Remove local lpeg patch --- flake.lock | 14 +++++----- flake.nix | 9 ++---- packages/liblpeg-darwin.nix | 22 --------------- packages/neovim-nightly.nix | 19 ++----------- patches/liblpeg-makefile.patch | 51 ---------------------------------- 5 files changed, 12 insertions(+), 103 deletions(-) delete mode 100644 packages/liblpeg-darwin.nix delete mode 100644 patches/liblpeg-makefile.patch diff --git a/flake.lock b/flake.lock index 125e488..dffad2f 100644 --- a/flake.lock +++ b/flake.lock @@ -45,11 +45,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1696489697, - "narHash": "sha256-cXEjQ/203ABFWqV/Jg9pfPITs5oEQctwjczbD2641Xc=", + "lastModified": 1696505474, + "narHash": "sha256-i+uB553ud0rWZoNqZ/D1DI8PI+LdMWAAqYG5bZt4j9Q=", "owner": "neovim", "repo": "neovim", - "rev": "0ff13a6a5a0a4d534f4ce9619fa4ccb02f126d53", + "rev": "f67517bba30b6233bea85e1f6a8505171142d4ca", "type": "github" }, "original": { @@ -61,16 +61,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696193975, - "narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", + "lastModified": 1696434248, + "narHash": "sha256-qivb3b3b5Cxe5/8qwCJ4CJCw/ENtim5zlhDItGR0p1I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", + "rev": "349bdd9653c42f1793d338b43aefe08883c5ebee", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 527de3f..86880cb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "Collection of (useful) tools"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; flake-parts.url = "github:hercules-ci/flake-parts"; @@ -31,18 +31,15 @@ if lib.hasSuffix "darwin" system then rec { agilebits-op = import ./packages/agilebits-op.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; }; - } else { - neovim-nightly = import ./packages/neovim-nightly.nix { inherit (inputs'.neovim-flake.packages) neovim; inherit lib; }; - }; + } else { }; in { anonymous-overflow = import ./packages/anonymous-overflow.nix { inherit pkgs lib; }; fennel-ls = import ./packages/fennel-ls.nix { inherit pkgs lib; }; headscale-ui = import ./packages/headscale-ui.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; }; q = import ./packages/q.nix { inherit pkgs lib; }; rexit = import ./packages/rexit.nix { inherit pkgs lib; }; diff --git a/packages/liblpeg-darwin.nix b/packages/liblpeg-darwin.nix deleted file mode 100644 index 101fe31..0000000 --- a/packages/liblpeg-darwin.nix +++ /dev/null @@ -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" ]; - }; -} diff --git a/packages/neovim-nightly.nix b/packages/neovim-nightly.nix index d2d96d1..35e2d87 100644 --- a/packages/neovim-nightly.nix +++ b/packages/neovim-nightly.nix @@ -1,18 +1,3 @@ -{ neovim, liblpeg ? null, lib, ... }: +{ neovim, lib, ... }: -neovim.overrideAttrs (oa: { - 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; -}) +neovim diff --git a/patches/liblpeg-makefile.patch b/patches/liblpeg-makefile.patch deleted file mode 100644 index 0bf2e78..0000000 --- a/patches/liblpeg-makefile.patch +++ /dev/null @@ -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