From d1b58d0d9264d6de88e3c09857229c924af5e3b4 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Tue, 20 Jun 2023 14:46:07 +0200 Subject: [PATCH 1/2] maintainers: update natsukagami With email matching GPG key, and other info (cherry picked from commit 11b62e658f142fa4ef15696226e01d2feb02095c) --- maintainers/maintainer-list.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 959c4570f13b3..68ca8efa98fdd 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -15355,10 +15355,11 @@ name = "Nathan Yong"; }; natsukagami = { - email = "natsukagami@gmail.com"; + name = "Natsu Kagami"; + email = "nki@nkagami.me"; + matrix = "@nki:m.nkagami.me"; github = "natsukagami"; githubId = 9061737; - name = "Natsu Kagami"; keys = [ { fingerprint = "5581 26DC 886F E14D 501D B0F2 D6AD 7B57 A992 460C"; } ]; }; natsukium = { From 1934a4d39ed8c8742989ce7c16dae6b727b03fcc Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Tue, 20 Jun 2023 15:01:14 +0200 Subject: [PATCH 2/2] ttaenc: init at 3.4.1 (cherry picked from commit c609f1e3713402ff6026ecbdd964318c65116227) --- pkgs/by-name/tt/ttaenc/makefile.patch | 15 ++++++++ pkgs/by-name/tt/ttaenc/package.nix | 44 ++++++++++++++++++++++ pkgs/by-name/tt/ttaenc/ttaenc-inline.patch | 10 +++++ 3 files changed, 69 insertions(+) create mode 100644 pkgs/by-name/tt/ttaenc/makefile.patch create mode 100644 pkgs/by-name/tt/ttaenc/package.nix create mode 100644 pkgs/by-name/tt/ttaenc/ttaenc-inline.patch diff --git a/pkgs/by-name/tt/ttaenc/makefile.patch b/pkgs/by-name/tt/ttaenc/makefile.patch new file mode 100644 index 0000000000000..d60ebf1f03518 --- /dev/null +++ b/pkgs/by-name/tt/ttaenc/makefile.patch @@ -0,0 +1,15 @@ +--- a/Makefile ++++ b/Makefile +@@ -8,10 +8,10 @@ + INSDIR = /usr/bin + + ttaenc: $(patsubst %.c, %.o, $(wildcard *.c)) +- gcc $^ -o $@ $(CFLAGS) ++ $(CC) $^ -o $@ $(CFLAGS) + + %.o: %.c +- gcc -c $(CFLAGS) $< ++ $(CC) -c $(CFLAGS) $< + + install: + [ -d "$(INSDIR)" ] || mkdir $(INSDIR) diff --git a/pkgs/by-name/tt/ttaenc/package.nix b/pkgs/by-name/tt/ttaenc/package.nix new file mode 100644 index 0000000000000..51fc8e26593e3 --- /dev/null +++ b/pkgs/by-name/tt/ttaenc/package.nix @@ -0,0 +1,44 @@ +{ + stdenv, + lib, + fetchurl, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "ttaenc"; + version = "3.4.1"; + + src = fetchurl { + url = "mirror://sourceforge/tta/ttaenc-${finalAttrs.version}-src.tgz"; + sha256 = "sha256-ssnIsBWsxYZPCCoBV/LgnFEX0URTIctheOkltEi+PcY="; + }; + + patches = [ + ./makefile.patch # Use stdenv's CC + ./ttaenc-inline.patch # Patch __inline used into always_inline for both GCC and clang + ]; + + makeFlags = [ "INSDIR=$(out)/bin" ]; + + preBuild = '' + # From the Makefile, with `-msse` removed, since we have those on by x86_64 by default. + makeFlagsArray+=(CFLAGS="-Wall -O2 -fomit-frame-pointer -funroll-loops -fforce-addr -falign-functions=4") + ''; + + postInstall = '' + # Copy docs + install -dm755 "$out/share/doc/${finalAttrs.pname}" + install -m644 "ChangeLog-${finalAttrs.version}" README "$out/share/doc/${finalAttrs.pname}" + ''; + + meta = { + description = "Lossless compressor for multichannel 8, 16 and 24 bits audio data, with the ability of password data protection"; + homepage = "https://sourceforge.net/projects/tta/"; + license = with lib.licenses; [ + gpl3Only + lgpl3Only + ]; + platforms = lib.platforms.unix; + mainProgram = "ttaenc"; + maintainers = with lib.maintainers; [ natsukagami ]; + }; +}) diff --git a/pkgs/by-name/tt/ttaenc/ttaenc-inline.patch b/pkgs/by-name/tt/ttaenc/ttaenc-inline.patch new file mode 100644 index 0000000000000..8ff4fa766bbab --- /dev/null +++ b/pkgs/by-name/tt/ttaenc/ttaenc-inline.patch @@ -0,0 +1,10 @@ +--- a/ttaenc.c ++++ b/ttaenc.c +@@ -10,6 +10,7 @@ + */ + + #include "ttaenc.h" ++#define __inline static inline __attribute__((always_inline)) + + /******************* static variables and structures *******************/ +