nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 7ce91af60932b3fffa1d664eef68aa309c332898
parent f620c43e5953977e527a381b3d5da72a6b070868
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sat,  9 Jul 2022 13:34:11 +0300

Up

Diffstat:
Mpkgs/osm/map-machine/default.nix | 6+++---
Mpkgs/suckless/amused/default.nix | 21+++++----------------
Dpkgs/suckless/amused/linux.patch | 94-------------------------------------------------------------------------------
3 files changed, 8 insertions(+), 113 deletions(-)

diff --git a/pkgs/osm/map-machine/default.nix b/pkgs/osm/map-machine/default.nix @@ -2,14 +2,14 @@ python3Packages.buildPythonApplication rec { pname = "map-machine"; - version = "2022-06-07"; + version = "0.1.6"; disabled = python3Packages.pythonOlder "3.9"; src = fetchFromGitHub { owner = "enzet"; repo = pname; - rev = "18d475277d50ff47d113630faa0c2be970a642c7"; - hash = "sha256-zdbTGK1uWlZ2lmcSdHvNA4M3NQHhoiRJ0+eh+r4RQm8="; + rev = "v${version}"; + hash = "sha256-uVg9s1S9CXjBS8VdqZf+jDIR94pieD2nuoP94Jyce7U="; }; propagatedBuildInputs = with python3Packages; [ diff --git a/pkgs/suckless/amused/default.nix b/pkgs/suckless/amused/default.nix @@ -1,36 +1,25 @@ -{ lib, stdenv, fetchFromGitHub, bmake, libbsd, imsg-compat, sndio, libevent, flac, mpg123, libvorbis, opusfile }: +{ lib, stdenv, fetchFromGitHub, bmake, pkg-config, libbsd, imsg-compat, sndio, libevent, flac, mpg123, libvorbis, opusfile }: stdenv.mkDerivation rec { pname = "amused"; - version = "0.9"; + version = "2022-07-09"; src = fetchFromGitHub { owner = "omar-polo"; repo = pname; - rev = version; - hash = "sha256-L2YumBk3KiVzLmFWVS7a5xe9PRkbg/MFNxSktXbRLuw="; + rev = "33e8ddf3b1df91d66664dcf0dc7011d089a74611"; + hash = "sha256-GNNkbd9f0fUArzDiMdnJ0JTwhsTBRyH/Z8t7287hWtg="; }; - patches = [ ./linux.patch ]; - - nativeBuildInputs = [ bmake ]; + nativeBuildInputs = [ bmake pkg-config ]; buildInputs = [ libbsd libevent imsg-compat sndio flac mpg123 libvorbis opusfile ]; - makeFlags = [ - "AMUSED_RELEASE=Yes" - "CC:=$(CC)" - "CPPFLAGS=-I${opusfile}/include/opus -I${libbsd}/include/bsd -I${imsg-compat}/include" - ]; - - installFlags = [ "PREFIX=$(out)" ]; - meta = with lib; { description = "music player daemon NIH"; inherit (src.meta) homepage; license = licenses.isc; maintainers = [ maintainers.sikmir ]; platforms = platforms.unix; - broken = true; # WIP https://github.com/omar-polo/amused/issues/1 }; } diff --git a/pkgs/suckless/amused/linux.patch b/pkgs/suckless/amused/linux.patch @@ -1,94 +0,0 @@ -diff --git i/Makefile w/Makefile -index 5a598e3..af94705 100644 ---- i/Makefile -+++ w/Makefile -@@ -6,7 +6,7 @@ SRCS= amused.c control.c log.c xmalloc.c player.c ctl.c playlist.c \ - - CPPFLAGS += -I/usr/local/include -I/usr/local/include/opus - --LDADD = -levent -lm -lsndio -lutil \ -+LDADD = -levent -lm -lsndio -lutil -lbsd -limsg \ - -L/usr/local/lib -lmpg123 -lvorbisfile -lopusfile -lFLAC - DPADD = ${LIBEVENT} ${LIBM} ${LIBSNDIO} ${LIBUTIL} - -@@ -16,7 +16,7 @@ BINDIR ?= ${PREFIX}/bin - MANDIR ?= ${PREFIX}/man/man - .else - NOMAN = Yes --CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable -+CFLAGS += -Wall -Wstrict-prototypes -Wunused-variable - PREFIX ?= ${HOME} - BINDIR ?= ${PREFIX}/bin - BINOWN ?= ${USER} -diff --git i/amused.h w/amused.h -index 81634a0..ce89859 100644 ---- i/amused.h -+++ w/amused.h -@@ -17,6 +17,18 @@ - #ifndef AMUSED_H - #define AMUSED_H - -+#ifndef __OpenBSD__ -+#define pledge(a, b) (0) -+#endif -+ -+#ifndef __dead -+#define __dead __attribute__((noreturn)) -+#endif -+ -+#ifndef INFTIM -+#define INFTIM -1 -+#endif -+ - extern char *csock; - extern int debug; - extern int verbose; -diff --git i/ctl.c w/ctl.c -index 03560a0..e4964dc 100644 ---- i/ctl.c -+++ w/ctl.c -@@ -824,7 +824,7 @@ ctl(int argc, char **argv) - ibuf = xmalloc(sizeof(*ibuf)); - imsg_init(ibuf, ctl_sock); - -- optreset = 1; -+ //optreset = 1; - optind = 1; - - exit(parse(argc, argv)); -diff --git i/log.h w/log.h -index 0fa046f..c2a424d 100644 ---- i/log.h -+++ w/log.h -@@ -21,6 +21,10 @@ - - #include <stdarg.h> - -+#ifndef __dead -+#define __dead __attribute__((noreturn)) -+#endif -+ - void log_init(int, int); - void log_procinit(const char *); - void log_setverbose(int); -diff --git i/player.c w/player.c -index a1a9f1a..917dfe2 100644 ---- i/player.c -+++ w/player.c -@@ -254,7 +254,7 @@ play(const void *buf, size_t len) - - if (player_pfds[0].revents & (POLLHUP|POLLIN)) { - if (player_shouldstop()) { -- sio_flush(hdl); -+ sio_stop(hdl); - stopped = 1; - return 0; - } -@@ -281,6 +281,7 @@ player(int debug, int verbose) - log_init(debug, LOG_DAEMON); - log_setverbose(verbose); - -+ setproctitle_init(); - setproctitle("player"); - log_procinit("player"); -