Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
15 changes: 15 additions & 0 deletions pkgs/by-name/tt/ttaenc/makefile.patch
Original file line number Diff line number Diff line change
@@ -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)
44 changes: 44 additions & 0 deletions pkgs/by-name/tt/ttaenc/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
})
10 changes: 10 additions & 0 deletions pkgs/by-name/tt/ttaenc/ttaenc-inline.patch
Original file line number Diff line number Diff line change
@@ -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 *******************/