push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{
stdenv,
lib,
fetchurl,
fetchzip,
jre,
makeWrapper,
}:
let
translation-file = fetchurl {
url = "https://gitlab.com/bmwinger/tr-patcher/-/raw/master/lib/Translation.txt?inline=false";
sha256 = "136zd2s73b4n1w2n34wxi656bm448748nn3y7a64fd89ysg9n7n8";
};
in
stdenv.mkDerivation {
pname = "tr-patcher";
version = "1.0.5";
# use the pre compiled source, as compilation is a bit complex
src = fetchzip {
url = "https://gitlab.com/bmwinger/tr-patcher/uploads/b57899980b2351c136393f02977c4fab/tr-patcher-shadow.zip";
sha256 = "0va7nbmlgf3p2nc0z2b9n1285y4q5rpyjr4w93rdnx38wrhinxnw";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm644 lib/tr-patcher-all.jar $out/lib/tr-patcher.jar
install -Dm644 ${translation-file} $out/lib/Translation.txt
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/tr-patcher \
--add-flags "-jar $out/lib/tr-patcher.jar"
'';
meta = with lib; {
description = "Allow to update dependancies of the Tamriel-Data mod for morrowind";
mainProgram = "tr-patcher";
homepage = "https://gitlab.com/bmwinger/tr-patcher";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl3;
maintainers = [ maintainers.marius851000 ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,43 @@
{
fetchzip,
lib,
pkgs,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation rec {
pname = "traccar";
version = "6.9.1";
nativeBuildInputs = [ pkgs.makeWrapper ];
src = fetchzip {
stripRoot = false;
url = "https://github.com/traccar/traccar/releases/download/v${version}/traccar-other-${version}.zip";
hash = "sha256-PR0crdEGYr4lVp5JSFSLGsR+uZKWulfp6LA57y9K88E=";
};
installPhase = ''
runHook preInstall
for dir in lib schema templates web ; do
mkdir -p $out/$dir
cp -a $dir $out
done
mkdir -p $out/share/traccar
install -Dm644 tracker-server.jar $out
makeWrapper ${pkgs.openjdk}/bin/java $out/bin/traccar \
--add-flags "-jar $out/tracker-server.jar"
runHook postInstall
'';
meta = with lib; {
description = "Open source GPS tracking system";
homepage = "https://www.traccar.org/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
mainProgram = "traccar";
maintainers = with maintainers; [ frederictobiasc ];
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libpcap,
lua5_1,
json_c,
testers,
tracebox,
}:
stdenv.mkDerivation rec {
pname = "tracebox";
version = "0.4.4";
src = fetchFromGitHub {
owner = "tracebox";
repo = "tracebox";
tag = "v${version}";
hash = "sha256-1KBJ4uXa1XpzEw23IjndZg+aGJXk3PVw8LYKAvxbxCA=";
fetchSubmodules = true;
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libpcap
lua5_1
json_c
];
postPatch = ''
sed -i configure.ac \
-e 's,$(git describe .*),${version},'
'';
configureFlags = [
"--with-lua=yes"
"--with-libpcap=yes"
];
env = {
CXXFLAGS = "-std=c++14";
LUA_LIB = "-llua";
PCAPLIB = "-lpcap";
};
enableParallelBuilding = true;
passthru.tests.version = testers.testVersion {
package = tracebox;
command = "tracebox -V";
};
meta = with lib; {
homepage = "http://www.tracebox.org/";
description = "Middlebox detection tool";
license = licenses.gpl2Only;
maintainers = with maintainers; [ ck3d ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,60 @@
From 9a900efb997dee158ce25114633cd07f44ef617a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20H=C3=A4ring?= <tim.haering@gmail.com>
Date: Sat, 17 May 2025 18:19:45 +0200
Subject: [PATCH] fix: do not build libbpf
---
Makefile | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 0fce8de12..bb9937ed5 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@ get_priv_reqs_recursive() { \
fi; \
processed_libs="$$processed_libs $$lib"; \
if [ "$$lib" = "libbpf" ]; then \
- priv_reqs=$$(PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(CMD_PKGCONFIG) --print-requires-private $$lib); \
+ priv_reqs=$$($(CMD_PKGCONFIG) --print-requires-private $$lib); \
else \
echo $$lib; \
priv_reqs=$$($(CMD_PKGCONFIG) --print-requires-private $$lib); \
@@ -374,7 +374,7 @@ LIBBPF_DESTDIR = $(OUTPUT_DIR)/libbpf
LIBBPF_OBJDIR = $(LIBBPF_DESTDIR)/obj
LIBBPF_OBJ = $(LIBBPF_OBJDIR)/libbpf.a
-$(LIBBPF_OBJ): .build_libbpf .build_libbpf_fix
+$(LIBBPF_OBJ):
.build_libbpf: \
$(LIBBPF_SRC) \
@@ -413,7 +413,7 @@ LIBBPF_INCLUDE_UAPI = ./3rdparty/libbpf/include/uapi/linux
@$(CMD_TOUCH) $@
-TRACEE_EBPF_CFLAGS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(CMD_PKGCONFIG) $(PKG_CONFIG_FLAG) --cflags $(LIB_BPF))
+TRACEE_EBPF_CFLAGS = $(shell $(CMD_PKGCONFIG) $(PKG_CONFIG_FLAG) --cflags $(LIB_BPF))
.ONESHELL:
.eval_goenv: $(LIBBPF_OBJ)
@@ -430,7 +430,7 @@ endif
$(eval GO_ENV_EBPF += GOARCH=$(GO_ARCH))
$(eval CUSTOM_CGO_CFLAGS := "$(TRACEE_EBPF_CFLAGS)")
$(eval GO_ENV_EBPF += CGO_CFLAGS=$(CUSTOM_CGO_CFLAGS))
- $(eval CUSTOM_CGO_LDFLAGS := "$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(CMD_PKGCONFIG) $(PKG_CONFIG_FLAG) --libs $(LIB_BPF))")
+ $(eval CUSTOM_CGO_LDFLAGS := "$(shell $(CMD_PKGCONFIG) $(PKG_CONFIG_FLAG) --libs $(LIB_BPF))")
$(eval GO_ENV_EBPF := $(GO_ENV_EBPF) CGO_LDFLAGS=$(CUSTOM_CGO_LDFLAGS))
export GO_ENV_EBPF=$(GO_ENV_EBPF)
echo 'GO_ENV_EBPF := $(GO_ENV_EBPF)' > $(GOENV_MK)
@@ -486,7 +486,6 @@ TRACEE_SRC_DIRS = ./cmd/ ./pkg/ ./signatures/
TRACEE_SRC = $(shell find $(TRACEE_SRC_DIRS) -type f -name '*.go' ! -name '*_test.go')
GO_TAGS_EBPF = core,ebpf
CGO_EXT_LDFLAGS_EBPF =
-PKG_CONFIG_PATH = $(LIBBPF_OBJDIR)
PKG_CONFIG_FLAG =
TRACEE_PROTOS = ./api/v1beta1/*.proto
--
2.49.0

View File

@@ -0,0 +1,51 @@
{
lib,
tracee,
makeWrapper,
}:
tracee.overrideAttrs (oa: {
pname = oa.pname + "-integration";
postPatch = oa.postPatch or "" + ''
# fix the test to look at nixos paths for running programs
# --replace-fail '"integration.tes"' '"tracee-integrat"' \
substituteInPlace tests/integration/event_filters_test.go \
--replace-fail "exec=/usr/bin/dockerd" "comm=dockerd" \
--replace-fail "exec=/usr/bin" "exec=/tmp/testdir" \
--replace-fail "/usr/bin/tee" "tee" \
--replace-fail "/usr/bin" "/run/current-system/sw/bin" \
--replace-fail 'syscallerAbsPath := filepath.Join("..", "..", "dist", "syscaller")' "syscallerAbsPath := filepath.Join(\"$out/bin/syscaller\")"
substituteInPlace tests/integration/exec_test.go \
--replace-fail "/usr/bin" "/run/current-system/sw/bin"
substituteInPlace tests/integration/dependencies_test.go \
--replace-fail "/bin" "/run/current-system/sw/bin" \
--replace-fail "/tmp/test" "/tmp/ls"
substituteInPlace tests/testutils/tracee.go \
--replace-fail "../../dist/tracee" "${lib.getExe tracee}"
'';
nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [ makeWrapper ];
buildPhase = ''
runHook preBuild
# copy existing built object to dist
mkdir -p dist/btfhub
touch dist/btfhub/.placeholder
cp ${lib.getOutput "lib" tracee}/lib/tracee/tracee.bpf.o ./dist/
# then compile the tests to be ran later
mkdir -p $GOPATH/tracee-integration
CGO_LDFLAGS="$(pkg-config --libs libbpf)" go build -o $GOPATH/tracee-integration/syscaller ./tests/integration/syscaller/cmd
CGO_LDFLAGS="$(pkg-config --libs libbpf)" go test -tags core,ebpf,integration -c -o $GOPATH/tracee-integration/ ./tests/integration/...
runHook postBuild
'';
doCheck = false;
installPhase = ''
mkdir -p $out/bin
mv $GOPATH/tracee-integration/{integration.test,syscaller} $out/bin/
# cp -r ${tracee}/bin/signatures $out/bin/
'';
doInstallCheck = false;
outputs = [ "out" ];
meta = oa.meta // {
outputsToInstall = [ "out" ];
};
})

View File

@@ -0,0 +1,131 @@
{
lib,
buildGoModule,
fetchFromGitHub,
clang,
pkg-config,
elfutils,
libbpf,
zlib,
zstd,
nixosTests,
testers,
tracee,
makeWrapper,
}:
buildGoModule rec {
pname = "tracee";
version = "0.23.2";
# src = /home/tim/repos/tracee;
src = fetchFromGitHub {
owner = "aquasecurity";
repo = "tracee";
# project has branches and tags of the same name
tag = "v${version}";
hash = "sha256-Rf1pa9e6t002ltg40xZZVpE5OL9Vl02Xcn2Ux0To408=";
};
vendorHash = "sha256-2+4UN9WB6eGzedogy5dMvhHj1x5VeUUkDM0Z28wKQgM=";
patches = [
./0001-fix-do-not-build-libbpf.patch
];
enableParallelBuilding = true;
# needed to build bpf libs
hardeningDisable = [
"stackprotector"
"zerocallusedregs"
];
nativeBuildInputs = [
clang
pkg-config
];
buildInputs = [
elfutils
libbpf
zlib.dev
zstd.dev
];
makeFlags = [
"RELEASE_VERSION=v${version}"
"GO_DEBUG_FLAG=-s -w"
# don't actually need git but the Makefile checks for it
"CMD_GIT=echo"
];
buildPhase = ''
runHook preBuild
mkdir -p ./dist
make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} bpf all
runHook postBuild
'';
# tests require a separate go module
# integration tests are ran within a nixos vm
# see passthru.tests.integration
doCheck = false;
outputs = [
"out"
"lib"
"share"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $lib/lib/tracee $share/share/tracee
mv ./dist/{tracee,signatures} $out/bin/
mv ./dist/tracee.bpf.o $lib/lib/tracee/
mv ./cmd/tracee-rules/templates $share/share/tracee/
runHook postInstall
'';
passthru.tests = {
integration = nixosTests.tracee;
integration-test-cli = import ./integration-tests.nix { inherit lib tracee makeWrapper; };
version = testers.testVersion {
package = tracee;
version = "v${version}";
command = "tracee version";
};
};
meta = with lib; {
homepage = "https://aquasecurity.github.io/tracee/latest/";
changelog = "https://github.com/aquasecurity/tracee/releases/tag/v${version}";
description = "Linux Runtime Security and Forensics using eBPF";
mainProgram = "tracee";
longDescription = ''
Tracee is a Runtime Security and forensics tool for Linux. It is using
Linux eBPF technology to trace your system and applications at runtime,
and analyze collected events to detect suspicious behavioral patterns. It
is delivered as a Docker image that monitors the OS and detects suspicious
behavior based on a pre-defined set of behavioral patterns.
'';
license = with licenses; [
# general license
asl20
# pkg/ebpf/c/*
gpl2Plus
];
maintainers = with maintainers; [ jk ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
outputsToInstall = [
"out"
"share"
];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/Utils/Logger.cpp b/Utils/Logger.cpp
index 747cd63..e3efdf1 100644
--- a/Utils/Logger.cpp
+++ b/Utils/Logger.cpp
@@ -29,7 +29,7 @@ Logger::Logger(char* tracepath) {
trace = fopen(tracepath, "w");
// dot file is not used, set null as default value
- dot = '\0';
+ dot = nullptr;
//dot = fopen("gcKons.dot", "w");
//fprintf(dot,"digraph G {\n");
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "tracefilegen";
version = "0-unstable-2017-05-13";
src = fetchFromGitHub {
owner = "GarCoSim";
repo = "TraceFileGen";
rev = "0ebfd1fdb54079d4bdeaa81fc9267ecb9f016d60";
sha256 = "1gsx18ksgz5gwl3v62vgrmhxc0wc99i74qwhpn0h57zllk41drjc";
};
nativeBuildInputs = [ cmake ];
patches = [ ./gcc7.patch ];
installPhase = ''
install -Dm755 TraceFileGen $out/bin/TraceFileGen
mkdir -p $out/share/doc/${pname}-${version}/
cp -ar $src/Documentation/html $out/share/doc/${pname}-${version}/.
'';
meta = with lib; {
description = "Automatically generate all types of basic memory management operations and write into trace files";
mainProgram = "TraceFileGen";
homepage = "https://github.com/GarCoSim";
maintainers = [ maintainers.cmcdragonkai ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "tracefilesim";
version = "unstable-2015-11-07";
src = fetchFromGitHub {
owner = "GarCoSim";
repo = "TraceFileSim";
rev = "368aa6b1d6560e7ecbd16fca47000c8f528f3da2";
sha256 = "156m92k38ap4bzidbr8dzl065rni8lrib71ih88myk9z5y1x5nxm";
};
hardeningDisable = [ "fortify" ];
installPhase = ''
mkdir --parents "$out/bin"
cp ./traceFileSim "$out/bin"
'';
meta = with lib; {
description = "Ease the analysis of existing memory management techniques, as well as the prototyping of new memory management techniques";
mainProgram = "traceFileSim";
homepage = "https://github.com/GarCoSim";
maintainers = [ maintainers.cmcdragonkai ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,36 @@
{
fetchFromGitHub,
help2man,
lib,
nix-update-script,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tracelinks";
version = "1.0.2";
src = fetchFromGitHub {
owner = "flox";
repo = "tracelinks";
tag = "v${finalAttrs.version}";
hash = "sha256-sGC1TdcugitMgafnCZGpwYPqWioX+fRl2ZqDZE9levY=";
};
makeFlags = [
"PREFIX=$(out)"
"VERSION=${finalAttrs.version}"
];
nativeBuildInputs = [ help2man ];
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Report on symbolic links encountered in path traversals";
homepage = "https://github.com/flox/tracelinks";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ limeytexan ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "traceroute";
version = "2.1.6";
src = fetchurl {
url = "mirror://sourceforge/traceroute/${pname}-${version}.tar.gz";
sha256 = "sha256-nM75zbnXqY/3+/k/eevQ5IiBZktSXEsjKg/Ox9y5214=";
};
makeFlags = [
"prefix=$(out)"
"LDFLAGS=-lm"
"env=yes"
];
preConfigure = ''
sed -i 's@LIBS := \(.*\) -lm \(.*\)@LIBS := \1 \2@' Make.rules
'';
meta = {
description = "Tracks the route taken by packets over an IP network";
homepage = "https://traceroute.sourceforge.net/";
changelog = "https://sourceforge.net/projects/traceroute/files/traceroute/traceroute-${version}/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ koral ];
platforms = lib.platforms.linux;
mainProgram = "traceroute";
};
}

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
cargo-about,
nix-update-script,
pkg-config,
libbpf,
elfutils,
libseccomp,
zlib,
clang,
}:
rustPlatform.buildRustPackage rec {
pname = "tracexec";
version = "0.13.1";
src = fetchFromGitHub {
owner = "kxxt";
repo = "tracexec";
rev = "dbb9b733370f5200df2a0de7f007312c23431480";
hash = "sha256-M2ZIfWupnFxQZvr5cl8V0xtLgh+xBcaHHVsHIoio7nI=";
};
cargoHash = "sha256-cyzSxibLw6sb0V3ueNcp55OhFQ5jUNJWcSF8uYnzG2M=";
hardeningDisable = [ "zerocallusedregs" ];
nativeBuildInputs = [
cargo-about
pkg-config
clang
];
buildInputs = [
libbpf
elfutils
libseccomp
zlib
];
cargoBuildFlags = [
"--no-default-features"
"--features=recommended"
]
# Remove RiscV64 specialisation when this is fixed:
# * https://github.com/NixOS/nixpkgs/pull/310158#pullrequestreview-2046944158
# * https://github.com/rust-vmm/seccompiler/pull/72
++ lib.optional stdenv.hostPlatform.isRiscV64 "--no-default-features";
preBuild = ''
sed -i '1ino-clearly-defined = true' about.toml # disable network requests
cargo about generate --config about.toml -o THIRD_PARTY_LICENSES.HTML about.hbs
'';
checkFlags = [
"--skip=cli::test::log_mode_without_args_works" # `Permission denied` (needs `CAP_SYS_PTRACE`)
];
postInstall = ''
# Remove test binaries (e.g. `empty-argv`, `corrupted-envp`) and only retain `tracexec`
find "$out/bin" -type f \! -name tracexec -print0 | xargs -0 rm -v
install -Dm644 LICENSE -t "$out/share/licenses/tracexec/"
install -Dm644 THIRD_PARTY_LICENSES.HTML -t "$out/share/licenses/tracexec/"
'';
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/kxxt/tracexec/blob/v${version}/CHANGELOG.md";
description = "Small utility for tracing execve{,at} and pre-exec behavior";
homepage = "https://github.com/kxxt/tracexec";
license = lib.licenses.gpl2Plus;
mainProgram = "tracexec";
maintainers = with lib.maintainers; [
fpletz
nh2
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
SDL2,
SDL2_ttf,
gettext,
zlib,
SDL2_mixer,
SDL2_image,
guile,
libGLU,
libGL,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "trackballs";
version = "1.3.4";
src = fetchFromGitHub {
owner = "trackballs";
repo = "trackballs";
tag = "v${finalAttrs.version}";
hash = "sha256-JKSiNe5mu8rRztUhduGFY6IsSMx6VyBqKcGO5EssI+8=";
};
postPatch = ''
substituteInPlace src/glHelp.h --replace-fail _TTF_Font TTF_Font
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
zlib
SDL2
SDL2_ttf
SDL2_mixer
SDL2_image
guile
gettext
libGLU
libGL
];
meta = {
homepage = "https://trackballs.github.io/";
description = "3D Marble Madness clone";
mainProgram = "trackballs";
platforms = lib.platforms.linux;
# Music is licensed under Ethymonics Free Music License.
license = lib.licenses.gpl2Plus;
};
})

View File

@@ -0,0 +1,118 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
wrapGAppsHook3,
gobject-introspection,
glib,
gtk3,
qt5,
makeDesktopItem,
copyDesktopItems,
withCurses ? false,
withGTK ? false,
withQT ? false,
}:
let
mkDesktopItem =
name: desktopName: comment: terminal:
makeDesktopItem {
inherit
name
desktopName
comment
terminal
;
icon = "trackma";
exec = name + " %u";
type = "Application";
categories = [ "Network" ];
};
in
python3.pkgs.buildPythonApplication rec {
pname = "trackma";
version = "0.9";
format = "pyproject";
src = fetchFromGitHub {
owner = "z411";
repo = "trackma";
tag = "v${version}";
sha256 = "Hov9qdVabu1k3SIoUmvcRtSK8TcETqGPXI2RqN/bei4=";
fetchSubmodules = true; # for anime-relations submodule
};
nativeBuildInputs = [
copyDesktopItems
python3.pkgs.poetry-core
]
++ lib.optionals withGTK [
wrapGAppsHook3
gobject-introspection
]
++ lib.optionals withQT [ qt5.wrapQtAppsHook ];
buildInputs = lib.optionals withGTK [
glib
gtk3
];
propagatedBuildInputs =
with python3.pkgs;
(
[ requests ]
++ lib.optionals withQT [ pyqt5 ]
++ lib.optionals withGTK [
pycairo
pygobject3
]
++ lib.optionals withCurses [ urwid ]
++ lib.optionals stdenv.hostPlatform.isLinux [
pydbus
pyinotify
]
++ lib.optionals (withGTK || withQT) [ pillow ]
);
dontWrapQtApps = true;
dontWrapGApps = true;
preFixup =
lib.optional withQT "wrapQtApp $out/bin/trackma-qt"
++ lib.optional withGTK "wrapGApp $out/bin/trackma-gtk";
desktopItems =
lib.optional withQT (
mkDesktopItem "trackma-qt" "Trackma (Qt)" "Trackma Updater (Qt-frontend)" false
)
++ lib.optional withGTK (
mkDesktopItem "trackma-gtk" "Trackma (GTK)" "Trackma Updater (Gtk-frontend)" false
)
++ lib.optional withCurses (
mkDesktopItem "trackma-curses" "Trackma (ncurses)" "Trackma Updater (ncurses frontend)" true
);
postInstall = ''
install -Dvm444 $src/trackma/data/icon.png $out/share/pixmaps/trackma.png
'';
doCheck = false;
pythonImportsCheck = [ "trackma" ];
postDist =
lib.optional (!withQT) "rm $out/bin/trackma-qt"
++ lib.optional (!withGTK) "rm $out/bin/trackma-gtk"
++ lib.optional (!withCurses) "rm $out/bin/trackma-curses";
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://github.com/z411/trackma";
description = "Open multi-site list manager for Unix-like systems (ex-wMAL)";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
version="$(curl --silent "https://api.github.com/repos/z411/trackma/releases" | jq '.[0].tag_name' --raw-output)"
update-source-version trackma "${version:1}"

View File

@@ -0,0 +1,13 @@
diff --git a/src/tractor/db.py b/src/tractor/db.py
index 6f39bc4..22fbdd2 100644
--- a/src/tractor/db.py
+++ b/src/tractor/db.py
@@ -15,7 +15,7 @@ def dconf() -> Gio.Settings:
"""
schema = "org.tractor"
schemas = Gio.SettingsSchemaSource.get_default()
- if not Gio.SettingsSchemaSource.lookup(schemas, schema, False):
+ if not Gio.SettingsSchemaSource.lookup(schemas, schema, recursive=True):
gschema_dir = "/usr/share/glib-2.0/schemas/"
for directory in GLib.get_system_data_dirs():
gdir = f"{directory}/glib-2.0/schemas/"

View File

@@ -0,0 +1,91 @@
{
lib,
fetchFromGitLab,
glib,
python3Packages,
gobject-introspection,
gsettings-desktop-schemas,
tor,
obfs4,
snowflake,
conjure-tor,
wrapGAppsHook4,
withObfs4 ? true,
withSnowflake ? true,
withConjure ? true,
}:
let
# This package should be updated together with pkgs/by-name/ca/carburetor/package.nix
version = "5.1.0";
in
python3Packages.buildPythonApplication {
pname = "tractor";
inherit version;
pyproject = true;
src = fetchFromGitLab {
domain = "framagit.org";
owner = "tractor";
repo = "tractor";
tag = version;
hash = "sha256-pyGDxHOpaZutUhXRwGAN77fGNn68EWIGgWu80avkuSI=";
};
patches = [ ./fix-gsettings-schema.patch ];
nativeBuildInputs = [
glib
gobject-introspection
gsettings-desktop-schemas
wrapGAppsHook4
];
propagatedBuildInputs = [
tor
]
++ lib.optional withObfs4 obfs4
++ lib.optional withSnowflake snowflake
++ lib.optional withConjure conjure-tor;
dependencies = [
python3Packages.setuptools
python3Packages.fire
python3Packages.pygobject3
python3Packages.pysocks
python3Packages.stem
];
postInstall = ''
mkdir -p "$out/share/glib-2.0/schemas"
cp "$src/src/tractor/tractor.gschema.xml" "$out/share/glib-2.0/schemas"
''
+ lib.optionalString withObfs4 ''
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/obfs4proxy' '${obfs4}/bin/lyrebird'
''
+ lib.optionalString withSnowflake ''
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/snowflake-client' '${snowflake}/bin/client'
''
+ lib.optionalString withConjure ''
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/conjure-client' '${conjure-tor}/bin/client'
''
+ ''
glib-compile-schemas "$out/share/glib-2.0/schemas"
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = {
homepage = "https://framagit.org/tractor/tractor";
description = "Setup a proxy with Onion Routing via TOR and optionally obfs4proxy";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
mainProgram = "tractor";
maintainers = with lib.maintainers; [ mksafavi ];
};
}

View File

@@ -0,0 +1,24 @@
From 05074295013a2bf7fa1b6af1b6575e5e0c491454 Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <contact@paveloom.dev>
Date: Thu, 18 Jul 2024 21:54:44 +0300
Subject: [PATCH] Don't use the `UniformTypeIdentifiers` framework.
---
cmake/vendor.cmake | 1 -
1 file changed, 1 deletion(-)
diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake
index bd53a4db..8079d8c2 100644
--- a/cmake/vendor.cmake
+++ b/cmake/vendor.cmake
@@ -182,7 +182,6 @@ if (NOT NO_FILESELECTOR AND NOT EMSCRIPTEN)
if (APPLE)
find_library(APPKIT_LIBRARY AppKit)
- find_library(UNIFORMTYPEIDENTIFIERS_LIBRARY UniformTypeIdentifiers)
target_link_libraries(TracyNfd PUBLIC ${APPKIT_LIBRARY} ${UNIFORMTYPEIDENTIFIERS_LIBRARY})
elseif (UNIX)
if (GTK_FILESELECTOR)
--
2.45.2

View File

@@ -0,0 +1,130 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
pkg-config,
wayland-scanner,
capstone,
dbus,
freetype,
glfw,
onetbb,
withGtkFileSelector ? false,
gtk3,
withWayland ? stdenv.hostPlatform.isLinux,
libglvnd,
libxkbcommon,
wayland,
wayland-protocols,
}:
assert withGtkFileSelector -> stdenv.hostPlatform.isLinux;
stdenv.mkDerivation rec {
pname = if withWayland then "tracy-wayland" else "tracy-glfw";
version = "0.11.1";
src = fetchFromGitHub {
owner = "wolfpld";
repo = "tracy";
rev = "v${version}";
hash = "sha256-HofqYJT1srDJ6Y1f18h7xtAbI/Gvvz0t9f0wBNnOZK8=";
};
patches = lib.optional (
stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11"
) ./dont-use-the-uniformtypeidentifiers-framework.patch;
nativeBuildInputs = [
cmake
ninja
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]
++ lib.optionals stdenv.cc.isClang [ stdenv.cc.cc.libllvm ];
buildInputs = [
capstone
freetype
onetbb
]
++ lib.optionals (stdenv.hostPlatform.isLinux && withGtkFileSelector) [ gtk3 ]
++ lib.optionals (stdenv.hostPlatform.isLinux && !withGtkFileSelector) [ dbus ]
++ lib.optionals (stdenv.hostPlatform.isLinux && withWayland) [
libglvnd
libxkbcommon
wayland
wayland-protocols
]
++ lib.optionals (stdenv.hostPlatform.isDarwin || (stdenv.hostPlatform.isLinux && !withWayland)) [
glfw
];
cmakeFlags = [
"-DDOWNLOAD_CAPSTONE=off"
"-DTRACY_STATIC=off"
]
++ lib.optional (stdenv.hostPlatform.isLinux && withGtkFileSelector) "-DGTK_FILESELECTOR=ON"
++ lib.optional (stdenv.hostPlatform.isLinux && !withWayland) "-DLEGACY=on";
env.NIX_CFLAGS_COMPILE = toString (
[ ]
++ lib.optional stdenv.hostPlatform.isLinux "-ltbb"
# Workaround for https://github.com/NixOS/nixpkgs/issues/19098
++ lib.optional (stdenv.cc.isClang && stdenv.hostPlatform.isDarwin) "-fno-lto"
);
dontUseCmakeBuildDir = true;
postConfigure = ''
cmake -B capture/build -S capture $cmakeFlags
cmake -B csvexport/build -S csvexport $cmakeFlags
cmake -B import/build -S import $cmakeFlags
cmake -B profiler/build -S profiler $cmakeFlags
cmake -B update/build -S update $cmakeFlags
'';
postBuild = ''
ninja -C capture/build
ninja -C csvexport/build
ninja -C import/build
ninja -C profiler/build
ninja -C update/build
'';
postInstall = ''
install -D -m 0555 capture/build/tracy-capture -t $out/bin
install -D -m 0555 csvexport/build/tracy-csvexport $out/bin
install -D -m 0555 import/build/{tracy-import-chrome,tracy-import-fuchsia} -t $out/bin
install -D -m 0555 profiler/build/tracy-profiler $out/bin/tracy
install -D -m 0555 update/build/tracy-update -t $out/bin
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace extra/desktop/tracy.desktop \
--replace-fail Exec=/usr/bin/tracy Exec=tracy
install -D -m 0444 extra/desktop/application-tracy.xml $out/share/mime/packages/application-tracy.xml
install -D -m 0444 extra/desktop/tracy.desktop $out/share/applications/tracy.desktop
install -D -m 0444 icon/application-tracy.svg $out/share/icons/hicolor/scalable/apps/application-tracy.svg
install -D -m 0444 icon/icon.png $out/share/icons/hicolor/256x256/apps/tracy.png
install -D -m 0444 icon/icon.svg $out/share/icons/hicolor/scalable/apps/tracy.svg
'';
meta = with lib; {
description = "Real time, nanosecond resolution, remote telemetry frame profiler for games and other applications";
homepage = "https://github.com/wolfpld/tracy";
license = licenses.bsd3;
mainProgram = "tracy";
maintainers = with maintainers; [
mpickering
nagisa
];
platforms = platforms.linux ++ lib.optionals (!withWayland) platforms.darwin;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tradcpp";
version = "0.5.3";
src = fetchurl {
url = "https://ftp.netbsd.org/pub/NetBSD/misc/dholland/tradcpp-${finalAttrs.version}.tar.gz";
hash = "sha256-4XufQs90s2DVaRvFn7U/N+QVgcRbdfzWS7ll5eL+TF4=";
};
# tradcpp only comes with BSD-make Makefile; the patch adds configure support
patches = [ ./tradcpp-configure.patch ];
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
meta = {
description = "Traditional (K&R-style) C macro preprocessor";
mainProgram = "tradcpp";
platforms = lib.platforms.all;
license = lib.licenses.bsd2;
};
})

View File

@@ -0,0 +1,84 @@
*** /dev/null Wed Jan 7 11:47:26 2015
--- tradcpp-0.4/Makefile.in Wed Jan 7 11:43:15 2015
***************
*** 0 ****
--- 1,64 ----
+ SHELL = /bin/sh
+
+ ### Filled in by `configure' ###
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+ CC = @CC@
+ CFLAGS = @CFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+
+ LDFLAGS = @LDFLAGS@
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+
+ bindir = @bindir@
+ libdir = @libdir@
+ incdir = @includedir@
+ manext = 1
+ mandir = @mandir@/man$(manext)
+ docdir = @docdir@
+ datarootdir = @datarootdir@
+ datadir = @datadir@
+
+ OBJS= main.o \
+ files.o directive.o eval.o macro.o output.o \
+ place.o array.o utils.o
+
+ .PHONY: all clean install man doc dist
+
+ default: all
+
+ all: tradcpp
+
+ tradcpp: $(OBJS)
+ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $(OBJS)
+
+ clean:
+ rm -f *.o
+
+ distclean: clean
+ rm -f Makefile config.log config.status config-cache
+
+ install: tradcpp
+ mkdir -p $(DESTDIR)$(mandir)
+ install tradcpp.1 $(DESTDIR)$(mandir)
+ mkdir -p $(DESTDIR)$(bindir)
+ install tradcpp $(DESTDIR)$(bindir)
+
+ .c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+ array.o: array.c array.h inlinedefs.h utils.h
+ directive.o: directive.c utils.h mode.h place.h files.h directive.h \
+ macro.h eval.h output.h
+ eval.o: eval.c utils.h array.h inlinedefs.h mode.h place.h eval.h
+ files.o: files.c array.h inlinedefs.h utils.h mode.h place.h files.h \
+ directive.h
+ macro.o: macro.c array.h inlinedefs.h utils.h mode.h place.h macro.h \
+ output.h
+ main.o: main.c version.h config.h utils.h array.h inlinedefs.h mode.h \
+ place.h files.h directive.h macro.h
+ output.o: output.c utils.h mode.h place.h output.h
+ place.o: place.c utils.h array.h inlinedefs.h place.h
+ utils.o: utils.c utils.h
*** /dev/null Wed Jan 7 11:47:26 2015
--- tradcpp-0.4/configure.ac Wed Jan 7 11:22:18 2015
***************
*** 0 ****
--- 1,10 ----
+ AC_PREREQ([2.60])dnl
+ AC_INIT(main.c)
+ AC_PROG_CC
+ AC_LANG(C)
+ AC_SUBST(CC)
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(LD)
+ AC_OUTPUT(Makefile)

View File

@@ -0,0 +1,34 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "traderepublic-portfolio-downloader";
version = "0.19.0";
src = fetchFromGitHub {
owner = "dhojayev";
repo = "traderepublic-portfolio-downloader";
tag = "v${version}";
hash = "sha256-z+8VIN3rN1s8VFIGIJ6mwKbcajIcfN0TnB0Vfq5VXYM=";
};
vendorHash = "sha256-MapulF+ppRW3ClI9RlVV5TEp/nNQz3LD5WdwN5AL8sw=";
postInstall = ''
mv $out/bin/public $out/bin/traderepublic-portfolio-downloader
rm $out/bin/dev
rm $out/bin/example-generator
'';
meta = {
description = "Downloads trade republic portfolio data";
homepage = "https://github.com/dhojayev/traderepublic-portfolio-downloader";
changelog = "https://github.com/dhojayev/traderepublic-portfolio-downloader/releases/tag/v${version}";
license = lib.licenses.gpl3;
mainProgram = "traderepublic-portfolio-downloader";
maintainers = with lib.maintainers; [ seineeloquenz ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,103 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
squashfsTools,
makeBinaryWrapper,
alsa-lib,
atk,
at-spi2-atk,
cups,
gtk3,
libdrm,
libsecret,
libxkbcommon,
libgbm,
libGL,
pango,
sqlite,
systemd,
wayland,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tradingview";
version = "2.12.0";
revision = "66";
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/nJdITJ6ZJxdvfu8Ch7n5kH5P99ClzBYV_${finalAttrs.revision}.snap";
hash = "sha512-ydk0/mJh4M02oIEfU3PKTwEO+nMpeJGuxQAly8WqJLx5GOQAb/J7VRB8IQpHHqWGeRfbwhantdZryQF8ngFJ/g==";
};
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
squashfsTools
];
buildInputs = [
(lib.getLib stdenv.cc.cc)
alsa-lib
atk
at-spi2-atk
cups
gtk3
libdrm
libsecret
libxkbcommon
libgbm
libGL
pango
sqlite
systemd
wayland
xorg.libxcb
xorg.libX11
xorg.libXext
];
unpackPhase = ''
runHook preUnpack
unsquashfs $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r squashfs-root $out/share/tradingview
rm -rf $out/share/tradingview/meta
substituteInPlace squashfs-root/meta/gui/tradingview.desktop \
--replace-fail \$\{SNAP}/meta/gui/icon.png tradingview
install -D --mode 644 squashfs-root/meta/gui/tradingview.desktop -t $out/share/applications
install -D --mode 644 squashfs-root/meta/gui/icon.png $out/share/icons/hicolor/512x512/apps/tradingview.png
mkdir $out/bin
makeWrapper $out/share/tradingview/tradingview $out/bin/tradingview \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
runHook postInstall
'';
preFixup = ''
patchelf --add-needed libGL.so.1 $out/share/tradingview/tradingview
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Charting platform for traders and investors";
homepage = "https://www.tradingview.com/desktop/";
changelog = "https://www.tradingview.com/support/solutions/43000673888/";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ prominentretail ];
platforms = [ "x86_64-linux" ];
mainProgram = "tradingview";
};
})

View File

@@ -0,0 +1,49 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq gitMinimal gnused gnugrep
#
# Get latest version of TradingView from Snapcraft.
#
snap_info=($(
curl --silent --header 'X-Ubuntu-Series: 16' \
'https://api.snapcraft.io/api/v1/snaps/details/tradingview' |
jq --raw-output \
'.revision,.download_sha512,.version,.last_updated'
))
# "revision" is the actual version identifier; "version" is for human consumption.
revision="${snap_info[0]}"
sha512="${snap_info[1]}"
sri=$(nix --extra-experimental-features nix-command hash to-sri --type "sha512" $sha512)
upstream_version="${snap_info[2]}"
last_updated="${snap_info[3]}"
echo "Latest release is $upstream_version from $last_updated."
#
# Read the current TradingView version.
#
nixpkgs="$(git rev-parse --show-toplevel)"
tradingview_nix="$nixpkgs/pkgs/by-name/tr/tradingview/package.nix"
current_nix_version=$(nix eval --raw --file . tradingview.version)
echo "Current nix version: $current_nix_version"
if [[ "$current_nix_version" = "$upstream_version" ]]; then
echo "TradingView is already up-to-date"
exit 0
fi
#
# Find and replace.
#
echo "Updating from ${current_nix_version} to ${upstream_version}, released ${last_updated}"
echo 's/hash\s*=\s*"[^"]*"\s*;/hash = "'"${sri}"'";/'
sed --regexp-extended \
-e 's/revision\s*=\s*"[0-9]+"\s*;/revision = "'"${revision}"'";/' \
-e 's#hash\s*=\s*"[^"]*"\s*;#hash = "'"${sri}"'";#' \
-e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
-i "$tradingview_nix"

View File

@@ -0,0 +1,28 @@
{
fetchFromGitHub,
buildGoModule,
lib,
}:
buildGoModule rec {
pname = "traefik-certs-dumper";
version = "2.10.0";
src = fetchFromGitHub {
owner = "ldez";
repo = "traefik-certs-dumper";
rev = "v${version}";
sha256 = "sha256-zXbtabh5ZziELZHzvYisXETPUmhHAVo6sMuF4O3crBY=";
};
vendorHash = "sha256-WpYxI+7qBYibojPtYlWmDrmJYlRlVwTaqCMI5Vzh1RI=";
excludedPackages = "integrationtest";
meta = with lib; {
description = "Dump ACME data from traefik to certificates";
homepage = "https://github.com/ldez/traefik-certs-dumper";
license = licenses.asl20;
maintainers = with maintainers; [ nickcao ];
mainProgram = "traefik-certs-dumper";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
fetchzip,
buildGo124Module,
nixosTests,
nix-update-script,
}:
buildGo124Module (finalAttrs: {
pname = "traefik";
version = "3.5.3";
# Archive with static assets for webui
src = fetchzip {
url = "https://github.com/traefik/traefik/releases/download/v${finalAttrs.version}/traefik-v${finalAttrs.version}.src.tar.gz";
hash = "sha256-vKpOlB29OJHppQOspIICYgeAtemBGb419TIXIW9zrhU=";
stripRoot = false;
};
vendorHash = "sha256-Juf5LYB/o1hyTIZB5NQrJBOLdkEjL1mOsBgndF3vpd8=";
subPackages = [ "cmd/traefik" ];
env.CGO_ENABLED = 0;
preBuild = ''
GOOS= GOARCH= go generate
CODENAME=$(grep -Po "CODENAME \?=\s\K.+$" Makefile)
ldflags="-s"
ldflags+=" -w"
ldflags+=" -X github.com/traefik/traefik/v${lib.versions.major finalAttrs.version}/pkg/version.Version=${finalAttrs.version}"
ldflags+=" -X github.com/traefik/traefik/v${lib.versions.major finalAttrs.version}/pkg/version.Codename=$CODENAME"
'';
doCheck = false;
passthru.tests = {
inherit (nixosTests) traefik;
};
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://traefik.io";
description = "Modern reverse proxy";
changelog = "https://github.com/traefik/traefik/raw/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
djds
vdemeester
];
mainProgram = "traefik";
};
})

View File

@@ -0,0 +1,201 @@
{
lib,
stdenv,
fetchzip,
autoreconfHook,
makeWrapper,
nixosTests,
pkg-config,
file,
linuxHeaders,
openssl,
pcre,
perlPackages,
python3,
# recommended dependencies
withHwloc ? true,
hwloc,
withCurl ? true,
curl,
withCurses ? true,
ncurses,
withCap ? stdenv.hostPlatform.isLinux,
libcap,
withUnwind ? stdenv.hostPlatform.isLinux,
libunwind,
# optional dependencies
withBrotli ? false,
brotli,
withCjose ? false,
cjose,
withGeoIP ? false,
geoip,
withHiredis ? false,
hiredis,
withImageMagick ? false,
imagemagick,
withJansson ? false,
jansson,
withKyotoCabinet ? false,
kyotocabinet,
withLuaJIT ? false,
luajit,
withMaxmindDB ? false,
libmaxminddb,
# optional features
enableWCCP ? false,
}:
stdenv.mkDerivation rec {
pname = "trafficserver";
version = "9.2.11";
src = fetchzip {
url = "mirror://apache/trafficserver/trafficserver-${version}.tar.bz2";
hash = "sha256-WFABr7+JsUbQagLFK0OXZ20t4QCuYrozeaV4fKO/c2s=";
};
# NOTE: The upstream README indicates that flex is needed for some features,
# but it actually seems to be unnecessary as of this commit[1]. The detection
# logic for bison and flex is still present in the build script[2], but no
# other code seems to depend on it. This situation is susceptible to change
# though, so it's a good idea to inspect the build scripts periodically.
#
# [1]: https://github.com/apache/trafficserver/pull/5617
# [2]: https://github.com/apache/trafficserver/blob/3fd2c60/configure.ac#L742-L788
nativeBuildInputs = [
autoreconfHook
makeWrapper
pkg-config
file
python3
]
++ (with perlPackages; [
perl
ExtUtilsMakeMaker
])
++ lib.optionals stdenv.hostPlatform.isLinux [ linuxHeaders ];
buildInputs = [
openssl
pcre
perlPackages.perl
]
++ lib.optional withBrotli brotli
++ lib.optional withCap libcap
++ lib.optional withCjose cjose
++ lib.optional withCurl curl
++ lib.optional withGeoIP geoip
++ lib.optional withHiredis hiredis
++ lib.optional withHwloc hwloc
++ lib.optional withImageMagick imagemagick
++ lib.optional withJansson jansson
++ lib.optional withKyotoCabinet kyotocabinet
++ lib.optional withCurses ncurses
++ lib.optional withLuaJIT luajit
++ lib.optional withUnwind libunwind
++ lib.optional withMaxmindDB libmaxminddb;
outputs = [
"out"
"man"
];
postPatch = ''
patchShebangs \
iocore/aio/test_AIO.sample \
src/traffic_via/test_traffic_via \
src/traffic_logstats/tests \
tools/check-unused-dependencies
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace configure.ac \
--replace-fail '/usr/include/linux' '${linuxHeaders}/include/linux'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# 'xcrun leaks' probably requires non-free XCode
substituteInPlace iocore/net/test_certlookup.cc \
--replace-fail 'xcrun leaks' 'true'
'';
configureFlags = [
"--enable-layout=NixOS"
"--enable-experimental-plugins"
(lib.enableFeature enableWCCP "wccp")
(lib.withFeatureAs withHiredis "hiredis" hiredis)
];
installFlags = [
"pkgsysconfdir=${placeholder "out"}/etc/trafficserver"
# replace runtime directories with an install-time placeholder directory
"pkgcachedir=${placeholder "out"}/.install-trafficserver"
"pkglocalstatedir=${placeholder "out"}/.install-trafficserver"
"pkglogdir=${placeholder "out"}/.install-trafficserver"
"pkgruntimedir=${placeholder "out"}/.install-trafficserver"
];
postInstall = ''
install -Dm644 rc/trafficserver.service $out/lib/systemd/system/trafficserver.service
wrapProgram $out/bin/tspush \
--set PERL5LIB '${with perlPackages; makePerlPath [ URI ]}' \
--prefix PATH : "${lib.makeBinPath [ file ]}"
find "$out" -name '*.la' -delete
# ensure no files actually exist in this directory
rmdir $out/.install-trafficserver
'';
installCheckPhase =
let
expected = ''
Via header is [uScMsEf p eC:t cCMp sF], Length is 22
Via Header Details:
Request headers received from client :simple request (not conditional)
Result of Traffic Server cache lookup for URL :miss (a cache "MISS")
Response information received from origin server :error in response
Result of document write-to-cache: :no cache write performed
Proxy operation result :unknown
Error codes (if any) :connection to server failed
Tunnel info :no tunneling
Cache Type :cache
Cache Lookup Result :cache miss (url not in cache)
Parent proxy connection status :no parent proxy or unknown
Origin server connection status :connection open failed
'';
in
''
runHook preInstallCheck
diff -Naur <($out/bin/traffic_via '[uScMsEf p eC:t cCMp sF]') - <<EOF
${lib.removeSuffix "\n" expected}
EOF
runHook postInstallCheck
'';
doCheck = true;
doInstallCheck = true;
enableParallelBuilding = true;
passthru.tests = { inherit (nixosTests) trafficserver; };
meta = {
homepage = "https://trafficserver.apache.org";
changelog = "https://raw.githubusercontent.com/apache/trafficserver/${version}/CHANGELOG-${version}";
description = "Fast, scalable, and extensible HTTP caching proxy server";
longDescription = ''
Apache Traffic Server is a high-performance web proxy cache that improves
network efficiency and performance by caching frequently-accessed
information at the edge of the network. This brings content physically
closer to end users, while enabling faster delivery and reduced bandwidth
use. Traffic Server is designed to improve content delivery for
enterprises, Internet service providers (ISPs), backbone providers, and
large intranets by maximizing existing and available bandwidth.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ midchildan ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "traitor";
version = "0.0.14";
src = fetchFromGitHub {
owner = "liamg";
repo = "traitor";
rev = "v${version}";
sha256 = "sha256-LQfKdjZaTm5z8DUt6He/RJHbOUCUwP3CV3Fyt5rJIfU=";
};
vendorHash = null;
meta = with lib; {
description = "Automatic Linux privilege escalation";
longDescription = ''
Automatically exploit low-hanging fruit to pop a root shell. Traitor packages
up a bunch of methods to exploit local misconfigurations and vulnerabilities
(including most of GTFOBins) in order to pop a root shell.
'';
homepage = "https://github.com/liamg/traitor";
platforms = platforms.linux;
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "trak";
version = "0.0.5";
pyproject = true;
src = fetchFromGitHub {
owner = "lcfd";
repo = "trak";
rev = "v${version}";
hash = "sha256-YJMX7pNRWdNPyWNZ1HfpdYsKSStRWLcianLz6nScMa8=";
};
sourceRoot = "${src.name}/cli";
dependencies = with python3Packages; [
questionary
typer
];
build-system = [ python3Packages.poetry-core ];
meta = {
description = "Keep a record of the time you dedicate to your projects";
homepage = "https://github.com/lcfd/trak";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ buurro ];
mainProgram = "trak";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "tran";
version = "0.1.43";
src = fetchFromGitHub {
owner = "abdfnx";
repo = "tran";
rev = "v${version}";
sha256 = "sha256-qp4g1ZLRIIz0CZ/Zey354g0j9ePE4pGb82IivLezU7s=";
};
vendorHash = "sha256-JmRTI5ZBSFULfI+ki3hI8TPaS6IVP9D14r4DwK/nx1Y=";
ldflags = [
"-w"
"-s"
"-X main.version=v${version}"
];
subPackages = [ "." ];
meta = with lib; {
description = "Securely transfer and send anything between computers with TUI";
homepage = "https://github.com/abdfnx/tran";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
mainProgram = "tran";
};
}

View File

@@ -0,0 +1,119 @@
{
stdenv,
fetchzip,
lib,
wrapGAppsHook3,
xdg-utils,
which,
alsa-lib,
atk,
cairo,
fontconfig,
gdk-pixbuf,
glib,
gst_all_1,
gtk3,
libSM,
libX11,
libXtst,
libpng12,
pango,
zlib,
}:
stdenv.mkDerivation rec {
pname = "transcribe";
version = "9.42.0";
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://www.seventhstring.com/xscribe/downlo/xscsetup-${version}.tar.gz";
sha256 = "sha256-QCEkxOP1nWtBHFS259Oyqo2beehgCeR7zZ6wqBZe00s=";
}
else
throw "Platform not supported";
nativeBuildInputs = [
which
xdg-utils
wrapGAppsHook3
];
buildInputs = with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
];
dontPatchELF = true;
libPath =
with gst_all_1;
lib.makeLibraryPath [
stdenv.cc.cc
glib
gtk3
atk
fontconfig
pango
cairo
gdk-pixbuf
alsa-lib
libX11
libXtst
libSM
libpng12
gstreamer
gst-plugins-base
zlib
];
installPhase = ''
mkdir -p $out/bin $out/libexec $out/share/doc
cp transcribe $out/libexec
cp xschelp.htb readme_gtk.html $out/share/doc
ln -s $out/share/doc/xschelp.htb $out/libexec
# The script normally installs to the home dir
sed -i -E 's!BIN_DST=.*!BIN_DST=$out!' install-linux.sh
sed -i -e 's!Exec=''${BIN_DST}/transcribe/transcribe!Exec=transcribe!' install-linux.sh
sed -i -e 's!''${BIN_DST}/transcribe!''${BIN_DST}/libexec!' install-linux.sh
rm -f xschelp.htb readme_gtk.html *.so
XDG_DATA_HOME=$out/share bash install-linux.sh -i
patchelf \
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
$out/libexec/transcribe
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0"
--prefix LD_LIBRARY_PATH : "${libPath}"
)
'';
postFixup = ''
ln -s $out/libexec/transcribe $out/bin/
'';
meta = with lib; {
description = "Software to help transcribe recorded music";
longDescription = ''
The Transcribe! application is an assistant for people who want
to work out a piece of music from a recording, in order to write
it out, or play it themselves, or both. It doesn't do the
transcribing for you, but it is essentially a specialised player
program which is optimised for the purpose of transcription. It
has many transcription-specific features not found on
conventional music players.
'';
homepage = "https://www.seventhstring.com/xscribe/";
changelog = "https://www.seventhstring.com/xscribe/history.html";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ iwanb ];
platforms = platforms.linux;
mainProgram = "transcribe";
};
}

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
git,
makeWrapper,
openssl,
coreutils,
util-linux,
gnugrep,
gnused,
gawk,
testers,
transcrypt,
}:
stdenv.mkDerivation rec {
pname = "transcrypt";
version = "2.3.1";
src = fetchFromGitHub {
owner = "elasticdog";
repo = "transcrypt";
rev = "v${version}";
sha256 = "sha256-s95EnEmcdd5mFAKvtZ88aXxkrRLSZUP0VBrCy5PR4fo=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
git
openssl
coreutils
util-linux
gnugrep
gnused
gawk
];
installPhase = ''
install -m 755 -D transcrypt $out/bin/transcrypt
install -m 644 -D man/transcrypt.1 $out/share/man/man1/transcrypt.1
install -m 644 -D contrib/bash/transcrypt $out/share/bash-completion/completions/transcrypt
install -m 644 -D contrib/zsh/_transcrypt $out/share/zsh/site-functions/_transcrypt
wrapProgram $out/bin/transcrypt \
--prefix PATH : "${
lib.makeBinPath [
git
openssl
coreutils
util-linux
gnugrep
gnused
gawk
]
}"
cat > $out/bin/transcrypt-depspathprefix << EOF
#!${stdenv.shell}
echo "${
lib.makeBinPath [
git
openssl
coreutils
gawk
]
}:"
EOF
chmod +x $out/bin/transcrypt-depspathprefix
'';
passthru.tests.version = testers.testVersion {
package = transcrypt;
command = "transcrypt --version";
version = "transcrypt ${version}";
};
meta = with lib; {
description = "Transparently encrypt files within a Git repository";
longDescription = ''
A script to configure transparent encryption of sensitive files stored in
a Git repository. Files that you choose will be automatically encrypted
when you commit them, and automatically decrypted when you check them
out. The process will degrade gracefully, so even people without your
encryption password can safely commit changes to the repository's
non-encrypted files.
'';
homepage = "https://github.com/elasticdog/transcrypt";
license = licenses.mit;
maintainers = [ maintainers.elasticdog ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
fetchFromGitHub,
buildGoModule,
nix-update-script,
nixosTests,
}:
buildGoModule rec {
pname = "transfer-sh";
version = "1.6.1";
src = fetchFromGitHub {
owner = "dutchcoders";
repo = "transfer.sh";
rev = "v${version}";
hash = "sha256-V8E6RwzxKB6KeGPer5074e7y6XHn3ZD24PQMwTxw5lQ=";
};
vendorHash = "sha256-C8ZfUIGT9HiQQiJ2hk18uwGaQzNCIKp/Jiz6ePZkgDQ=";
passthru = {
tests = {
inherit (nixosTests) transfer-sh;
};
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Easy and fast file sharing and pastebin server with access from the command-line";
homepage = "https://github.com/dutchcoders/transfer.sh";
changelog = "https://github.com/dutchcoders/transfer.sh/releases";
mainProgram = "transfer.sh";
license = licenses.mit;
maintainers = with maintainers; [
ocfox
pinpox
];
};
}

View File

@@ -0,0 +1,121 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
makeDesktopItem,
unzip,
fpc,
lazarus,
libX11,
glib,
gtk2,
gdk-pixbuf,
pango,
atk,
cairo,
openssl,
unstableGitUpdater,
}:
stdenv.mkDerivation rec {
pname = "transgui";
version = "5.18.0-unstable-2024-10-03";
src = fetchFromGitHub {
owner = "transmission-remote-gui";
repo = "transgui";
rev = "8854357ece266e749e8981a93c8002465a93d8f2";
hash = "sha256-8ycivjjPeXBdPbqNNlO2hcre6T9sFhqg6vUfCREtd8k=";
};
nativeBuildInputs = [
pkg-config
unzip
];
buildInputs = [
fpc
lazarus
stdenv.cc
libX11
glib
gtk2
gdk-pixbuf
pango
atk
cairo
openssl
];
NIX_LDFLAGS = ''
-L${lib.getLib stdenv.cc.cc}/lib -lX11 -lglib-2.0 -lgtk-x11-2.0
-lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 -lcairo
-lc -lcrypto
'';
postPatch = ''
substituteInPlace restranslator.pas --replace /usr/ $out/
# Fix build with lazarus 4.0, https://github.com/transmission-remote-gui/transgui/issues/1486
substituteInPlace main.pas --replace-warn "h <> INVALID_HANDLE_VALUE" "h >= 0"
'';
preBuild = ''
FPCDIR=${fpc}/lib/fpc/${fpc.version} fpcmake -w
lazbuild -B transgui.lpr --lazarusdir=${lazarus}/share/lazarus
'';
makeFlags = [
"FPC=fpc"
"PP=fpc"
"INSTALL_PREFIX=$(out)"
];
LCL_PLATFORM = "gtk2";
desktopItem = makeDesktopItem {
name = pname;
exec = "${pname} %U";
icon = pname;
type = "Application";
comment = meta.description;
desktopName = "Transmission Remote GUI";
genericName = "BitTorrent Client";
categories = [
"Network"
"FileTransfer"
"P2P"
"GTK"
];
startupNotify = true;
mimeTypes = [
"application/x-bittorrent"
"x-scheme-handler/magnet"
];
};
postInstall = ''
mkdir -p "$out/share/applications"
cp $desktopItem/share/applications/* $out/share/applications
mkdir -p "$out/share/icons/hicolor/48x48/apps"
cp transgui.png "$out/share/icons/hicolor/48x48/apps"
mkdir -p "$out/share/transgui"
cp -r "./lang" "$out/share/transgui"
'';
passthru.updateScript = unstableGitUpdater {
tagPrefix = "v";
};
meta = {
description = "Cross platform front-end for the Transmission BitTorrent client";
homepage = "https://sourceforge.net/p/transgui";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ramkromberg ];
mainProgram = "transgui";
platforms = [
"x86_64-linux"
"x86_64-darwin"
];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "transifex-cli";
version = "1.6.17";
src = fetchFromGitHub {
owner = "transifex";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-jzAt/SalItGG0KI3GZb4/pT4T7oHwCji2bjNR1BTJXI=";
};
vendorHash = "sha256-3gi2ysIb5256CdmtX38oIfeDwNCQojK+YB9aEm8H01Q=";
ldflags = [
"-s"
"-w"
"-X 'github.com/transifex/cli/internal/txlib.Version=${version}'"
];
postInstall = ''
mv $out/bin/cli $out/bin/tx
'';
# Tests contain network calls
doCheck = false;
meta = with lib; {
description = "Transifex command-line client";
homepage = "https://github.com/transifex/cli";
license = licenses.asl20;
maintainers = with maintainers; [ thornycrackers ];
mainProgram = "tx";
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
buildGoModule,
fetchFromSourcehut,
pkg-config,
vulkan-headers,
libxkbcommon,
wayland,
xorg,
libGL,
sqlite,
}:
buildGoModule rec {
pname = "transito";
version = "0.10.0";
src = fetchFromSourcehut {
owner = "~mil";
repo = "transito";
rev = "v${version}";
hash = "sha256-87U9RdlP260ApkGJB3dLitxAdY3I9nWrukxzRnwuJ2E=";
};
vendorHash = "sha256-mgvfrNKvdjLa7O0oTSec8u3eHHU66ZDqpKzNeeyy2J0=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
vulkan-headers
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXfixes
xorg.libxcb
libGL
sqlite
];
tags = [ "sqlite_math_functions" ];
ldflags = [ "-X git.sr.ht/~mil/transito/src/uipages/pageconfig.Commit=${version}" ];
postInstall = ''
install -Dm644 -t $out/share/applications assets/transito.desktop
install -Dm644 -t $out/share/pixmaps assets/transito.png
for icon in assets/transito_*.png
do
name=$(basename $icon .png)
install -Dm644 -t $out/share/icons/hicolor/''${name#transito_}/apps $icon
done
'';
doCheck = false; # no test
meta = with lib; {
description = "Data-provider-agnostic (GTFS) public transportation app";
longDescription = ''
Transito is a data-provider-agnostic public transportation app
that let's you route between locations using openly available
public GTFS feeds. Utilizing the Mobroute library,
the Transito app lets you performs routing calculations offline
(no network calls once data is initially fetched).
Overall, Transito aims to be an opensource alternative
to proprietary routing apps to get users from point A to point B
via public transit without comprising privacy or user freedoms.
It works in many well-connected metros which have publicly available
GTFS data, to name a few: Lisbon, NYC, Brussels, Krakow, and Bourges.
'';
homepage = "https://git.sr.ht/~mil/transito";
changelog = "https://git.sr.ht/~mil/transito/refs/v${version}";
license = licenses.gpl3Plus;
maintainers = [ maintainers.McSinyx ];
mainProgram = "transito";
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
curl,
fribidi,
rlwrap,
gawk,
groff,
ncurses,
hexdump,
}:
stdenv.mkDerivation rec {
pname = "translate-shell";
version = "0.9.7.1";
src = fetchFromGitHub {
owner = "soimort";
repo = "translate-shell";
rev = "v${version}";
sha256 = "sha256-ILXE8cSrivYqMruE+xtNIInLdwdRfMX5dneY9Nn12Uk=";
};
nativeBuildInputs = [ makeWrapper ];
installFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/trans \
--prefix PATH : ${
lib.makeBinPath [
gawk
curl
ncurses
rlwrap
groff
fribidi
hexdump
]
}
'';
meta = with lib; {
homepage = "https://www.soimort.org/translate-shell";
description = "Command-line translator using Google Translate, Bing Translator, Yandex.Translate, and Apertium";
license = licenses.unlicense;
maintainers = with maintainers; [ ebzzry ];
mainProgram = "trans";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
qt6,
libarchive,
pcre2,
protobuf,
gperftools,
blas,
runCommand,
translatelocally,
translatelocally-models,
buildArch ? "x86-64",
}:
let
rev = "27771d884d3607cf6331da16b15e27aba819573d";
in
stdenv.mkDerivation (finalAttrs: {
pname = "translatelocally";
version = "0-unstable-2024-05-12";
src = fetchFromGitHub {
owner = "XapaJIaMnu";
repo = "translateLocally";
inherit rev;
hash = "sha256-oPtiyONqkZ5xOIhDezk8mkmi9O8gNYwHo0gcqSa89qI=";
fetchSubmodules = true;
};
patches = [
./version_without_git.patch
];
postPatch = ''
echo '#define GIT_REVISION "${rev} ${finalAttrs.version}"' > \
3rd_party/bergamot-translator/3rd_party/marian-dev/src/common/git_revision.h
'';
# https://github.com/XapaJIaMnu/translateLocally/blob/81ed8b9/.github/workflows/build.yml#L330
postConfigure = lib.optionalString stdenv.hostPlatform.isAarch64 ''
bash ../cmake/fix_ruy_build.sh .. .
'';
nativeBuildInputs = [
cmake
protobuf
qt6.wrapQtAppsHook
];
buildInputs = [
qt6.qttools
qt6.qtbase
qt6.qtsvg
qt6.qtwayland
libarchive
pcre2
protobuf
gperftools # provides tcmalloc
blas
];
cmakeFlags = [
"-DBLAS_LIBRARIES=-lblas"
"-DCBLAS_LIBRARIES=-lcblas"
# See the following for context:
# https://github.com/NixOS/nixpkgs/pull/385549
(lib.optionalString stdenv.hostPlatform.isx86_64 "-DBUILD_ARCH=${buildArch}")
];
passthru.tests = {
cli-translate =
runCommand "${finalAttrs.pname}-test-cli-translate"
{
nativeBuildInputs = [
translatelocally
translatelocally-models.fr-en-tiny
];
}
''
export LC_ALL="C.UTF-8"
echo "Bonjour" | translateLocally -m fr-en-tiny > $out
diff "$out" <(echo "Hello")
'';
};
meta = with lib; {
mainProgram = "translateLocally";
homepage = "https://translatelocally.com/";
description = "Fast and secure translation on your local machine, powered by marian and Bergamot";
license = licenses.mit;
maintainers = with maintainers; [ euxane ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,66 @@
Submodule 3rd_party/bergamot-translator contains modified content
Submodule 3rd_party/marian-dev contains modified content
diff --git a/3rd_party/bergamot-translator/3rd_party/marian-dev/cmake/GetVersionFromFile.cmake b/3rd_party/bergamot-translator/3rd_party/marian-dev/cmake/GetVersionFromFile.cmake
index 31352565..d90a366d 100644
--- a/3rd_party/bergamot-translator/3rd_party/marian-dev/cmake/GetVersionFromFile.cmake
+++ b/3rd_party/bergamot-translator/3rd_party/marian-dev/cmake/GetVersionFromFile.cmake
@@ -22,10 +22,8 @@ else()
endif()
# Get current commit SHA from git
-execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE PROJECT_VERSION_GIT_SHA
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+# (dummy value for nix package without the .git)
+set(PROJECT_VERSION_GIT_SHA 000000000000)
# Get partial versions into a list
string(REGEX MATCHALL "-.*$|[0-9]+" PROJECT_PARTIAL_VERSION_LIST
diff --git a/3rd_party/bergamot-translator/3rd_party/marian-dev/src/CMakeLists.txt b/3rd_party/bergamot-translator/3rd_party/marian-dev/src/CMakeLists.txt
index 76aa0e2b..ca982bd3 100644
--- a/3rd_party/bergamot-translator/3rd_party/marian-dev/src/CMakeLists.txt
+++ b/3rd_party/bergamot-translator/3rd_party/marian-dev/src/CMakeLists.txt
@@ -149,23 +149,8 @@ target_compile_options(marian PRIVATE ${ALL_WARNINGS})
#
# We set MARIAN_GIT_DIR to the appropriate path, depending on whether
# ${CMAKE_CURRENT_SOURCE_DIR}/../.git is a directory or file.
-set(MARIAN_GIT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
-if(NOT IS_DIRECTORY ${MARIAN_GIT_DIR}) # i.e., it's a submodule
- file(READ ${MARIAN_GIT_DIR} MARIAN_GIT_DIR)
- string(REGEX REPLACE "gitdir: (.*)\n" "\\1" MARIAN_GIT_DIR ${MARIAN_GIT_DIR})
- if(NOT IS_ABSOLUTE ${MARIAN_GIT_DIR})
- get_filename_component(MARIAN_GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${MARIAN_GIT_DIR}" ABSOLUTE)
- endif()
-endif(NOT IS_DIRECTORY ${MARIAN_GIT_DIR})
-
-add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/common/git_revision.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND git log -1 --pretty=format:\#define\ GIT_REVISION\ \"\%h\ \%ai\" > ${CMAKE_CURRENT_SOURCE_DIR}/common/git_revision.h
- DEPENDS ${MARIAN_GIT_DIR}/logs/HEAD
- VERBATIM
-)
-add_custom_target(marian_version DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/common/git_revision.h)
-add_dependencies(marian marian_version) # marian must depend on it so that it gets created first
+# (generated by nix package instead)
+
# make sure all local dependencies are installed first before this is built
add_dependencies(marian 3rd_party_installs)
diff --git a/cmake/GetVersionFromFile.cmake b/cmake/GetVersionFromFile.cmake
index 83b7975..71cd861 100644
--- a/cmake/GetVersionFromFile.cmake
+++ b/cmake/GetVersionFromFile.cmake
@@ -23,10 +23,8 @@ else()
endif()
# Get current commit SHA from git
-execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- OUTPUT_VARIABLE PROJECT_VERSION_GIT_SHA
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+# (dummy value for nix package without the .git)
+set(PROJECT_VERSION_GIT_SHA 000000000000)
# Get partial versions into a list
string(REGEX MATCHALL "-.*$|[0-9]+" PROJECT_PARTIAL_VERSION_LIST

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
appstream-glib,
curl,
desktop-file-utils,
fetchFromGitHub,
geoip,
gettext,
glib,
glib-networking,
gtk3,
json-glib,
libappindicator,
libmrss,
libproxy,
libsoup_3,
meson,
ninja,
pkg-config,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "transmission-remote-gtk";
version = "1.6.0";
src = fetchFromGitHub {
owner = "transmission-remote-gtk";
repo = "transmission-remote-gtk";
tag = version;
hash = "sha256-/syZI/5LhuYLvXrNknnpbGHEH0z5iHeye2YRNJFWZJ0=";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
meson
ninja
pkg-config
wrapGAppsHook3
];
buildInputs = [
curl
geoip
gettext
glib
gtk3
json-glib
libappindicator
libmrss
libproxy
libsoup_3
# For TLS support.
glib-networking
];
doCheck = false; # Requires network access
meta = {
description = "GTK remote control for the Transmission BitTorrent client";
mainProgram = "transmission-remote-gtk";
homepage = "https://github.com/transmission-remote-gtk/transmission-remote-gtk";
changelog = "https://github.com/transmission-remote-gtk/transmission-remote-gtk/releases/tag/${version}";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage {
version = "0.3.1";
pname = "transmission-rss";
src = fetchFromGitHub {
owner = "herlon214";
repo = "transmission-rss";
rev = "5bbad7a81621a194b7a8b11a56051308a7ccbf06";
sha256 = "sha256-SkEgxinqPA9feOIF68oewVyRKv3SY6fWWZLGJeH+r4M=";
};
cargoPatches = [ ./update-cargo-lock-version.patch ];
cargoHash = "sha256-ETbWV5OjRzQuq/rVyu22YRFjeQcuNA1REyzg46s3q5A=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
OPENSSL_NO_VENDOR = 1;
meta = with lib; {
description = "Add torrents to transmission based on RSS list";
homepage = "https://github.com/herlon214/transmission-rss";
maintainers = with maintainers; [ icewind1991 ];
license = licenses.mit;
mainProgram = "transmission-rss";
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/Cargo.lock b/Cargo.lock
index e75aca4..88321ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2148,7 +2148,7 @@ dependencies = [
[[package]]
name = "transmission-rss"
-version = "0.3.0"
+version = "0.3.1"
dependencies = [
"clap",
"env_logger",

View File

@@ -0,0 +1,174 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
openssl,
curl,
libevent,
inotify-tools,
systemd,
zlib,
pcre,
libb64,
libutp,
miniupnpc,
dht,
libnatpmp,
libiconv,
# Build options
enableGTK3 ? false,
gtk3,
xorg,
wrapGAppsHook3,
enableQt ? false,
qt5,
nixosTests,
enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
enableDaemon ? true,
enableCli ? true,
installLib ? false,
apparmorRulesFromClosure,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "transmission";
version = "3.00";
src = fetchFromGitHub {
owner = "transmission";
repo = "transmission";
tag = finalAttrs.version;
hash = "sha256-n4iEDt9AstDZPZXN47p13brNLbNWS3BTB+A4UuoEjzE=";
fetchSubmodules = true;
};
patches = [
# fix build with openssl 3.0
./transmission-3.00-openssl-3.patch
# fix build with miniupnpc 2.2.8
./transmission-3.00-miniupnpc-2.2.8.patch
];
outputs = [
"out"
"apparmor"
];
cmakeFlags =
let
mkFlag = opt: if opt then "ON" else "OFF";
in
[
"-DENABLE_MAC=OFF" # requires xcodebuild
"-DENABLE_GTK=${mkFlag enableGTK3}"
"-DENABLE_QT=${mkFlag enableQt}"
"-DENABLE_DAEMON=${mkFlag enableDaemon}"
"-DENABLE_CLI=${mkFlag enableCli}"
"-DINSTALL_LIB=${mkFlag installLib}"
];
nativeBuildInputs = [
pkg-config
cmake
]
++ lib.optionals enableGTK3 [ wrapGAppsHook3 ]
++ lib.optionals enableQt [ qt5.wrapQtAppsHook ];
buildInputs = [
openssl
curl
libevent
zlib
pcre
libb64
libutp
miniupnpc
dht
libnatpmp
]
++ lib.optionals enableQt [
qt5.qttools
qt5.qtbase
]
++ lib.optionals enableGTK3 [
gtk3
xorg.libpthreadstubs
]
++ lib.optionals enableSystemd [ systemd ]
++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
postInstall = ''
mkdir $apparmor
cat >$apparmor/bin.transmission-daemon <<EOF
include <tunables/global>
$out/bin/transmission-daemon {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/ssl_certs>
include "${
apparmorRulesFromClosure { name = "transmission-daemon"; } (
[
curl
libevent
openssl
pcre
zlib
libnatpmp
miniupnpc
]
++ lib.optionals enableSystemd [ systemd ]
++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
)
}"
r @{PROC}/sys/kernel/random/uuid,
r @{PROC}/sys/vm/overcommit_memory,
r @{PROC}/@{pid}/environ,
r @{PROC}/@{pid}/mounts,
rwk /tmp/tr_session_id_*,
r $out/share/transmission/web/**,
include <local/bin.transmission-daemon>
}
EOF
'';
env = {
# Fix GCC 14 build
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
passthru.tests = {
apparmor = nixosTests.transmission_3; # starts the service with apparmor enabled
smoke-test = nixosTests.bittorrent;
};
meta = {
description = "Fast, easy and free BitTorrent client (deprecated version 3)";
mainProgram =
if enableQt then
"transmission-qt"
else if enableGTK3 then
"transmission-gtk"
else
"transmission-cli";
longDescription = ''
Transmission is a BitTorrent client which features a simple interface
on top of a cross-platform back-end.
Feature spotlight:
* Uses fewer resources than other clients
* Native Mac, GTK and Qt GUI clients
* Daemon ideal for servers, embedded systems, and headless use
* All these can be remote controlled by Web and Terminal clients
* Bluetack (PeerGuardian) blocklists with automatic updates
* Full encryption, DHT, and PEX support
'';
homepage = "http://www.transmissionbt.com/";
license = lib.licenses.gpl2Plus; # parts are under MIT
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,18 @@
diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c
index c9e248a379...c7b2580bcb 100644
--- a/libtransmission/upnp.c
+++ b/libtransmission/upnp.c
@@ -194,8 +194,13 @@
errno = 0;
+#if (MINIUPNPC_API_VERSION >= 18)
if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
+ sizeof(handle->lanaddr), NULL, 0) == UPNP_IGD_VALID_CONNECTED)
+#else
+ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
sizeof(handle->lanaddr)) == UPNP_IGD_VALID_CONNECTED)
+#endif
{
tr_logAddNamedInfo(getKey(), _("Found Internet Gateway Device \"%s\""), handle->urls.controlURL);
tr_logAddNamedInfo(getKey(), _("Local Address is \"%s\""), handle->lanaddr);

View File

@@ -0,0 +1,37 @@
From 6ee128b95bacaff20746538dc97c2b8e2b9fcc29 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sun, 15 May 2022 10:54:38 -0400
Subject: [PATCH] openssl: load "legacy" provider for RC4
---
libtransmission/crypto-utils-openssl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c
index 45fd71913..14d680654 100644
--- a/libtransmission/crypto-utils-openssl.c
+++ b/libtransmission/crypto-utils-openssl.c
@@ -20,6 +20,9 @@
#include <openssl/rand.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
+#if OPENSSL_VERSION_MAJOR >= 3
+#include <openssl/provider.h>
+#endif
#include "transmission.h"
#include "crypto-utils.h"
@@ -184,6 +187,10 @@ static void openssl_evp_cipher_context_free(EVP_CIPHER_CTX* handle)
tr_rc4_ctx_t tr_rc4_new(void)
{
+#if OPENSSL_VERSION_MAJOR >= 3
+ OSSL_PROVIDER_load(NULL, "default");
+ OSSL_PROVIDER_load(NULL, "legacy");
+#endif
EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();
if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1)))
--
2.35.1

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libx11,
xorgproto,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "transset";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/app/transset-${finalAttrs.version}.tar.xz";
hash = "sha256-gamrdK8TdzOqjLajf4KSlIUm/n7wa4WfwP8nLEN8Czg=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libx11
xorgproto
];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/app/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Utility for setting opacity/transparency property on a window";
homepage = "https://gitlab.freedesktop.org/xorg/app/transset";
license = with lib.licenses; [
mit
mitOpenGroup
hpndSellVariant
];
mainProgram = "transset";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,87 @@
{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
nix-update-script,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "trash-cli";
version = "0.24.5.26";
pyproject = true;
src = fetchFromGitHub {
owner = "andreafrancia";
repo = "trash-cli";
rev = version;
hash = "sha256-ltuMnxtG4jTTSZd6ZHWl8wI0oQMMFqW0HAPetZMfGtc=";
};
nativeBuildInputs = [
installShellFiles
];
build-system = with python3Packages; [
setuptools
shtab # for shell completions
];
dependencies = with python3Packages; [
psutil
six
];
nativeCheckInputs = with python3Packages; [
mock
pytestCheckHook
];
postPatch = ''
sed -i '/typing/d' setup.cfg
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
# Create a home directory with a test file.
HOME="$(mktemp -d)"
touch "$HOME/deleteme"
# Verify that trash list is initially empty.
[[ $($out/bin/trash-list) == "" ]]
# Trash a test file and verify that it shows up in the list.
$out/bin/trash "$HOME/deleteme"
[[ $($out/bin/trash-list) == *" $HOME/deleteme" ]]
# Empty the trash and verify that it is empty.
$out/bin/trash-empty
[[ $($out/bin/trash-list) == "" ]]
runHook postInstallCheck
'';
pythonImportsCheck = [ "trashcli" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for bin in trash-empty trash-list trash-restore trash-put trash; do
installShellCompletion --cmd "$bin" \
--bash <("$out/bin/$bin" --print-completion bash) \
--zsh <("$out/bin/$bin" --print-completion zsh)
done
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://github.com/andreafrancia/trash-cli";
description = "Command line interface to the freedesktop.org trashcan";
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
license = licenses.gpl2Plus;
mainProgram = "trash";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rustPlatform,
fetchCrate,
installShellFiles,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "trashy";
version = "2.0.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
};
cargoHash = "sha256-tlz8WeFOxNPJxCqwqH98S/JkU7MZSDj/OaPvNkf6iwg=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd trash \
--bash <($out/bin/trash completions bash) \
--fish <($out/bin/trash completions fish) \
--zsh <($out/bin/trash completions zsh) \
'';
meta = {
description = "Simple, fast, and featureful alternative to rm and trash-cli";
homepage = "https://github.com/oberblastmeister/trashy";
changelog = "https://github.com/oberblastmeister/trashy/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [ oberblastmeister ];
mainProgram = "trash";
# darwin is unsupported due to https://github.com/Byron/trash-rs/issues/8
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "travis"
gem "pry", "~> 0.11.0"

View File

@@ -0,0 +1,71 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coderay (1.1.3)
concurrent-ruby (1.1.6)
ethon (0.12.0)
ffi (>= 1.3.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.13.1)
gh (0.17.0)
activesupport (~> 5.0)
addressable (~> 2.4)
faraday (~> 1.0)
faraday_middleware (~> 1.0)
multi_json (~> 1.0)
net-http-persistent (~> 2.9)
net-http-pipeline
highline (2.0.3)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
json (2.3.0)
launchy (2.4.3)
addressable (~> 2.3)
method_source (0.9.2)
minitest (5.14.1)
multi_json (1.14.1)
multipart-post (2.1.1)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.5)
pusher-client (0.6.2)
json
websocket (~> 1.0)
thread_safe (0.3.6)
travis (1.9.1)
faraday (~> 1.0)
faraday_middleware (~> 1.0)
gh (~> 0.13)
highline (~> 2.0)
json (~> 2.3)
launchy (~> 2.1, < 2.5.0)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
websocket (1.2.8)
PLATFORMS
ruby
DEPENDENCIES
pry (~> 0.11.0)
travis
BUNDLED WITH
2.1.4

View File

@@ -0,0 +1,297 @@
{
activesupport = {
dependencies = [
"concurrent-ruby"
"i18n"
"minitest"
"tzinfo"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "02fdawr3wyvpzpja3r7mvb8lmn2mm5jdw502bx3ncr2sy2nw1kx6";
type = "gem";
};
version = "5.2.4.3";
};
addressable = {
dependencies = [ "public_suffix" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy";
type = "gem";
};
version = "2.7.0";
};
coderay = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0jvxqxzply1lwp7ysn94zjhh57vc14mcshw1ygw14ib8lhc00lyw";
type = "gem";
};
version = "1.1.3";
};
concurrent-ruby = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "094387x4yasb797mv07cs3g6f08y56virc2rjcpb1k79rzaj3nhl";
type = "gem";
};
version = "1.1.6";
};
ethon = {
dependencies = [ "ffi" ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9";
type = "gem";
};
version = "0.12.0";
};
faraday = {
dependencies = [ "multipart-post" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0wwks9652xwgjm7yszcq5xr960pjypc07ivwzbjzpvy9zh2fw6iq";
type = "gem";
};
version = "1.0.1";
};
faraday_middleware = {
dependencies = [ "faraday" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0jik2kgfinwnfi6fpp512vlvs0mlggign3gkbpkg5fw1jr9his0r";
type = "gem";
};
version = "1.0.0";
};
ffi = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "12lpwaw82bb0rm9f52v1498bpba8aj2l2q359mkwbxsswhpga5af";
type = "gem";
};
version = "1.13.1";
};
gh = {
dependencies = [
"activesupport"
"addressable"
"faraday"
"faraday_middleware"
"multi_json"
"net-http-persistent"
"net-http-pipeline"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1nj2dm2pahfa4d39y8csvjv5l3hpsm6yjq2y96vj2bqgg0qs26bj";
type = "gem";
};
version = "0.17.0";
};
highline = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0yclf57n2j3cw8144ania99h1zinf8q3f5zrhqa754j6gl95rp9d";
type = "gem";
};
version = "2.0.3";
};
i18n = {
dependencies = [ "concurrent-ruby" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "10nq1xjqvkhngiygji831qx9bryjwws95r4vrnlq9142bzkg670s";
type = "gem";
};
version = "1.8.3";
};
json = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0nrmw2r4nfxlfgprfgki3hjifgrcrs3l5zvm3ca3gb4743yr25mn";
type = "gem";
};
version = "2.3.0";
};
launchy = {
dependencies = [ "addressable" ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2";
type = "gem";
};
version = "2.4.3";
};
method_source = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1pviwzvdqd90gn6y7illcdd9adapw8fczml933p5vl739dkvl3lq";
type = "gem";
};
version = "0.9.2";
};
minitest = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "09bz9nsznxgaf06cx3b5z71glgl0hdw469gqx3w7bqijgrb55p5g";
type = "gem";
};
version = "5.14.1";
};
multi_json = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0xy54mjf7xg41l8qrg1bqri75agdqmxap9z466fjismc1rn2jwfr";
type = "gem";
};
version = "1.14.1";
};
multipart-post = {
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj";
type = "gem";
};
version = "2.1.1";
};
net-http-persistent = {
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1y9fhaax0d9kkslyiqi1zys6cvpaqx9a0y0cywp24rpygwh4s9r4";
type = "gem";
};
version = "2.9.4";
};
net-http-pipeline = {
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0bxjy33yhxwsbnld8xj3zv64ibgfjn9rjpiqkyd5ipmz50pww8v9";
type = "gem";
};
version = "1.0.1";
};
pry = {
dependencies = [
"coderay"
"method_source"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1mh312k3y94sj0pi160wpia0ps8f4kmzvm505i6bvwynfdh7v30g";
type = "gem";
};
version = "0.11.3";
};
public_suffix = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g";
type = "gem";
};
version = "4.0.5";
};
pusher-client = {
dependencies = [
"json"
"websocket"
];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "18ymxz34gmg7jff3h0nyzp5vdg5i06dbdxlrdl2nq4hf14qwj1f4";
type = "gem";
};
version = "0.6.2";
};
thread_safe = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy";
type = "gem";
};
version = "0.3.6";
};
travis = {
dependencies = [
"faraday"
"faraday_middleware"
"gh"
"highline"
"json"
"launchy"
"pusher-client"
"typhoeus"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1yizj5nqvyrfbyiv1kfwc33dylhsmk5l007z06djj152v04z63i3";
type = "gem";
};
version = "1.9.1";
};
typhoeus = {
dependencies = [ "ethon" ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "03x3fxjsnhgayl4s96h0a9975awlvx2v9nmx2ba0cnliglyczdr8";
type = "gem";
};
version = "0.8.0";
};
tzinfo = {
dependencies = [ "thread_safe" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1i3jh086w1kbdj3k5l60lc3nwbanmzdf8yjj3mlrx9b2gjjxhi9r";
type = "gem";
};
version = "1.2.7";
};
websocket = {
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0f11rcn4qgffb1rq4kjfwi7di79w8840x9l74pkyif5arp0mb08x";
type = "gem";
};
version = "1.2.8";
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
bundlerEnv,
ruby,
bundlerUpdateScript,
}:
bundlerEnv {
inherit ruby;
pname = "travis";
gemdir = ./.;
passthru.updateScript = bundlerUpdateScript "travis";
meta = {
description = "CLI and Ruby client library for Travis CI";
mainProgram = "travis";
homepage = "https://github.com/travis-ci/travis.rb";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
zimbatm
nicknovitski
];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "tray-tui";
version = "0.3.0";
src = fetchFromGitHub {
owner = "Levizor";
repo = "tray-tui";
tag = version;
hash = "sha256-iJ3793D6/yT63s4akdFvWIpe+5wgjWv29cwB5deID60=";
};
cargoHash = "sha256-T5O37QuubTHp9a5iYrXN2Wrc+Xez+rGiAowcbSp33A4=";
nativeBuildInputs = [
installShellFiles
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tray-tui \
--bash <($out/bin/tray-tui --completions bash) \
--zsh <($out/bin/tray-tui --completions zsh) \
--fish <($out/bin/tray-tui --completions fish)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "System tray in your terminal";
homepage = "https://github.com/Levizor/tray-tui";
license = lib.licenses.mit;
mainProgram = "tray-tui";
maintainers = with lib.maintainers; [ Levizor ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
gdk-pixbuf,
gtk2,
}:
stdenv.mkDerivation rec {
pname = "trayer";
version = "1.1.8";
src = fetchFromGitHub {
owner = "sargon";
repo = "trayer-srg";
rev = "${pname}-${version}";
sha256 = "1mvhwaqa9bng9wh3jg3b7y8gl7nprbydmhg963xg0r076jyzv0cg";
};
postPatch = ''
patchShebangs configure
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gdk-pixbuf
gtk2
];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
homepage = "https://github.com/sargon/trayer-srg";
license = licenses.mit;
description = "Lightweight GTK2-based systray for UNIX desktop";
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
mainProgram = "trayer";
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
wrapGAppsHook4,
tailscale,
gtk4,
gobject-introspection,
libadwaita,
}:
buildGoModule rec {
pname = "trayscale";
version = "0.18.3";
src = fetchFromGitHub {
owner = "DeedleFake";
repo = "trayscale";
tag = "v${version}";
hash = "sha256-rk4JfK0wBvWLis9XvaZuwAoMyLfoySt3SHLJChYl0SE=";
};
vendorHash = "sha256-8Um5Ps1EEVShJEeCRkGE3pJi2/5PxgEVNqq3JsKdivA=";
subPackages = [ "cmd/trayscale" ];
ldflags = [
"-s"
"-w"
"-X=deedles.dev/trayscale/internal/metadata.version=${version}"
];
nativeBuildInputs = [
pkg-config
gobject-introspection
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
];
# there are no actual tests, and it takes 20 minutes to rebuild
doCheck = false;
postInstall = ''
sh ./dist.sh install $out
glib-compile-schemas $out/share/glib-2.0/schemas
'';
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${tailscale}/bin")
'';
meta = {
changelog = "https://github.com/DeedleFake/trayscale/releases/tag/${src.rev}";
description = "Unofficial GUI wrapper around the Tailscale CLI client";
homepage = "https://github.com/DeedleFake/trayscale";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sikmir ];
mainProgram = "trayscale";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "trdl-client";
version = "0.12.0";
src = fetchFromGitHub {
owner = "werf";
repo = "trdl";
tag = "v${finalAttrs.version}";
hash = "sha256-CVJdnGrQRaenQ8/1EzUr6BNc0DtfAL1fLVfqJzy5A3Q=";
};
sourceRoot = "${finalAttrs.src.name}/client";
vendorHash = "sha256-veSgWyk1ytHRNHuuZJBV+1rqGDsdEb01CImm+EexFCk=";
subPackages = [ "cmd/trdl" ];
ldflags = [
"-s"
"-w"
"-X github.com/werf/trdl/client/pkg/trdl.Version=${finalAttrs.src.rev}"
];
tags = [
"dfrunmount"
"dfssh"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/trdl";
versionCheckProgramArg = "version";
meta = {
description = "Universal solution for delivering your software updates";
longDescription = ''
trdl is an Open Source solution providing a secure channel for delivering
updates from the Git repository to the end user.
The project team releases new versions of the software and switches them
in the release channels. Git acts as the single source of truth while
Vault is used as a tool to verify operations as well as populate and
maintain the TUF repository.
The user selects a release channel, continuously receives the latest
software version from the TUF repository, and uses it.
'';
homepage = "https://trdl.dev";
changelog = "https://github.com/werf/trdl/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.azahi ];
mainProgram = "trdl";
};
})

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
pname = "trdsql";
version = "1.1.0";
src = fetchFromGitHub {
owner = "noborus";
repo = "trdsql";
tag = "v${version}";
hash = "sha256-MkjQAOIXnydEmOFnnYrvE2TF2I0GqSrSRUAjd+/hHwc=";
};
vendorHash = "sha256-PoIa58vdDPYGL9mjEeudRYqPfvvr3W+fX5c+NgRIoLg=";
ldflags = [
"-s"
"-w"
"-X github.com/noborus/trdsql.Version=${version}"
];
# macOS panic: open /etc/protocols: operation not permitted
# vendor/modernc.org/libc/libc_darwin.go import vendor/modernc.org/libc/honnef.co/go/netdb
# https://gitlab.com/cznic/libc/-/blob/v1.61.6/honnef.co/go/netdb/netdb.go#L697
# https://gitlab.com/cznic/libc/-/blob/v1.61.6/honnef.co/go/netdb/netdb.go#L733
# this two line read /etc/protocols and /etc/services, which is blocked by darwin sandbox
doCheck = !stdenv.hostPlatform.isDarwin;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "-version";
installCheckPhase = ''
runHook preInstallCheck
expected="1,(NULL),v"
result=$(echo "1,,v" | $out/bin/trdsql -inull "" -onull "(NULL)" "SELECT * FROM -")
if [[ "$result" != "$expected" ]]; then
echo "Test gave '$result'. Expected: '$expected'"
exit 1
fi
runHook postInstallCheck
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI tool for execute SQL queries on CSV, LTSV, JSON, YAML and TBLN with various output formats";
homepage = "https://github.com/noborus/trdsql";
changelog = "https://github.com/noborus/trdsql/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
mainProgram = "trdsql";
};
}

View File

@@ -0,0 +1,42 @@
{
rustPlatform,
fetchFromGitHub,
lib,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "tre-command";
version = "0.4.0";
src = fetchFromGitHub {
owner = "dduan";
repo = "tre";
rev = "v${version}";
sha256 = "sha256-JlkONhXMWLzxAf3SYoLkSvXw4bFYBnsCyyj0TUsezwg=";
};
cargoHash = "sha256-a3k5P+i0jLqamP2CInSQjivyI/tREeJME6IqI/YiLog=";
nativeBuildInputs = [ installShellFiles ];
preFixup = ''
installManPage manual/tre.1
installShellCompletion scripts/completion/tre.{bash,fish}
installShellCompletion --zsh scripts/completion/_tre
'';
# this test requires package to be in a git repo to succeed
checkFlags = [
"--skip"
"respect_git_ignore"
];
meta = with lib; {
description = "Tree command, improved";
homepage = "https://github.com/dduan/tre";
license = licenses.mit;
maintainers = [ maintainers.dduan ];
mainProgram = "tre";
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
gettext,
libiconv,
libtool,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tre";
version = "0.9.0";
src = fetchFromGitHub {
owner = "laurikari";
repo = "tre";
tag = "v${finalAttrs.version}";
hash = "sha256-5O8yqzv+SR8x0X7GtC2Pjo94gp0799M2Va8wJ4EKyf8=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
autoconf
automake
gettext # autopoint
libtool
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
preConfigure = ''
./utils/autogen.sh
'';
meta = {
description = "Lightweight and robust POSIX compliant regexp matching library";
homepage = "https://laurikari.net/tre/";
changelog = "https://github.com/laurikari/tre/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd2;
mainProgram = "agrep";
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,104 @@
{
lib,
fetchFromGitHub,
libffi,
openssl,
readline,
stdenv,
testers,
valgrind,
xxd,
# Boolean flags
checkLeaks ? false,
enableFFI ? true,
enableSSL ? true,
enableThreads ? true,
# Configurable inputs
lineEditingLibrary ? "isocline",
}:
assert lib.elem lineEditingLibrary [
"isocline"
"readline"
];
stdenv.mkDerivation (finalAttrs: {
pname = "trealla";
version = "2.83.13";
src = fetchFromGitHub {
owner = "trealla-prolog";
repo = "trealla";
rev = "v${finalAttrs.version}";
hash = "sha256-hDInThx2RhpIOzw+OA2ZpW0pSxWf4IafUDrubZKFadU=";
};
postPatch = ''
substituteInPlace Makefile \
--replace '-I/usr/local/include' "" \
--replace '-L/usr/local/lib' "" \
--replace 'GIT_VERSION :=' 'GIT_VERSION ?='
'';
nativeBuildInputs = [ xxd ];
buildInputs =
lib.optionals enableFFI [ libffi ]
++ lib.optionals enableSSL [ openssl ]
++ lib.optionals (lineEditingLibrary == "readline") [ readline ];
nativeCheckInputs = lib.optionals finalAttrs.finalPackage.doCheck [ valgrind ];
strictDeps = true;
makeFlags = [
"GIT_VERSION=\"v${finalAttrs.version}\""
]
++ lib.optionals (lineEditingLibrary == "isocline") [ "ISOCLINE=1" ]
++ lib.optionals (!enableFFI) [ "NOFFI=1" ]
++ lib.optionals (!enableSSL) [ "NOSSL=1" ]
++ lib.optionals enableThreads [ "THREADS=1" ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin tpl
runHook postInstall
'';
doCheck = !valgrind.meta.broken;
checkFlags = [ "test" ] ++ lib.optionals checkLeaks [ "leaks" ];
passthru = {
tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "v${finalAttrs.version}";
};
};
};
meta = {
homepage = "https://trealla-prolog.github.io/trealla/";
description = "Compact, efficient Prolog interpreter written in ANSI C";
longDescription = ''
Trealla is a compact, efficient Prolog interpreter with ISO Prolog
aspirations.
Trealla is not WAM-based. It uses tree-walking, structure-sharing and
deep-binding. Source is byte-code compiled to an AST that is interpreted
at runtime. The intent and continued aim of Trealla is to be a small,
easily ported, Prolog core.
The name Trealla comes from the Liaden Universe books by Lee & Miller
(where it doesn't seem to mean anything) and also a reference to the
Trealla region of Western Australia.
'';
changelog = "https://github.com/trealla-prolog/trealla/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
siraben
];
mainProgram = "tpl";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "taglib-ruby"

View File

@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
taglib-ruby (0.7.1)
PLATFORMS
ruby
DEPENDENCIES
taglib-ruby
BUNDLED WITH
2.1.4

View File

@@ -0,0 +1,10 @@
{
taglib-ruby = {
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0r8g7zdncc6243d000jn0grc1n70rn9mx16vggy3q7c4wgsa37xi";
type = "gem";
};
version = "0.7.1";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
bundlerEnv,
ruby,
fetchFromGitHub,
}:
let
version = "1.1";
gems = bundlerEnv {
name = "tree-from-tags-${version}-gems";
inherit ruby;
gemdir = ./.;
};
in
stdenv.mkDerivation {
pname = "tree-from-tags";
inherit version;
src = fetchFromGitHub {
owner = "dbrock";
repo = "bongo";
rev = version;
hash = "sha256-G+6rRJLNBECxGc8WuaesXhrYqvEDy2Chpw4lWxO8X9s=";
};
buildInputs = [
gems
ruby
];
installPhase = ''
mkdir -p $out/{bin,share}
cp tree-from-tags.rb $out/share/
bin=$out/bin/tree-from-tags
# we are using bundle exec to start in the bundled environment
cat > $bin <<EOF
#!/bin/sh -e
exec ${gems}/bin/bundle exec ${ruby}/bin/ruby "$out"/share/tree-from-tags.rb "\$@"
EOF
chmod +x $bin
'';
meta = {
description = "Create file hierarchies from media tags";
homepage = "https://www.emacswiki.org/emacs/Bongo";
platforms = ruby.meta.platforms;
maintainers = with lib.maintainers; [
livnev
dbrock
];
license = lib.licenses.gpl2Plus;
mainProgram = "tree-from-tags";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitLab,
}:
let
# These settings are found in the Makefile, but there seems to be no
# way to select one or the other setting other than editing the file
# manually, so we have to duplicate the know how here.
systemFlags =
lib.optionalString stdenv.hostPlatform.isDarwin ''
CFLAGS="-O2 -Wall -fomit-frame-pointer -no-cpp-precomp"
LDFLAGS=
''
+ lib.optionalString stdenv.hostPlatform.isCygwin ''
CFLAGS="-O2 -Wall -fomit-frame-pointer"
LDFLAGS=-s
TREE_DEST=tree.exe
''
+ lib.optionalString (stdenv.hostPlatform.isFreeBSD || stdenv.hostPlatform.isOpenBSD) ''
CFLAGS="-O2 -Wall -fomit-frame-pointer"
LDFLAGS=-s
''; # use linux flags by default
in
stdenv.mkDerivation rec {
pname = "tree";
version = "2.2.1";
src = fetchFromGitLab {
owner = "OldManProgrammer";
repo = "unix-tree";
rev = version;
hash = "sha256-sC3XdZWJSXyCIYr/Y41ogz5bNBTfwKjOFtYwhayXPhY=";
};
preConfigure = ''
makeFlagsArray+=(${systemFlags})
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
homepage = "https://oldmanprogrammer.net/source.php?dir=projects/tree";
description = "Command to produce a depth indented directory listing";
license = licenses.gpl2Plus;
longDescription = ''
Tree is a recursive directory listing command that produces a
depth indented listing of files, which is colorized ala dircolors if
the LS_COLORS environment variable is set and output is to tty.
'';
platforms = platforms.all;
maintainers = with maintainers; [ nickcao ];
mainProgram = "tree";
};
}

View File

@@ -0,0 +1,56 @@
{
fetchFromSourcehut,
fetchpatch,
hareHook,
haredo,
lib,
scdoc,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "treecat";
version = "1.0.2-unstable-2023-11-28";
outputs = [
"out"
"man"
];
src = fetchFromSourcehut {
owner = "~autumnull";
repo = "treecat";
rev = "d277aed99eb48eef891b76916a61029989c41d2d";
hash = "sha256-4A01MAGkBSSzkyRw4omNbLoX8z+pHfoUO7/6QvEUu70=";
};
patches = [
# Update for Hare 0.24.2.
(fetchpatch {
url = "https://git.sr.ht/~autumnull/treecat/commit/53ad8126261051dd3b3493c34ae49f23db2c2d16.patch";
hash = "sha256-cF/lMZjg1hB93rBXcjecT5Rrzb2Y73u6DSW1WcP5Vek=";
})
];
nativeBuildInputs = [
hareHook
haredo
scdoc
];
env.PREFIX = placeholder "out";
dontConfigure = true;
meta = {
description = "Serialize a directory to a tree diagram, and vice versa";
longDescription = ''
Treecat is an amalgamation of `tree(1)` and `cat(1)`, with the added
bonus that it can reconstruct its output back into the original filetree.
'';
homepage = "https://sr.ht/~autumnull/treecat/";
license = lib.licenses.wtfpl;
maintainers = with lib.maintainers; [ onemoresuza ];
mainProgram = "treecat";
inherit (hareHook.meta) platforms badPlatforms;
};
})

View File

@@ -0,0 +1,83 @@
{
lib,
cargo-tauri,
dbus,
fetchgit,
fetchYarnDeps,
freetype,
gsettings-desktop-schemas,
yarnConfigHook,
nodejs,
openssl,
pkg-config,
rustPlatform,
webkitgtk_4_1,
libayatana-appindicator,
wrapGAppsHook4,
sqlite,
}:
rustPlatform.buildRustPackage rec {
pname = "treedome";
version = "0.6.1";
src = fetchgit {
url = "https://codeberg.org/solver-orgz/treedome";
rev = version;
hash = "sha256-qa87pgNHGRhP1G4TEFHYrkiJ9AHWG7PUdgxEF4X9EM8=";
fetchLFS = true;
};
cargoHash = "sha256-Rg65BiHQF7bBBCtc5F+gY31yhcuI0+IDfxr3pFmxT+w=";
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-Q0xsi1xymQne6qN0oxm4YkaDLnGL17iuj70CTdQlxzM=";
};
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
'';
nativeBuildInputs = [
cargo-tauri.hook
nodejs
pkg-config
wrapGAppsHook4
yarnConfigHook
];
buildInputs = [
dbus
openssl
freetype
webkitgtk_4_1
libayatana-appindicator
gsettings-desktop-schemas
sqlite
];
cargoRoot = "src-tauri";
buildAndTestSubdir = cargoRoot;
env = {
VERGEN_GIT_DESCRIBE = version;
};
# WEBKIT_DISABLE_COMPOSITING_MODE essential in NVIDIA + compositor https://github.com/NixOS/nixpkgs/issues/212064#issuecomment-1400202079
postFixup = ''
wrapProgram "$out/bin/treedome" \
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
'';
meta = {
description = "Local-first, encrypted, note taking application organized in tree-like structures";
homepage = "https://codeberg.org/solver-orgz/treedome";
license = lib.licenses.agpl3Plus;
platforms = [ "x86_64-linux" ];
mainProgram = "treedome";
maintainers = with lib.maintainers; [ tengkuizdihar ];
changelog = "https://codeberg.org/solver-orgz/treedome/releases/tag/${version}";
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
writers,
nixdoc,
runCommand,
treefmt,
}:
let
root = toString ./.;
revision = lib.trivial.revisionWithDefault "master";
removeRoot = file: lib.removePrefix "/" (lib.removePrefix root file);
# Import and apply `./lib.nix`, which contains treefmt's public functions
#
# NOTE: we cannot access them via `treefmt.passthru` or `callPackages ./lib.nix { }`,
# because that would be opaque to `unsafeGetAttrPos`.
attrs =
let
fn = import ./lib.nix;
args = builtins.mapAttrs (_: _: null) (builtins.functionArgs fn);
in
fn args;
in
{
locations = lib.pipe attrs [
builtins.attrNames
(map (
name:
let
pos = builtins.unsafeGetAttrPos name attrs;
file = removeRoot pos.file;
line = toString pos.line;
subpath = "pkgs/by-name/tr/treefmt/${file}";
url = "https://github.com/NixOS/nixpkgs/blob/${revision}/${subpath}#L${line}";
in
assert lib.hasPrefix root pos.file;
lib.nameValuePair "pkgs.treefmt.${name}" "[${subpath}:${line}](${url}) in `<nixpkgs>`"
))
builtins.listToAttrs
(writers.writeJSON "treefmt-function-locations")
];
markdown =
runCommand "treefmt-functions-doc"
{
nativeBuildInputs = [ nixdoc ];
}
''
nixdoc --file ${./lib.nix} \
--locs ${treefmt.functionsDoc.locations} \
--description "Functions Reference" \
--prefix "pkgs" \
--category "treefmt" \
--anchor-prefix "" \
> $out
'';
}

View File

@@ -0,0 +1,93 @@
{
lib,
pkgs,
treefmt,
}:
{
/**
Evaluate a treefmt configuration.
# Type
```
Module -> Configuration
```
# Inputs
`module`
: A treefmt module. See [options reference](#sec-treefmt-options-reference).
*/
evalConfig =
module:
lib.evalModules {
class = "treefmtConfig";
specialArgs.modulesPath = ./modules;
modules = [
{
_file = "treefmt.evalConfig";
_module.args.pkgs = lib.mkOptionDefault pkgs;
package = lib.mkOptionDefault treefmt;
}
{
_file = "<treefmt.evalConfig args>";
imports = lib.toList module;
}
./modules/default.nix
];
};
/**
Wrap treefmt, configured using structured settings.
# Type
```
Module -> Derivation
```
# Inputs
`module`
: A treefmt module. See [options reference](#sec-treefmt-options-reference).
*/
withConfig =
module:
let
configuration = treefmt.evalConfig {
_file = "<treefmt.withConfig args>";
imports = lib.toList module;
};
in
configuration.config.result;
/**
Build a treefmt config file from structured settings.
# Type
```
Module -> Derivation
```
# Inputs
`settings`
: A settings module, used to build a treefmt config file.
See [`settings` option reference](#opt-treefmt-settings).
*/
buildConfig =
module:
let
configuration = treefmt.evalConfig {
_file = "<treefmt.buildConfig args>";
settings.imports = lib.toList module;
};
in
configuration.config.configFile.overrideAttrs {
passthru = {
inherit (configuration.config) settings;
options = (opt: opt.type.getSubOptions opt.loc) configuration.options.settings;
};
};
}

View File

@@ -0,0 +1,9 @@
{
_class = "treefmtConfig";
imports = [
./options.nix
./settings.nix
./wrapper.nix
];
}

View File

@@ -0,0 +1,40 @@
{ lib, config, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.str;
default = lib.getName config.package + "-with-config";
defaultText = lib.literalExpression "\"\${getName package}-with-config\"";
description = ''
Name to use for the wrapped treefmt package.
'';
};
runtimeInputs = lib.mkOption {
type = with lib.types; listOf package;
default = [ ];
description = ''
Packages to include on treefmt's PATH.
'';
};
configFile = lib.mkOption {
type = lib.types.path;
# Ensure file is copied to the store
apply = file: if lib.isDerivation file then file else "${file}";
defaultText = lib.literalMD "generated from [](#opt-treefmt-settings)";
description = ''
The treefmt config file.
'';
};
package = lib.mkOption {
type = lib.types.package;
defaultText = lib.literalExpression "pkgs.treefmt";
description = ''
The treefmt package to wrap.
'';
internal = true;
};
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
pkgs,
config,
modulesPath,
...
}:
let
settingsFormat = pkgs.formats.toml { };
in
{
options.settings = lib.mkOption {
type = lib.types.submoduleWith {
specialArgs = { inherit modulesPath; };
modules = [
{ freeformType = settingsFormat.type; }
];
};
default = { };
description = ''
Settings used to build a treefmt config file.
'';
};
config.configFile = lib.mkOptionDefault (settingsFormat.generate "treefmt.toml" config.settings);
}

View File

@@ -0,0 +1,40 @@
{
lib,
pkgs,
config,
options,
...
}:
{
options.result = lib.mkOption {
type = lib.types.package;
description = ''
The wrapped treefmt package.
'';
readOnly = true;
internal = true;
};
config.result =
pkgs.runCommand config.name
{
nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
env = {
inherit (config) configFile;
binPath = lib.makeBinPath config.runtimeInputs;
};
passthru = {
inherit (config) runtimeInputs;
inherit config options;
};
inherit (config.package) meta version;
}
''
mkdir -p $out/bin
makeWrapper \
${lib.getExe config.package} \
$out/bin/treefmt \
--prefix PATH : "$binPath" \
--add-flags "--config-file $configFile"
'';
}

View File

@@ -0,0 +1,31 @@
# To build this derivation, run `nix-build -A treefmt.optionsDoc`
{
lib,
treefmt,
nixosOptionsDoc,
}:
let
configuration = treefmt.evalConfig [ ];
root = toString configuration._module.specialArgs.modulesPath;
revision = lib.trivial.revisionWithDefault "master";
removeRoot = file: lib.removePrefix "/" (lib.removePrefix root file);
transformDeclaration =
file:
let
fileStr = toString file;
subpath = "pkgs/by-name/tr/treefmt/modules/" + removeRoot fileStr;
in
assert lib.hasPrefix root fileStr;
{
url = "https://github.com/NixOS/nixpkgs/blob/${revision}/${subpath}";
name = subpath;
};
in
nixosOptionsDoc {
documentType = "none";
options = removeAttrs configuration.options [ "_module" ];
transformOptions = opt: opt // { declarations = map transformDeclaration opt.declarations; };
}

View File

@@ -0,0 +1,71 @@
{
lib,
buildGoModule,
callPackages,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "treefmt";
version = "2.3.1";
src = fetchFromGitHub {
owner = "numtide";
repo = "treefmt";
rev = "v${version}";
hash = "sha256-Z1AGLaGrRrUd75aQJc/UKwzMGb9gI/p5WxQ5XUgp98o=";
};
vendorHash = "sha256-9yAvqz99YlBfFU/hGs1PB/sH0iOyWaVadqGhfXMkj5E=";
subPackages = [ "." ];
env.CGO_ENABLED = 1;
ldflags = [
"-s"
"-w"
"-X github.com/numtide/treefmt/v2/build.Name=treefmt"
"-X github.com/numtide/treefmt/v2/build.Version=v${version}"
];
passthru = {
inherit (callPackages ./lib.nix { })
evalConfig
withConfig
buildConfig
;
tests = callPackages ./tests.nix { };
# Documentation for functions defined in `./lib.nix`
functionsDoc = callPackages ./functions-doc.nix { };
# Documentation for options declared in `treefmt.evalConfig` configurations
optionsDoc = callPackages ./options-doc.nix { };
};
meta = {
description = "One CLI to format the code tree";
longDescription = ''
[treefmt](${meta.homepage}) streamlines the process of applying formatters
to your project, making it a breeze with just one command line.
The `treefmt` package provides functions for configuring treefmt using
the module system, which are documented in the [treefmt section] of the
Nixpkgs Manual.
Alternatively, treefmt can be configured using [treefmt-nix].
[treefmt section]: https://nixos.org/manual/nixpkgs/unstable#treefmt
[treefmt-nix]: https://github.com/numtide/treefmt-nix
'';
homepage = "https://github.com/numtide/treefmt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
brianmcgee
MattSturgeon
zimbatm
];
mainProgram = "treefmt";
};
}

View File

@@ -0,0 +1,110 @@
{
lib,
runCommand,
testers,
treefmt,
nixfmt,
}:
let
inherit (treefmt) buildConfig withConfig;
testEqualContents =
args:
testers.testEqualContents (
args
// lib.optionalAttrs (builtins.isString args.expected) {
expected = builtins.toFile "expected" args.expected;
}
);
nixfmtExampleConfig = {
on-unmatched = "info";
tree-root-file = ".git/index";
formatter.nixfmt = {
command = "nixfmt";
includes = [ "*.nix" ];
};
};
nixfmtExamplePackage = withConfig {
settings = nixfmtExampleConfig;
runtimeInputs = [ nixfmt ];
};
in
{
buildConfigEmpty = testEqualContents {
assertion = "`buildConfig { }` builds an empty config file";
actual = buildConfig { };
expected = "";
};
buildConfigExample = testEqualContents {
assertion = "`buildConfig` builds the example config";
actual = buildConfig nixfmtExampleConfig;
expected = ''
on-unmatched = "info"
tree-root-file = ".git/index"
[formatter.nixfmt]
command = "nixfmt"
includes = ["*.nix"]
'';
};
buildConfigModules = testEqualContents {
assertion = "`buildConfig` evaluates modules to build a config";
actual = buildConfig [
nixfmtExampleConfig
{ tree-root-file = lib.mkForce "overridden"; }
];
expected = ''
on-unmatched = "info"
tree-root-file = "overridden"
[formatter.nixfmt]
command = "nixfmt"
includes = ["*.nix"]
'';
};
runNixfmtExample =
runCommand "run-nixfmt-example"
{
nativeBuildInputs = [ nixfmtExamplePackage ];
passAsFile = [
"input"
"expected"
];
input = ''
{
foo="bar";
attrs={};
list=[];
}
'';
expected = ''
{
foo = "bar";
attrs = { };
list = [ ];
}
'';
}
''
export XDG_CACHE_HOME=$(mktemp -d)
# The example config assumes the tree root has a .git/index file
mkdir .git && touch .git/index
# Copy the input file, then format it using the wrapped treefmt
cp $inputPath input.nix
treefmt
# Assert that input.nix now matches expected
if diff -u $expectedPath input.nix; then
touch $out
else
echo
echo "treefmt did not format input.nix as expected"
exit 1
fi
'';
}

View File

@@ -0,0 +1,49 @@
{
buildGoModule,
fetchFromGitHub,
lib,
nix-update-script,
testers,
treegen,
}:
buildGoModule rec {
pname = "treegen";
version = "1.1.0";
src = fetchFromGitHub {
owner = "bilbilak";
repo = "treegen";
tag = "v${version}";
hash = "sha256-PPWUEfX7OXKZnghiVXU+eCjveA1VszA3uS8C3uI3pFM=";
};
vendorHash = "sha256-hocnLCzWN8srQcO3BMNkd2lt0m54Qe7sqAhUxVZlz1k=";
ldflags = [
"-s"
"-w"
"-X github.com/bilbilak/treegen/config.Version=${version}"
];
passthru = {
tests = {
version = testers.testVersion {
package = treegen;
command = "treegen --version";
};
};
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/bilbilak/treegen/blob/main/CHANGELOG.md";
description = "ASCII Tree Directory and File Structure Generator";
homepage = "https://github.com/bilbilak/treegen";
license = lib.licenses.gpl3Only;
mainProgram = "treegen";
maintainers = with lib.maintainers; [ _4r7if3x ];
platforms = with lib.platforms; unix ++ windows;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchurl,
zlib,
gsl,
boost,
}:
stdenv.mkDerivation rec {
pname = "treemix";
version = "1.13";
src = fetchurl {
url = "https://bitbucket.org/nygcresearch/treemix/downloads/${pname}-${version}.tar.gz";
sha256 = "1nd3rzsdgk47r8b8k43mdfvaagln533sm08s1jr0dz8km8nlym7y";
};
buildInputs = [
zlib
gsl
boost
];
meta = with lib; {
description = "Inference of patterns of population splitting and mixing from genome-wide allele frequency data";
homepage = "https://bitbucket.org/nygcresearch/treemix/wiki/Home";
license = licenses.gpl3Only;
maintainers = [ maintainers.bzizou ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
wrapGAppsHook3,
makeWrapper,
wxGTK32,
unstableGitUpdater,
}:
stdenv.mkDerivation rec {
pname = "treesheets";
version = "0-unstable-2025-07-01";
src = fetchFromGitHub {
owner = "aardappel";
repo = "treesheets";
rev = "e6b973c0131380e8b1171bcb4078657cf27f7e70";
hash = "sha256-sGRLFvUfVlev5o6zlArPiY18io9qMs2wcW6pL1OJln4=";
};
nativeBuildInputs = [
cmake
ninja
wrapGAppsHook3
makeWrapper
];
buildInputs = [
wxGTK32
];
env.NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${
builtins.replaceStrings [ "unstable-" ] [ "" ] version
}\"";
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv $out/TreeSheets.app $out/Applications
makeWrapper $out/Applications/TreeSheets.app/Contents/MacOS/TreeSheets $out/bin/TreeSheets
'';
passthru = {
updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
};
};
meta = with lib; {
description = "Free Form Data Organizer";
mainProgram = "TreeSheets";
longDescription = ''
The ultimate replacement for spreadsheets, mind mappers, outliners,
PIMs, text editors and small databases.
Suitable for any kind of data organization, such as Todo lists,
calendars, project management, brainstorming, organizing ideas,
planning, requirements gathering, presentation of information, etc.
'';
homepage = "https://strlen.com/treesheets/";
maintainers = with maintainers; [ obadz ];
platforms = platforms.unix;
license = licenses.zlib;
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
python3Packages,
fetchFromGitHub,
wrapGAppsHook3,
gtk3,
glib,
gsettings-desktop-schemas,
}:
python3Packages.buildPythonApplication rec {
pname = "trelby";
version = "2.4.15";
pyproject = true;
src = fetchFromGitHub {
owner = "trelby";
repo = "trelby";
tag = version;
hash = "sha256-CTasd+YlRHjYUVepZf2RDOuw1p0OdQfJENZamSmXXFw=";
};
build-system = [
python3Packages.setuptools
];
nativeBuildInputs = [
wrapGAppsHook3
];
buildInputs = [
glib
gsettings-desktop-schemas
gtk3
];
dependencies = with python3Packages; [
lxml
reportlab
wxpython
];
postInstall = ''
install -Dm644 trelby/resources/trelby.desktop $out/share/applications/trelby.desktop
install -Dm644 trelby/resources/icon256.png $out/share/icons/hicolor/256x256/apps/trelby.png
substituteInPlace $out/share/applications/trelby.desktop \
--replace-fail "Icon=trelby256" "Icon=trelby"
'';
meta = {
description = "Free, multiplatform, feature-rich screenwriting program";
homepage = "https://www.trelby.org";
downloadPage = "https://github.com/trelby/trelby";
mainProgram = "trelby";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ isotoxal ];
};
}

View File

@@ -0,0 +1,88 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
boost,
cmake,
}:
let
rev = "488f4e71073062de314c55a037ede7cf03a3324c";
# git describe --tags
realVersion = "1.2.1-14-g${builtins.substring 0 7 rev}";
main_src = fetchFromGitHub {
owner = "YosysHQ";
repo = "prjtrellis";
inherit rev;
hash = "sha256-Blbu+0rlM/3izbF0XCvkNpSAND0IclWEwK7anzyrpvw=";
name = "trellis";
};
database_src = fetchFromGitHub {
owner = "YosysHQ";
repo = "prjtrellis-db";
rev = "35d900a94ff0db152679a67bf6e4fbf40ebc34aa";
hash = "sha256-r6viR8y9ZjURGNbsa0/YY8lzy9kGzjuu408ntxwpqm0=";
name = "trellis-database";
};
in
stdenv.mkDerivation {
pname = "trellis";
version = "unstable-2022-09-14";
srcs = [
main_src
database_src
];
sourceRoot = main_src.name;
buildInputs = [ boost ];
nativeBuildInputs = [
cmake
python3
];
cmakeFlags = [
"-DCURRENT_GIT_VERSION=${realVersion}"
# TODO: should this be in stdenv instead?
"-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share"
];
preConfigure = ''
rmdir database && ln -sfv ${database_src} ./database
cd libtrellis
'';
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
for f in $out/bin/* ; do
install_name_tool -change "$out/lib/libtrellis.dylib" "$out/lib/trellis/libtrellis.dylib" "$f"
done
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/ecppack $out/share/trellis/misc/basecfgs/empty_lfe5u-85f.config /tmp/test.bin
'';
meta = with lib; {
description = "Documentation and bitstream tools for Lattice ECP5 FPGAs";
longDescription = ''
Project Trellis documents the Lattice ECP5 architecture
to enable development of open-source tools. Its goal is
to provide sufficient information to develop a free and
open Verilog to bitstream toolchain for these devices.
'';
homepage = "https://github.com/YosysHQ/prjtrellis";
license = licenses.isc;
maintainers = with maintainers; [
q3k
thoughtpolice
rowanG077
];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
python3Packages,
x11Support ? !stdenv.hostPlatform.isDarwin,
xclip ? null,
pbcopy ? null,
useGeoIP ? false, # Require /var/lib/geoip-databases/GeoIP.dat
}:
let
wrapperPath = lib.makeBinPath (
lib.optional x11Support xclip ++ lib.optional stdenv.hostPlatform.isDarwin pbcopy
);
in
python3Packages.buildPythonApplication rec {
pname = "tremc";
version = "0.9.3";
format = "other";
src = fetchFromGitHub {
owner = "tremc";
repo = "tremc";
rev = version;
hash = "sha256-219rntmetmj1JFG+4NyYMFTWmrHKJL7fnLoMIvnTP4Y=";
};
patches = [
# Remove when tremc > 0.9.3 is released
(fetchpatch {
url = "https://github.com/tremc/tremc/commit/a8aaf9a6728a9ef3d8f13b3603456b0086122891.patch";
hash = "sha256-+HYdWTbcpvZqjshdHLZ+Svmr6U/aKFc3sy0aka6rn/A=";
name = "support-transmission-4.patch";
})
];
buildInputs = with python3Packages; [
python
wrapPython
];
pythonPath =
with python3Packages;
[
ipy
pyperclip
]
++ lib.optional useGeoIP geoip;
dontBuild = true;
doCheck = false;
makeWrapperArgs = [ "--prefix PATH : ${lib.escapeShellArg wrapperPath}" ];
installPhase = ''
make DESTDIR=$out install
wrapPythonPrograms
'';
meta = with lib; {
description = "Curses interface for transmission";
mainProgram = "tremc";
homepage = "https://github.com/tremc/tremc";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kashw2 ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "tremor-language-server";
version = "0.13.0-rc.11";
src = fetchFromGitHub {
owner = "tremor-rs";
repo = "tremor-language-server";
rev = "v${version}";
sha256 = "sha256-gooHNSBEcqyTMOSBG7T01kSdCWKK98dbE8+nuwvQkS0=";
};
nativeBuildInputs = [
rustPlatform.bindgenHook
];
cargoHash = "sha256-tMs5DRuWuMXIpj5YU4bR4mAlzv7nWycmzDOqMuihj7M=";
meta = with lib; {
description = "Tremor Language Server (Trill)";
homepage = "https://www.tremor.rs/docs/next/getting-started/tooling";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
};
}

View File

@@ -0,0 +1,103 @@
{
lib,
rustPlatform,
pkg-config,
cmake,
openssl,
fetchFromGitHub,
installShellFiles,
stdenv,
libiconv,
protobuf,
}:
rustPlatform.buildRustPackage rec {
pname = "tremor";
version = "0.13.0-rc.33";
src = fetchFromGitHub {
owner = "tremor-rs";
repo = "tremor-runtime";
rev = "v${version}";
hash = "sha256-DoFqHKTu4CvgDYPT4vbwNvSZ/lNTdAF+wlHOOIBJKUw=";
};
cargoHash = "sha256-w/d/MMd5JNQMRUxRaH4Tpf4Dzh14eykG+zzuM/YrU40=";
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
rustPlatform.bindgenHook
];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
# relax lints to fix an error caused by invalid macro_export
# error: `log_error` isn't a valid `#[macro_export]` argument
# note: `#[deny(invalid_macro_export_arguments)]` implied by `#[deny(warnings)]`
postPatch = ''
shopt -s globstar
substituteInPlace **/*.rs \
--replace-quiet '#![deny(warnings)]' ""
shopt -u globstar
'';
# TODO export TREMOR_PATH($out/lib) variable
postInstall = ''
# Copy the standard library to $out/lib
cp -r ${src}/tremor-script/lib/ $out
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tremor \
--bash <($out/bin/tremor completions bash) \
--fish <($out/bin/tremor completions fish) \
--zsh <($out/bin/tremor completions zsh)
'';
# OPENSSL_NO_VENDOR - If set, always find OpenSSL in the system, even if the vendored feature is enabled.
OPENSSL_NO_VENDOR = 1;
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
env = lib.optionalAttrs (stdenv.system == "x86_64-darwin") {
RUSTFLAGS = "-C target-feature=+avx,+avx2,+sse4.2";
};
# tests failed on x86_64-darwin with SIGILL: illegal instruction
doCheck = stdenv.system != "x86_64-darwin";
checkFlags = [
# all try to make a network access
"--skip=connectors::tests::http::server::https_server_test"
"--skip=connectors::tests::tcp::client::tls_client"
"--skip=connectors::tests::udp::udp_no_bind"
"--skip=connectors::tests::ws::ws_client_bad_config"
"--skip=connectors::tests::ws::wss_server_binary_routing"
"--skip=connectors::tests::ws::wss_server_text_routing"
"--skip=connectors::utils::tls::tests::client_config"
];
cargoBuildFlags = [ "-p tremor-cli" ];
meta = with lib; {
description = ''
Early stage event processing system for unstructured data with rich
support for structural pattern matching, filtering and transformation
'';
homepage = "https://www.tremor.rs/";
license = licenses.asl20;
maintainers = with maintainers; [
humancalico
happysalada
];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
libogg,
}:
stdenv.mkDerivation {
pname = "tremor";
version = "unstable-2018-03-16";
src = fetchFromGitLab {
owner = "xiph";
repo = "tremor";
domain = "gitlab.xiph.org";
rev = "562307a4a7082e24553f3d2c55dab397a17c4b4f";
sha256 = "0m07gq4zfgigsiz8b518xyb19v7qqp76qmp7lb262825vkqzl3zq";
};
outputs = [
"out"
"dev"
];
configureFlags = lib.optional (
stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
) "LDFLAGS=-Wl,--undefined-version";
nativeBuildInputs = [
autoreconfHook
pkg-config
];
propagatedBuildInputs = [ libogg ];
preConfigure = ''
sed -i /XIPH_PATH_OGG/d configure
'';
meta = {
homepage = "https://xiph.org/tremor/";
description = "Fixed-point version of the Ogg Vorbis decoder";
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,49 @@
{
stdenv,
lib,
cmake,
pkg-config,
fetchFromGitHub,
fmt,
libpsl,
cxxopts,
kdePackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tremotesf";
version = "2.8.2";
src = fetchFromGitHub {
owner = "equeim";
repo = "tremotesf2";
tag = finalAttrs.version;
hash = "sha256-o6GSuRKO2LNpaFUuSu6VUeZN/blfpsz/piE7RZ47YfI=";
# We need this for src/libtremotesf
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
kdePackages.wrapQtAppsHook
];
buildInputs = [
kdePackages.qtbase
kdePackages.qttools
fmt
libpsl
kdePackages.kwidgetsaddons
kdePackages.kwindowsystem
cxxopts
];
meta = {
description = "Remote GUI for transmission-daemon";
mainProgram = "tremotesf";
license = lib.licenses.gpl3Plus;
homepage = "https://github.com/equeim/tremotesf2";
maintainers = with lib.maintainers; [ sochotnicky ];
};
})

View File

@@ -0,0 +1,175 @@
{
lib,
stdenv,
fetchFromGitHub,
writeText,
cmake,
ninja,
curl,
git,
pandoc,
pkg-config,
unzip,
zip,
libGL,
libGLU,
freeimage,
freetype,
assimp,
catch2,
fmt,
glew,
miniz,
tinyxml-2,
xorg,
qt6,
copyDesktopItems,
makeDesktopItem,
}:
stdenv.mkDerivation rec {
pname = "TrenchBroom";
version = "2025.2";
src = fetchFromGitHub {
owner = "TrenchBroom";
repo = "TrenchBroom";
tag = "v${version}";
hash = "sha256-aOHhL0yBDgFTMcDY7RKZXRrReRiThcQdf7QMHEpRuks=";
fetchSubmodules = true;
};
# Manually simulate a vcpkg installation so that it can link the libraries
# properly.
postUnpack =
let
vcpkg_target = "x64-linux";
vcpkg_pkgs = [
"assimp"
"catch2"
"fmt"
"freeimage"
"freetype"
"glew"
"miniz"
"tinyxml2"
];
updates_vcpkg_file = writeText "update_vcpkg_trenchbroom" (
lib.concatMapStringsSep "\n" (name: ''
Package : ${name}
Architecture : ${vcpkg_target}
Version : 1.0
Status : is installed
'') vcpkg_pkgs
);
in
''
export VCPKG_ROOT="$TMP/vcpkg"
mkdir -p $VCPKG_ROOT/.vcpkg-root
mkdir -p $VCPKG_ROOT/installed/${vcpkg_target}/lib
mkdir -p $VCPKG_ROOT/installed/vcpkg/updates
ln -s ${updates_vcpkg_file} $VCPKG_ROOT/installed/vcpkg/status
mkdir -p $VCPKG_ROOT/installed/vcpkg/info
${lib.concatMapStrings (name: ''
touch $VCPKG_ROOT/installed/vcpkg/info/${name}_1.0_${vcpkg_target}.list
'') vcpkg_pkgs}
ln -s ${assimp.lib}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${catch2}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${fmt}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${freeimage}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${freetype}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${glew.out}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${miniz}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
ln -s ${tinyxml-2}/lib/lib* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
'';
postPatch = ''
substituteInPlace common/src/Version.h.in \
--subst-var-by APP_VERSION_YEAR ${lib.versions.major version} \
--subst-var-by APP_VERSION_NUMBER ${lib.versions.minor version} \
--subst-var-by GIT_DESCRIBE v${version}
substituteInPlace app/CMakeLists.txt \
--replace-fail 'set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")' 'set(CPACK_PACKAGING_INSTALL_PREFIX "'$out'")'
'';
nativeBuildInputs = [
cmake
ninja
curl
git
pandoc
qt6.wrapQtAppsHook
copyDesktopItems
pkg-config
unzip
zip
];
buildInputs = [
libGL
libGLU
xorg.libXxf86vm
xorg.libSM
freeimage
freetype
qt6.qtbase
qt6.qtwayland
qt6.qtsvg
catch2
fmt
glew
miniz
tinyxml-2
assimp
];
QT_PLUGIN_PATH = "${qt6.qtbase}/${qt6.qtbase.qtPluginPrefix}";
QT_QPA_PLATFORM = "offscreen";
cmakeFlags = [
"-DCMAKE_MAKE_PROGRAM=ninja"
"-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
"-DVCPKG_MANIFEST_INSTALL=OFF"
# https://github.com/TrenchBroom/TrenchBroom/issues/4002#issuecomment-1125390780
"-DCMAKE_PREFIX_PATH=cmake/packages"
];
ninjaFlags = [ "TrenchBroom" ];
postInstall = ''
pushd ../app/resources/linux/icons
for F in icon_*.png; do
SIZE=$(echo $F|sed -e s/icon_// -e s/.png//)
DIR=$out/share/icons/hicolor/$SIZE"x"$SIZE/apps
install -Dm644 $F $DIR/trenchbroom.png
done
popd
'';
desktopItems = [
(makeDesktopItem {
name = "TrenchBroom";
desktopName = "TrenchBroom level editor";
icon = "trenchbroom";
comment = meta.description;
categories = [ "Development" ];
exec = "trenchbroom";
})
];
meta = {
homepage = "https://trenchbroom.github.io/";
changelog = "https://github.com/TrenchBroom/TrenchBroom/releases/tag/v${version}";
description = "Level editor for Quake-engine based games";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ astro ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication trevorproxy

View File

@@ -0,0 +1,37 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "trevorspray";
version = "2.3.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-2kprXyZUAe8lBV48mBpmkhBtOoxgrP/TOTdS3Kw2WTE=";
};
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
beautifulsoup4
exchangelib
mechanicalsoup
pygments
pysocks
sh
tldextract
trevorproxy
];
meta = {
description = "Modular password spraying tool";
homepage = "https://github.com/blacklanternsecurity/TREVORspray";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "trevorspray";
};
}

View File

@@ -0,0 +1,54 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
gfortran,
hdf5,
python3,
emacs,
swig,
}:
stdenv.mkDerivation rec {
pname = "trexio";
version = "2.6.0";
src = fetchFromGitHub {
owner = "TREX-CoE";
repo = "trexio";
rev = "v${version}";
hash = "sha256-mTn/46oIvBbv7X0QwDxXQJH3QyH34u487QpLferC2Uc=";
};
postPatch = ''
patchShebangs tools/*
'';
nativeBuildInputs = [
cmake
gfortran
emacs
swig
python3
];
buildInputs = [
hdf5
];
outputs = [
"out"
"dev"
];
doCheck = true;
meta = with lib; {
description = "File format and library for the storage of quantum chemical wave functions";
homepage = "https://trex-coe.github.io/trexio/";
downloadPage = "https://github.com/TREX-CoE/trexio";
license = licenses.bsd3;
maintainers = [ maintainers.sheepforce ];
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchurl,
appimageTools,
makeWrapper,
tor,
trezord,
}:
let
pname = "trezor-suite";
version = "25.9.3";
suffix =
{
aarch64-linux = "linux-arm64";
x86_64-linux = "linux-x86_64";
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url = "https://github.com/trezor/trezor-suite/releases/download/v${version}/Trezor-Suite-${version}-${suffix}.AppImage";
hash =
{
# curl -Lfs https://github.com/trezor/trezor-suite/releases/download/v${version}/latest-linux{-arm64,}.yml | grep ^sha512 | sed 's/: /-/'
aarch64-linux = "sha512-mDEqlIxDKHD2xcwcnvehMJExytNBmvhp5iDIKBb/FfxY44We6SAknsocbeWPqq5XLkUbFjjG07IWGtZzdqTj7A==";
x86_64-linux = "sha512-rxCTYvi+I5ymlS9N4Y2ffIt5ZSgXf6U24mNKe1FNo5++6NfCXFf4vMWJreQ2TNUHsa8V0IixXrtar7AdWCpYQQ==";
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in
appimageTools.wrapType2 rec {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
mkdir -p $out/bin $out/share/${pname} $out/share/${pname}/resources
cp -a ${appimageContents}/locales/ $out/share/${pname}
cp -a ${appimageContents}/resources/app*.* $out/share/${pname}/resources
cp -a ${appimageContents}/resources/images/ $out/share/${pname}/resources
wrapProgram $out/bin/trezor-suite \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/resources/images/desktop/512x512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}'
# symlink system binaries instead bundled ones
mkdir -p $out/share/${pname}/resources/bin/{bridge,tor}
ln -sf ${trezord}/bin/trezord-go $out/share/${pname}/resources/bin/bridge/trezord
ln -sf ${tor}/bin/tor $out/share/${pname}/resources/bin/tor/tor
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Trezor Suite - Desktop App for managing crypto";
homepage = "https://suite.trezor.io";
changelog = "https://github.com/trezor/trezor-suite/releases/tag/v${version}";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ prusnak ];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
mainProgram = "trezor-suite";
};
}

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl yq
set -eu -o pipefail
target="$(dirname "$(readlink -f "$0")")/package.nix"
host="https://data.trezor.io"
metadata_aarch64=$(curl "$host/suite/releases/desktop/latest/latest-linux-arm64.yml")
metadata_x64=$(curl "$host/suite/releases/desktop/latest/latest-linux.yml")
hash_aarch64=$(echo "$metadata_aarch64" | yq .sha512 -r)
hash_x64=$(echo "$metadata_x64" | yq .sha512 -r)
version=$(echo "$metadata_x64" | yq .version -r)
sed -i "s@version = .*;@version = \"$version\";@g" "$target"
sed -i "s@aarch64-linux = \"sha512.*@aarch64-linux = \"sha512-$hash_aarch64\";@" "$target"
sed -i "s@x86_64-linux = \"sha512.*@x86_64-linux = \"sha512-$hash_x64\";@" "$target"

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchurl,
nixosTests,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "trezor-udev-rules";
version = "unstable-2019-07-17";
udevRules = fetchurl {
# let's pin the latest commit in the repo which touched the udev rules file
url = "https://raw.githubusercontent.com/trezor/trezor-firmware/68a3094b0a8e36b588b1bcb58c34a2c9eafc0dca/common/udev/51-trezor.rules";
sha256 = "0vlxif89nsqpbnbz1vwfgpl1zayzmq87gw1snskn0qns6x2rpczk";
};
nativeBuildInputs = [
udevCheckHook
];
doInstallCheck = true;
dontUnpack = true;
installPhase = ''
cp ${udevRules} 51-trezor.rules
mkdir -p $out/lib/udev/rules.d
# we use trezord group, not plugdev
# we don't need the udev-acl tag
substituteInPlace 51-trezor.rules \
--replace 'GROUP="plugdev"' 'GROUP="trezord"' \
--replace ', TAG+="udev-acl"' ""
cp 51-trezor.rules $out/lib/udev/rules.d/51-trezor.rules
'';
passthru.tests = { inherit (nixosTests) trezord; };
meta = with lib; {
description = "Udev rules for Trezor";
license = licenses.gpl3;
maintainers = with maintainers; [ prusnak ];
platforms = platforms.linux;
homepage = "https://github.com/trezor/trezor-firmware/tree/master/common/udev";
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
fetchpatch,
trezor-udev-rules,
nixosTests,
}:
buildGoModule rec {
pname = "trezord-go";
version = "2.0.33";
commit = "2680d5e";
src = fetchFromGitHub {
owner = "trezor";
repo = "trezord-go";
tag = "v${version}";
fetchSubmodules = true;
hash = "sha256-3I6NOzDMhzRyVSOURl7TjJ1Z0P0RcKrSs5rNaZ0Ho9M=";
};
vendorHash = "sha256-wXgAmZEXdM4FcMCQbAs+ydXshCAMu7nl/yVv/3sqaXE=";
patches = [
# fix build with Go 1.21 - https://github.com/trezor/trezord-go/pull/300
(fetchpatch {
url = "https://github.com/trezor/trezord-go/commit/616473d53a8ae49f1099e36ab05a2981a08fa606.patch";
hash = "sha256-yKTwgqWr4L6XEPV85A6D1wpRdpef8hkIbl4LrRmOyuo=";
})
# fix build with Go 1.24 - https://github.com/trezor/trezord-go/pull/305
(fetchpatch {
url = "https://github.com/trezor/trezord-go/commit/8ca9600d176bebf6cd2ad93ee9525a04059ee735.patch";
hash = "sha256-jW+x/FBFEIlRGTDHWF2Oj+05KmFLtFDGJwfYFx7yTv4=";
})
];
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ];
ldflags = [
"-s"
"-w"
"-X main.githash=${commit}"
];
passthru.tests = { inherit (nixosTests) trezord; };
meta = with lib; {
description = "Trezor Communication Daemon aka Trezor Bridge";
homepage = "https://trezor.io";
license = licenses.lgpl3Only;
maintainers = with maintainers; [
canndrew
jb55
prusnak
mmahut
_1000101
];
mainProgram = "trezord-go";
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "trf";
version = "4.09.1";
src = fetchFromGitHub {
owner = "Benson-Genomics-Lab";
repo = "trf";
rev = "v${version}";
sha256 = "sha256-73LypVqBdlRdDCblf9JNZQmS5Za8xpId4ha5GjTJHDo=";
};
meta = with lib; {
description = "Tandem Repeats Finder: a program to analyze DNA sequences";
homepage = "https://tandem.bu.edu/trf/trf.html";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ natsukium ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1 @@
{ trgui-ng }: trgui-ng.passthru.frontend

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
fetchFromGitHub,
alsa-lib,
buildNpmPackage,
cargo-tauri,
dbip-country-lite,
glib,
libayatana-appindicator,
nix-update-script,
openssl,
pkg-config,
rustPlatform,
webkitgtk_4_1,
}:
let
version = "1.4.0-unstable-2025-05-18";
src = fetchFromGitHub {
owner = "openscopeproject";
repo = "TrguiNG";
rev = "d2cd93ecc724f196d93c701fa27afa4288d2a37c";
hash = "sha256-Y3ZSpXmG+wi7x7qanKpRp917alssqF78L27Yt9K9Khs=";
};
meta = {
description = "Remote GUI for Transmission torrent daemon";
homepage = "https://github.com/openscopeproject/TrguiNG";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ ambroisie ];
};
frontend = buildNpmPackage (finalAttrs: {
pname = "TrguiNG-frontend";
inherit version src;
npmDepsHash = "sha256-sHZHAlV3zVeCmVTlIr0NeS1zxRCKfRMv1w9bW0tOg3g=";
npmBuildScript = "webpack-prod";
installPhase = ''
runHook preInstall
cp -r dist/ $out
runHook postInstall
'';
env.TRGUING_VERSION = finalAttrs.version;
meta = meta // {
description = "Web UI for Transmission torrent daemon";
};
});
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "TrguiNG";
inherit version src;
cargoHash = "sha256-TflzT1BNAciMcxcejrlmIOIjXc1tpm/zX0kjk+dpGiM=";
postPatch = ''
cp ${dbip-country-lite}/share/dbip/dbip-country-lite.mmdb src-tauri/dbip.mmdb
# Copy pre-built frontend and remove `beforeBuildCommand` to build it
cp -r ${finalAttrs.passthru.frontend} dist/
substituteInPlace src-tauri/tauri.conf.json \
--replace-fail '"npm run webpack-prod"' '""'
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
'';
nativeBuildInputs = [
cargo-tauri.hook
pkg-config
];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
glib
libayatana-appindicator
webkitgtk_4_1
];
cargoRoot = "src-tauri";
buildAndTestSubdir = "src-tauri";
passthru = {
updateScript = nix-update-script {
extraArgs = [
"-s"
"frontend"
];
};
inherit frontend;
};
meta = meta // {
mainProgram = "TrguiNG";
};
})

View File

@@ -0,0 +1,160 @@
{
lib,
stdenv,
python312,
makeWrapper,
nix-update-script,
fetchFromGitHub,
rustPlatform,
buildNpmPackage,
nodejs_24,
wrapGAppsHook3,
libappindicator-gtk3,
}:
let
version = "8.2.3";
python3 = python312;
nodejs = nodejs_24;
src = fetchFromGitHub {
owner = "tribler";
repo = "Tribler";
tag = "v${version}";
hash = "sha256-yThl3HhPtwi/pK5Rcr2ClVLY8uCnIyfvdc53A8gjKDg=";
};
tribler-webui = buildNpmPackage {
inherit nodejs version;
pname = "tribler-webui";
src = "${src}/src/tribler/ui";
npmDepsHash = "sha256-bgRwhqP6/NMPFbZks31IZtVGV9wzFFU6qSgyLvdarlY=";
# The prepack script runs the build script, which we'd rather do in the build phase.
npmPackFlags = [ "--ignore-scripts" ];
NODE_OPTIONS = "--openssl-legacy-provider";
dontNpmBuild = true;
dontNpmInstall = true;
installPhase = ''
mkdir -pv $out
cp -prvd ./* $out/
cd $out
npm install
npm run build
'';
};
in
python3.pkgs.buildPythonApplication {
inherit version src;
name = "tribler";
pyproject = true;
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
# requirements.txt
bitarray
configobj
pyipv8
ipv8-rust-tunnels
libtorrent-rasterbar
lz4
pillow
pony
pystray
];
buildInputs = with python3.pkgs; [
# setup.py requirements
pygobject3
setuptools
# sphinx requirements
sphinxHook
sphinx
sphinx-autoapi
sphinx-rtd-theme
astroid
# tray icon deps
wrapGAppsHook3
libappindicator-gtk3
# test phase requirements
pytestCheckHook
];
outputs = [
"out"
];
buildPhase = ''
# fix the entrypoint
substituteInPlace build/setup.py --replace-fail '"tribler=tribler.run:main"' '"tribler=tribler.run:main_sync"'
substituteInPlace src/run_tribler.py --replace-fail 'if __name__ == "__main__":' 'def main_sync():'
# copy the built webui
rm -r src/tribler/ui
ln -s ${tribler-webui} src/tribler/ui
# build the docs
# FIXME: make doc SPHINXBUILD=${lib.getExe' python3.pkgs.sphinx "sphinx-build"}
# build the wheel
substituteInPlace build/win/build.py --replace-fail "if {'setup.py', 'bdist_wheel'}.issubset(sys.argv):" "if True:"
export GITHUB_TAG=v${version}
python3 build/debian/update_metainfo.py
python3 build/setup.py bdist_wheel
runHook pytestCheckHook
# build the docs
runHook sphinxHook
'';
postInstall = ''
ln -s ${tribler-webui} $out/lib/python3.12/site-packages/tribler/ui
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ libappindicator-gtk3 ]}"
)
'';
postFixup = ''
runHook wrapGAppsHook3
'';
disabledTests = [
"test_request_for_version"
"test_establish_connection"
"test_tracker_test_error_resolve"
"test_get_default_fallback"
"test_get_default_fallback_half_tree"
"test_get_set_explicit"
];
disabledTestPaths = [
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Decentralized P2P filesharing client based on the Bittorrent protocol";
mainProgram = "tribler";
homepage = "https://www.tribler.org/";
changelog = "https://github.com/Tribler/tribler/releases/tag/v${version}";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
mkg20001
mlaradji
xvapx
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "trickest-cli";
version = "2.1.4";
src = fetchFromGitHub {
owner = "trickest";
repo = "trickest-cli";
tag = "v${version}";
hash = "sha256-zE52gBcajw62sSyjd50PDiC6cTLQl8r18UL2XIoLkY0=";
};
vendorHash = "sha256-Ae0fNzYOAeCMrNFVhw4VvG/BkOMcguIMiBvLGt7wxEo=";
ldflags = [
"-s"
"-w"
];
meta = {
description = "CLI tool to execute Trickest workflows";
homepage = "https://github.com/trickest/trickest-cli";
changelog = "https://github.com/trickest/trickest-cli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "trickest";
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchurl,
libevent,
libtirpc,
}:
stdenv.mkDerivation rec {
pname = "trickle";
version = "1.07";
src = fetchurl {
url = "https://monkey.org/~marius/trickle/trickle-${version}.tar.gz";
sha256 = "0s1qq3k5mpcs9i7ng0l9fvr1f75abpbzfi1jaf3zpzbs1dz50dlx";
};
buildInputs = [
libevent
libtirpc
];
preConfigure = ''
sed -i 's|libevent.a|libevent.so|' configure
'';
preBuild = ''
sed -i '/#define in_addr_t/ s:^://:' config.h
'';
NIX_LDFLAGS = [
"-levent"
"-ltirpc"
];
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
configureFlags = [ "--with-libevent" ];
hardeningDisable = [ "format" ];
meta = {
description = "Lightweight userspace bandwidth shaper";
license = lib.licenses.bsd3;
homepage = "https://monkey.org/~marius/pages/?page=trickle";
platforms = lib.platforms.linux;
mainProgram = "trickle";
};
}

Some files were not shown because too many files have changed in this diff Show More