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,36 @@
{
lib,
fetchFromGitHub,
makeWrapper,
rustPlatform,
rust-analyzer,
}:
rustPlatform.buildRustPackage rec {
pname = "ra-multiplex";
version = "0.2.5";
src = fetchFromGitHub {
owner = "pr2502";
repo = "ra-multiplex";
rev = "v${version}";
hash = "sha256-aBrn9g+MGXLAsOmHqw1Tt6NPFGJTyYv/L9UI/vQU4i8=";
};
cargoHash = "sha256-NVE/ROk6x1R0D5eyOzz1gYPvgG0lX5L2tCuZGIS9kzs=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ra-multiplex \
--suffix PATH : ${lib.makeBinPath [ rust-analyzer ]}
'';
meta = with lib; {
description = "Multiplexer for rust-analyzer";
mainProgram = "ra-multiplex";
homepage = "https://github.com/pr2502/ra-multiplex";
license = with licenses; [ mit ];
maintainers = with maintainers; [ norfair ];
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
python3,
fetchFromGitHub,
fetchPypi,
}:
let
python3' = python3.override {
packageOverrides = self: super: {
scikit-learn =
let
version = "1.5.2";
in
super.scikit-learn.overridePythonAttrs (old: {
inherit version;
src = fetchPypi {
pname = "scikit_learn";
inherit version;
hash = "sha256-tCN+17P90KSIJ5LmjvJUXVuqUKyju0WqffRoE4rY+U0=";
};
# There are 2 tests that are failing, disabling the tests for now.
# - test_csr_polynomial_expansion_index_overflow[csr_array-False-True-2-65535]
# - test_csr_polynomial_expansion_index_overflow[csr_array-False-True-3-2344]
doCheck = false;
});
};
self = python3;
};
# Make sure to check for which version of scikit-learn this project was built
# Currently version 2.3.2 is made with scikit-learn 1.5.2
# Upgrading to newer versions of scikit-learn break the project
version = "2.3.2";
in
python3'.pkgs.buildPythonApplication {
pname = "rabbit";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "natarajan-chidambaram";
repo = "RABBIT";
tag = version;
hash = "sha256-icf42vqYPNH1v1wEv/MpqScqMUr/qDlcGoW9kPY2R6s=";
};
pythonRelaxDeps = [
"joblib"
"numpy"
"requests"
"scikit-learn"
"scipy"
"tqdm"
"urllib3"
];
build-system = with python3'.pkgs; [
setuptools
];
dependencies = with python3'.pkgs; [
joblib
numpy
pandas
python-dateutil
requests
scikit-learn
scipy
tqdm
urllib3
];
pythonImportsCheck = [ "rabbit" ];
meta = {
description = "Tool for identifying bot accounts based on their recent GitHub event history";
homepage = "https://github.com/natarajan-chidambaram/RABBIT";
license = lib.licenses.asl20;
mainProgram = "rabbit";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
openssl,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rabbitmq-c";
version = "0.15.0";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "alanxz";
repo = "rabbitmq-c";
rev = "v${finalAttrs.version}";
hash = "sha256-uOI+YV9aV/LGlSxr75sSii5jQ005smCVe14QAGNpKY8=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl ];
meta = with lib; {
description = "RabbitMQ C AMQP client library";
homepage = "https://github.com/alanxz/rabbitmq-c";
license = licenses.mit;
platforms = platforms.unix;
pkgConfigModules = [ "librabbitmq" ];
};
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
})

View File

@@ -0,0 +1,137 @@
{
lib,
beamPackages,
stdenv,
fetchurl,
python3,
libxml2,
libxslt,
xmlto,
docbook_xml_dtd_45,
docbook_xsl,
zip,
unzip,
rsync,
getconf,
socat,
procps,
coreutils,
gnused,
systemd,
glibcLocales,
nixosTests,
which,
}:
let
runtimePath = lib.makeBinPath (
[
beamPackages.erlang
getconf # for getting memory limits
socat
gnused
coreutils # used by helper scripts
]
++ lib.optionals stdenv.hostPlatform.isLinux [
procps # the built-in macOS version has extra entitlements to read rss
systemd # for systemd unit activation check
]
);
in
stdenv.mkDerivation rec {
pname = "rabbitmq-server";
version = "4.0.9";
# when updating, consider bumping elixir version in all-packages.nix
src = fetchurl {
url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${pname}-${version}.tar.xz";
hash = "sha256-imBxBn8RQS0jBGfT5KLLLt+fKvyybzLzPZu9DpFOos8=";
};
nativeBuildInputs = [
unzip
xmlto
docbook_xml_dtd_45
docbook_xsl
zip
rsync
python3
which
];
buildInputs = [
beamPackages.erlang
beamPackages.elixir
libxml2
libxslt
glibcLocales
];
outputs = [
"out"
"man"
"doc"
];
installFlags = [
"PREFIX=${placeholder "out"}"
"RMQ_ERLAPP_DIR=${placeholder "out"}"
];
installTargets = [
"install"
"install-man"
];
preBuild = ''
export LANG=C.UTF-8 # fix elixir locale warning
export PROJECT_VERSION="$version"
'';
postInstall = ''
# rabbitmq-env calls to sed/coreutils, so provide everything early
sed -i $out/sbin/rabbitmq-env -e '2s|^|PATH=${runtimePath}\''${PATH:+:}\$PATH/\n|'
# We know exactly where rabbitmq is gonna be, so we patch that into the env-script.
# By doing it early we make sure that auto-detection for this will
# never be executed (somewhere below in the script).
sed -i $out/sbin/rabbitmq-env -e "2s|^|RABBITMQ_SCRIPTS_DIR=$out/sbin\n|"
# theres a few stray files that belong into share
mkdir -p $doc/share/doc/rabbitmq-server
mv $out/LICENSE* $doc/share/doc/rabbitmq-server
# and an unecessarily copied INSTALL file
rm $out/INSTALL
'';
# Can not use versionCheckHook since that doesn't allow for setting environment variables
# which is necessary since Erlang needs a $HOME for the Cookie.
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
out="$(env - LANG=C.utf8 HOME=$TMPDIR ${placeholder "out"}/bin/rabbitmqctl version)"
if [[ "$out" != "$version" ]]; then
echo "Rabbitmq should report version $version, but thinks it's version $out" >&2
exit 1
fi
runHook postInstallCheck
'';
# Needed for the check in installCheckPhase
__darwinAllowLocalNetworking = true;
passthru.tests = {
vm-test = nixosTests.rabbitmq;
};
meta = {
homepage = "https://www.rabbitmq.com/";
description = "Implementation of the AMQP messaging protocol";
changelog = "https://github.com/rabbitmq/rabbitmq-server/releases/tag/v${version}";
license = lib.licenses.mpl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ samueltardieu ];
};
}

View File

@@ -0,0 +1,42 @@
{
rustPlatform,
lib,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "rabbitmqadmin-ng";
version = "2.15.0";
src = fetchFromGitHub {
owner = "rabbitmq";
repo = "rabbitmqadmin-ng";
tag = "v${version}";
hash = "sha256-OaSCqK3VwR5b6tQUfGFM/clHynwG0TgMy2ZEcFsLFx0=";
};
cargoHash = "sha256-dynUbe6UCVdPEpy+fXABhzSsrF/OV5z1eMvrXtzKs70=";
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
strictDeps = true;
# This requires a running rabbitmq instance to communicate with that needs
# to be set up by hand. It should be possible to run tests in the future
# if we ever add a `rabbitmqTestHook`, similar to the `postgresqlTestHook`.
doCheck = false;
meta = {
description = "Command line tool for RabbitMQ that uses the HTTP API";
teams = [ lib.teams.flyingcircus ];
homepage = "https://www.rabbitmq.com/docs/management-cli";
license = with lib.licenses; [
mit
asl20
];
mainProgram = "rabbitmqadmin";
};
}

View File

@@ -0,0 +1,30 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "rabtap";
version = "1.44.1";
src = fetchFromGitHub {
owner = "jandelgado";
repo = "rabtap";
rev = "v${version}";
sha256 = "sha256-mW2O8/22zbA3/wpYkQHCI0z8EEL0Wyud2TD5vNUJrNI=";
};
vendorHash = "sha256-Yi4vH3UMOE//p3H9iCR5RY3SjjR0mu2sBRx8WK57Dq8=";
ldflags = [
"-X main.BuildVersion=v${version}"
];
meta = with lib; {
description = "RabbitMQ wire tap and swiss army knife";
license = licenses.gpl3Only;
homepage = "https://github.com/jandelgado/rabtap";
maintainers = with maintainers; [ eigengrau ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/STDH.cpp b/src/STDH.cpp
index 5f78473..47c3f8b 100644
--- a/src/STDH.cpp
+++ b/src/STDH.cpp
@@ -5,6 +5,8 @@
#include "player.h"
#include "drivers.h"
#include "cup.h"
+#include <sys/stat.h>
+#include <sys/types.h>
HScreen hscreen;

View File

@@ -0,0 +1,48 @@
{
fetchurl,
lib,
stdenv,
allegro,
libjpeg,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "racer";
version = "1.1";
src =
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://hippo.nipax.cz/src/racer-${version}.tar.gz";
sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9";
}
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://hippo.nipax.cz/src/racer-${version}.64.tar.gz";
sha256 = "0rjy3gmlhwfkb9zs58j0mc0dar0livwpbc19r6zw5r2k6r7xdan0";
}
else
throw "System not supported";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
allegro
libjpeg
];
prePatch = ''
sed -i s,/usr/local,$out, Makefile src/HGFX.cpp src/STDH.cpp
sed -i s,/usr/share,$out/share, src/HGFX.cpp src/STDH.cpp
'';
patches = [ ./mkdir.patch ];
meta = {
description = "Car racing game";
mainProgram = "racer";
homepage = "http://hippo.nipax.cz/download.en.php";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,27 @@
#lang racket/base
(require
racket/function
racket/list
racket/pretty
racket/string
setup/dirs
)
(define config-file (build-path (find-config-dir) "config.rktd"))
(define lib-paths
((compose remove-duplicates
(curry map (curryr string-trim "-L" #:right? #f))
(curry filter (curryr string-prefix? "-L"))
string-split)
(getenv "NIX_LDFLAGS")))
(define config
(let* ([prev-config (read-installation-configuration-table)]
[prev-lib-search-dirs (hash-ref prev-config 'lib-search-dirs '(#f))]
[lib-search-dirs (remove-duplicates (append lib-paths prev-lib-search-dirs))])
(hash-set prev-config 'lib-search-dirs lib-search-dirs)))
(call-with-output-file config-file
#:exists 'replace
(curry pretty-write config))

View File

@@ -0,0 +1,11 @@
{
"version": "8.18",
"full": {
"filename": "racket-8.18-src.tgz",
"sha256": "65477c71ec1a978a6ee4db582b9b47b1a488029d7a42e358906de154a6e5905c"
},
"minimal": {
"filename": "racket-minimal-8.18-src.tgz",
"sha256": "24b9cf8365254b43bac308192c782edfbd86363df1322c4e063b797ed0f7db66"
}
}

View File

@@ -0,0 +1,175 @@
{
lib,
stdenv,
fetchurl,
libiconvReal,
libz,
lz4,
ncurses,
openssl,
sqlite,
disableDocs ? false,
callPackage,
writers,
}:
let
manifest = lib.importJSON ./manifest.json;
inherit (stdenv.hostPlatform) isDarwin;
in
stdenv.mkDerivation (finalAttrs: {
pname = "racket";
inherit (manifest) version;
src = fetchurl {
url = "https://mirror.racket-lang.org/installers/${manifest.version}/${manifest.minimal.filename}";
inherit (manifest.minimal) sha256;
};
buildInputs = [
libiconvReal
libz
lz4
ncurses
openssl
sqlite.out
];
patches = lib.optionals isDarwin [
/*
The entry point binary $out/bin/racket is codesigned at least once. The
following error is triggered as a result.
(error 'add-ad-hoc-signature "file already has a signature")
We always remove the existing signature then call add-ad-hoc-signature to
circumvent this error.
*/
./patches/force-remove-codesign-then-add.patch
];
preConfigure =
/*
The configure script forces using `libtool -o` as AR on Darwin. But, the
`-o` option is only available from Apple libtool. GNU ar works here.
*/
lib.optionalString isDarwin ''
substituteInPlace src/ChezScheme/zlib/configure \
--replace-fail 'ARFLAGS="-o"' 'AR=ar; ARFLAGS="rc"'
''
+ ''
mkdir src/build
cd src/build
'';
configureScript = "../configure";
configureFlags = [
# > docs failure: ftype-ref: ftype mismatch for #<ftype-pointer>
# "--enable-check"
"--enable-csonly"
"--enable-liblz4"
"--enable-libz"
]
++ lib.optional disableDocs "--disable-docs"
++ lib.optionals (!(finalAttrs.dontDisableStatic or false)) [
# instead of `--disable-static` that `stdenv` assumes
"--disable-libs"
# "not currently supported" in `configure --help-cs` but still emphasized in README
"--enable-shared"
]
++ lib.optionals isDarwin [
"--disable-strip"
# "use Unix style (e.g., use Gtk) for Mac OS", which eliminates many problems
"--enable-xonx"
];
# The upstream script builds static libraries by default.
dontAddStaticConfigureFlags = true;
dontStrip = isDarwin;
postFixup =
let
configureInstallation = builtins.path {
name = "configure-installation.rkt";
path = ./configure-installation.rkt;
};
in
''
$out/bin/racket -U -u ${configureInstallation}
'';
passthru = {
# Functionalities #
updateScript = {
command = ./update.py;
attrPath = "racket";
supportedFeatures = [ "commit" ];
};
writeScript =
nameOrPath:
{
libraries ? [ ],
...
}@config:
assert lib.assertMsg (libraries == [ ]) "library integration for Racket has not been implemented";
writers.makeScriptWriter (
removeAttrs config [ "libraries" ]
// {
interpreter = "${lib.getExe finalAttrs.finalPackage}";
}
) nameOrPath;
writeScriptBin = name: finalAttrs.passthru.writeScript "/bin/${name}";
# Tests #
tests = builtins.mapAttrs (name: path: callPackage path { racket = finalAttrs.finalPackage; }) {
## Basic ##
write-greeting = ./tests/write-greeting.nix;
get-version-and-variant = ./tests/get-version-and-variant.nix;
load-openssl = ./tests/load-openssl.nix;
## Nixpkgs supports ##
nix-write-script = ./tests/nix-write-script.nix;
};
};
meta = {
description = "Programmable programming language (minimal distribution)";
longDescription = ''
Racket is a full-spectrum programming language. It goes beyond
Lisp and Scheme with dialects that support objects, types,
laziness, and more. Racket enables programmers to link
components written in different dialects, and it empowers
programmers to create new, project-specific dialects. Racket's
libraries support applications from web servers and databases to
GUIs and charts.
This minimal distribution includes just enough of Racket that you can
use `raco pkg` to install more.
'';
homepage = "https://racket-lang.org/";
changelog = "https://github.com/racket/racket/releases/tag/v${finalAttrs.version}";
/*
> Racket is distributed under the MIT license and the Apache version 2.0
> license, at your option.
> The Racket runtime system embeds Chez Scheme, which is distributed
> under the Apache version 2.0 license.
*/
license = with lib.licenses; [
asl20
mit
];
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode
];
maintainers = with lib.maintainers; [ rc-zb ];
mainProgram = "racket";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,123 @@
{
lib,
stdenv,
fetchurl,
racket-minimal,
cairo,
fontconfig,
glib,
glibcLocales,
gtk3,
libGL,
libiodbc,
libjpeg,
libpng,
makeFontsConf,
pango,
unixODBC,
wrapGAppsHook3,
disableDocs ? false,
callPackage,
}:
let
minimal = racket-minimal.override { inherit disableDocs; };
manifest = lib.importJSON ./manifest.json;
inherit (stdenv.hostPlatform) isDarwin;
in
minimal.overrideAttrs (
finalAttrs: prevAttrs: {
src = fetchurl {
url = "https://mirror.racket-lang.org/installers/${manifest.version}/${manifest.full.filename}";
inherit (manifest.full) sha256;
};
buildInputs = prevAttrs.buildInputs ++ [
(if isDarwin then libiodbc else unixODBC)
cairo
fontconfig.lib
glib
gtk3
libGL
libjpeg
libpng
pango
];
nativeBuildInputs = [
wrapGAppsHook3
];
patches = prevAttrs.patches or [ ] ++ [
/*
Hardcode variant detection because nixpkgs wraps the Racket binary making it
fail to detect its variant at runtime.
https://github.com/NixOS/nixpkgs/issues/114993#issuecomment-812951247
*/
./patches/force-cs-variant.patch
];
preBuild =
let
libPathsVar = if isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
/*
Makes FFIs available for setting up `main-distribution` and its
dependencies, which is integrated into the build process of Racket
*/
''
for lib_path in $( \
echo "$NIX_LDFLAGS" \
| tr ' ' '\n' \
| grep '^-L' \
| sed 's/^-L//' \
| awk '!seen[$0]++' \
); do
addToSearchPath ${libPathsVar} $lib_path
done
''
# Fixes Fontconfig errors
+ ''
export FONTCONFIG_FILE=${makeFontsConf { fontDirectories = [ ]; }}
export XDG_CACHE_HOME=$(mktemp -d)
'';
preFixup = lib.optionalString (!isDarwin) ''
gappsWrapperArgs+=("--set" "LOCALE_ARCHIVE" "${glibcLocales}/lib/locale/locale-archive")
'';
passthru =
let
notUpdated = x: !builtins.isAttrs x || lib.isDerivation x;
stopPred =
_: lhs: rhs:
notUpdated lhs || notUpdated rhs;
in
lib.recursiveUpdateUntil stopPred prevAttrs.passthru {
tests = builtins.mapAttrs (name: path: callPackage path { racket = finalAttrs.finalPackage; }) {
## `main-distribution` ##
draw-crossing = ./tests/draw-crossing.nix;
};
};
meta = prevAttrs.meta // {
description = "Programmable programming language";
longDescription = ''
Racket is a full-spectrum programming language. It goes beyond
Lisp and Scheme with dialects that support objects, types,
laziness, and more. Racket enables programmers to link
components written in different dialects, and it empowers
programmers to create new, project-specific dialects. Racket's
libraries support applications from web servers and databases to
GUIs and charts.
'';
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.darwin;
};
}
)

View File

@@ -0,0 +1,12 @@
--- old/collects/setup/variant.rkt
+++ new/collects/setup/variant.rkt
@@ -7,7 +7,8 @@
(provide variant-suffix
script-variant?)
-(define plain-variant
+(define plain-variant 'cs)
+#;(define plain-variant
(delay/sync
(cond
[(cross-installation?)

View File

@@ -0,0 +1,10 @@
--- old/src/mac/codesign.rkt
+++ new/src/mac/codesign.rkt
@@ -18,6 +18,6 @@
file))
(void
- (if remove?
+ (begin
(remove-signature file)
(add-ad-hoc-signature file)))

View File

@@ -0,0 +1,18 @@
{ runCommandLocal, racket }:
runCommandLocal "racket-test-draw-crossing"
{
nativeBuildInputs = [ racket ];
}
''
racket -f - <<EOF
(require racket/draw)
(define target (make-bitmap 64 64))
(define dc (new bitmap-dc% [bitmap target]))
(send dc draw-line 0 0 64 64)
(send dc draw-line 0 64 64 0)
(send target save-file (getenv "out") 'png)
EOF
''

View File

@@ -0,0 +1,45 @@
{
lib,
runCommandLocal,
racket,
}:
runCommandLocal "racket-test-get-version-and-variant"
{
nativeBuildInputs = [ racket ];
}
(
lib.concatLines (
map
(
{ expectation, output }:
''
expectation="${expectation}"
output="${output}"
if test "$output" != "$expectation"; then
echo "output mismatch: expected ''${expectation}, but got ''${output}"
exit 1
fi
''
)
[
{
expectation = racket.version;
output = "$(racket -e '(display (version))')";
}
{
expectation = "cs";
output = "$(racket -e '(require launcher/launcher) (display (current-launcher-variant))')";
}
{
expectation = "${lib.getExe racket}";
output = "$(racket -e '(require compiler/find-exe) (display (find-exe))')";
}
]
)
+ ''
touch $out
''
)

View File

@@ -0,0 +1,15 @@
{ runCommandLocal, racket }:
runCommandLocal "racket-test-load-openssl"
{
nativeBuildInputs = [ racket ];
}
''
racket -f - <<EOF
(require openssl)
(unless ssl-available?
(raise ssl-load-fail-reason))
EOF
touch $out
''

View File

@@ -0,0 +1,26 @@
{ runCommandLocal, racket }:
let
script = racket.writeScript "racket-test-nix-write-script-the-script" { } ''
#lang racket/base
(display "success")
(newline)
'';
in
runCommandLocal "racket-test-nix-write-script"
{
nativeBuildInputs = [ racket ];
}
''
expectation="success"
output="$(${script})"
if test "$output" != "$expectation"; then
echo "output mismatch: expected ''${expectation}, but got ''${output}"
exit 1
fi
touch $out
''

View File

@@ -0,0 +1,23 @@
{ runCommandLocal, racket }:
runCommandLocal "racket-test-write-greeting"
{
nativeBuildInputs = [ racket ];
}
''
expectation="Hello, world!"
racket -f - <<EOF
(with-output-to-file (getenv "out")
(lambda ()
(display "Hello, world!")
(newline)))
EOF
output="$(cat $out)"
if test "$output" != "$expectation"; then
echo "output mismatch: expected ''${expectation}, but got ''${output}"
exit 1
fi
''

View File

@@ -0,0 +1,73 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 --packages 'python3.withPackages (ps: with ps; [ requests beautifulsoup4 ])'
import os
import re
import json
import requests
from bs4 import BeautifulSoup
SITE = "https://download.racket-lang.org"
MANIFEST_FILENAME = "manifest.json"
def find_info(table, group_name, subgroup_name):
group = table.find(
string=re.compile("^{}\\s*".format(group_name))
).find_parent("tr", class_="group")
subgroup = group.find_next(
string=re.compile("^{}\\s*".format(subgroup_name))
).find_parent(class_="subgroup")
link = subgroup.find_next(
"a",
class_="installer",
string="Source"
)
filename = link["href"].split("/")[1]
sha256 = link.find_next(class_="checksum").string
return {
"filename": filename,
"sha256": sha256,
}
os.chdir(os.path.dirname(os.path.abspath(__file__)))
prev_version = os.environ["UPDATE_NIX_OLD_VERSION"]
homepage = BeautifulSoup(requests.get(SITE).text, "html.parser")
version = homepage.find(
"h3",
string=re.compile("^Version \\d+\\.\\d+")
).string.split()[1]
if version == prev_version:
raise Exception("no newer version available")
down_page_path = homepage.find(
"a",
string="More Installers and Checksums"
)["href"]
down_page = BeautifulSoup(requests.get(SITE + "/" + down_page_path).text, "html.parser")
down_table = down_page.find(class_="download-table")
full = find_info(down_table, "Racket", "Unix")
minimal = find_info(down_table, "Minimal Racket", "All Platforms")
with open(MANIFEST_FILENAME, "w", encoding="utf-8") as f:
json.dump({
"version": version,
"full": full,
"minimal": minimal,
}, f, indent=2, ensure_ascii=False)
f.write("\n")
print(json.dumps(
[
{
"attrPath": os.environ["UPDATE_NIX_ATTR_PATH"],
"oldVersion": prev_version,
"newVersion": version,
"files": [ os.path.abspath(MANIFEST_FILENAME) ],
},
],
indent=2, ensure_ascii=False
))

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitLab,
bash,
}:
let
# Fetch explicitly, otherwise build will try to do so
owl = fetchurl {
name = "ol.c.gz";
url = "https://haltp.org/files/ol-0.2.2.c.gz";
hash = "sha256-/KhdrjaRAQhZjYpKJE33qMJxnngDrEbScHYuzkrvxVw=";
};
hex = fetchFromGitLab {
owner = "owl-lisp";
repo = "hex";
rev = "e95ebd38e4f7ef8e3d4e653f432e43ce0a804ca6";
hash = "sha256-OT04EGun8nKR6D55bMx8xj20dSFwxI7zP/8sdeFZAHQ=";
};
in
stdenv.mkDerivation rec {
pname = "radamsa";
version = "0.7";
src = fetchFromGitLab {
owner = "akihe";
repo = "radamsa";
tag = "v${version}";
hash = "sha256-cwTE+8mZujuVbm8vOpqGWCAYMwrWUXzLP7k3y7UoKtU=";
};
patchPhase = ''
substituteInPlace ./tests/bd.sh \
--replace-fail "/bin/echo" echo
substituteInPlace Makefile \
--replace-fail "cd lib && git clone https://gitlab.com/owl-lisp/hex.git" ""
ln -s ${owl} ol.c.gz
mkdir lib
ln -s ${hex} lib/hex
patchShebangs tests
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"BINDIR="
];
nativeCheckInputs = [ bash ];
doCheck = true;
__darwinAllowLocalNetworking = true;
meta = {
description = "General purpose fuzzer";
mainProgram = "radamsa";
longDescription = "Radamsa is a general purpose data fuzzer. It reads data from given sample files, or standard input if none are given, and outputs modified data. It is usually used to generate malformed data for testing programs.";
homepage = "https://gitlab.com/akihe/radamsa";
maintainers = [ ];
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

1687
pkgs/by-name/ra/radarr/deps.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,204 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
sqlite,
withFFmpeg ? true, # replace bundled ffprobe binary with symlink to ffmpeg package.
servarr-ffmpeg,
fetchYarnDeps,
yarn,
fixup-yarn-lock,
nodejs,
nixosTests,
# update script
writers,
python3Packages,
nix,
prefetch-yarn-deps,
fetchpatch,
applyPatches,
}:
let
version = "5.26.2.10099";
# The dotnet8 compatibility patches also change `yarn.lock`, so we must pass
# the already patched lockfile to `fetchYarnDeps`.
src = applyPatches {
src = fetchFromGitHub {
owner = "Radarr";
repo = "Radarr";
tag = "v${version}";
hash = "sha256-7tU9oxE1F/dcR5bwb/qHyux3WA6lEwdozLloDgOMVbU=";
};
postPatch = ''
mv src/NuGet.config NuGet.Config
'';
patches = lib.optionals (lib.versionOlder version "6.0") [
# See https://github.com/Radarr/Radarr/pull/11064
# Unfortunately, the .NET 8 upgrade will be merged into the v6 branch,
# and it may take some time for that to become stable.
# However, the patches cleanly apply to v5 as well.
(fetchpatch {
name = "dotnet8-compatibility";
url = "https://github.com/Radarr/Radarr/commit/490891c63de589604bdc3373cfc85068c3826648.patch";
hash = "sha256-SCP7MPUkEZLSrls8ouekSXpXdgAJTwNFPirHjaMkQ6s=";
})
(fetchpatch {
name = "dotnet8-darwin-compatibility";
url = "https://github.com/Radarr/Radarr/commit/f38a129289c49a242d8901dc2f041f9dc8bfc303.patch";
hash = "sha256-SAMUHqlSj8FPq20wY8NWbRytVZXTPtMXMfM3CoM8kSA=";
})
];
};
rid = dotnetCorePackages.systemToDotnetRid stdenvNoCC.hostPlatform.system;
in
buildDotnetModule {
pname = "radarr";
inherit version src;
strictDeps = true;
nativeBuildInputs = [
nodejs
yarn
prefetch-yarn-deps
fixup-yarn-lock
];
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-WFILG6nLEc8WO0j0CKH7RcX1++ucVOCge/UKcpHj87A=";
};
ffprobe = lib.optionalDrvAttr withFFmpeg (lib.getExe' servarr-ffmpeg "ffprobe");
postConfigure = ''
yarn config --offline set yarn-offline-mirror "$yarnOfflineCache"
fixup-yarn-lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs --build node_modules
'';
postBuild = ''
yarn --offline run build --env production
'';
postInstall =
lib.optionalString withFFmpeg ''
rm -- "$out/lib/radarr/ffprobe"
ln -s -- "$ffprobe" "$out/lib/radarr/ffprobe"
''
+ ''
cp -a -- _output/UI "$out/lib/radarr/UI"
'';
nugetDeps = ./deps.json;
runtimeDeps = [ sqlite ];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
doCheck = true;
__darwinAllowLocalNetworking = true; # for tests
__structuredAttrs = true; # for Copyright property that contains spaces
executables = [ "Radarr" ];
projectFile = [
"src/NzbDrone.Console/Radarr.Console.csproj"
"src/NzbDrone.Mono/Radarr.Mono.csproj"
];
testProjectFile = [
"src/NzbDrone.Api.Test/Radarr.Api.Test.csproj"
"src/NzbDrone.Common.Test/Radarr.Common.Test.csproj"
"src/NzbDrone.Core.Test/Radarr.Core.Test.csproj"
"src/NzbDrone.Host.Test/Radarr.Host.Test.csproj"
"src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj"
"src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj"
"src/NzbDrone.Test.Common/Radarr.Test.Common.csproj"
];
dotnetFlags = [
"--property:TargetFramework=net8.0"
"--property:EnableAnalyzers=false"
"--property:SentryUploadSymbols=false" # Fix Sentry upload failed warnings
# Override defaults in src/Directory.Build.props that use current time.
"--property:Copyright=Copyright 2014-2025 radarr.video (GNU General Public v3)"
"--property:AssemblyVersion=${version}"
"--property:AssemblyConfiguration=master"
"--property:RuntimeIdentifier=${rid}"
];
# Skip manual, integration, automation and platform-dependent tests.
testFilters = [
"TestCategory!=ManualTest"
"TestCategory!=IntegrationTest"
"TestCategory!=AutomationTest"
# makes real HTTP requests
"FullyQualifiedName!~NzbDrone.Core.Test.UpdateTests.UpdatePackageProviderFixture"
]
++ lib.optionals stdenvNoCC.buildPlatform.isDarwin [
# fails on macOS
"FullyQualifiedName!~NzbDrone.Core.Test.Http.HttpProxySettingsProviderFixture"
];
disabledTests = [
# setgid tests
"NzbDrone.Mono.Test.DiskProviderTests.DiskProviderFixture.should_preserve_setgid_on_set_folder_permissions"
"NzbDrone.Mono.Test.DiskProviderTests.DiskProviderFixture.should_clear_setgid_on_set_folder_permissions"
# we do not set application data directory during tests (i.e. XDG data directory)
"NzbDrone.Mono.Test.DiskProviderTests.FreeSpaceFixture.should_return_free_disk_space"
"NzbDrone.Common.Test.ServiceFactoryFixture.event_handlers_should_be_unique"
# attempts to read /etc/*release and fails since it does not exist
"NzbDrone.Mono.Test.EnvironmentInfo.ReleaseFileVersionAdapterFixture.should_get_version_info"
# fails to start test dummy because it cannot locate .NET runtime for some reason
"NzbDrone.Common.Test.ProcessProviderFixture.should_be_able_to_start_process"
"NzbDrone.Common.Test.ProcessProviderFixture.exists_should_find_running_process"
"NzbDrone.Common.Test.ProcessProviderFixture.kill_all_should_kill_all_process_with_name"
]
++ lib.optionals stdenvNoCC.buildPlatform.isDarwin [
# flaky on darwin
"NzbDrone.Core.Test.NotificationTests.TraktServiceFixture.should_add_collection_movie_if_valid_mediainfo"
"NzbDrone.Core.Test.NotificationTests.TraktServiceFixture.should_format_audio_channels_to_one_decimal_when_adding_collection_movie"
];
passthru = {
tests = {
inherit (nixosTests) radarr;
};
updateScript = writers.writePython3 "radarr-updater" {
libraries = with python3Packages; [ requests ];
flakeIgnore = [ "E501" ];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [
nix
prefetch-yarn-deps
])
];
} ./update.py;
};
meta = {
description = "Usenet/BitTorrent movie downloader";
homepage = "https://radarr.video";
changelog = "https://github.com/Radarr/Radarr/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
edwtjo
purcell
nyanloutre
];
mainProgram = "Radarr";
# platforms inherited from dotnet-sdk.
};
}

View File

@@ -0,0 +1,182 @@
import json
import os
import pathlib
import requests
import shutil
import subprocess
import sys
import tempfile
def replace_in_file(file_path, replacements):
file_contents = pathlib.Path(file_path).read_text()
for old, new in replacements.items():
if old == new:
continue
updated_file_contents = file_contents.replace(old, new)
# A dumb way to check that weve actually replaced the string.
if file_contents == updated_file_contents:
print(f"no string to replace: {old}{new}", file=sys.stderr)
sys.exit(1)
file_contents = updated_file_contents
with tempfile.NamedTemporaryFile(mode="w") as t:
t.write(file_contents)
t.flush()
shutil.copyfile(t.name, file_path)
def nix_hash_to_sri(hash):
return subprocess.run(
[
"nix",
"--extra-experimental-features", "nix-command",
"hash",
"to-sri",
"--type", "sha256",
"--",
hash,
],
stdout=subprocess.PIPE,
text=True,
check=True,
).stdout.rstrip()
nixpkgs_path = "."
attr_path = os.getenv("UPDATE_NIX_ATTR_PATH", "radarr")
package_attrs = json.loads(subprocess.run(
[
"nix",
"--extra-experimental-features", "nix-command",
"eval",
"--json",
"--file", nixpkgs_path,
"--apply", """p: {
dir = dirOf p.meta.position;
version = p.version;
sourceHash = p.src.src.outputHash;
yarnHash = p.yarnOfflineCache.outputHash;
}""",
"--",
attr_path,
],
stdout=subprocess.PIPE,
text=True,
check=True,
).stdout)
old_version = package_attrs["version"]
new_version = old_version
# Note that we use Radarr API instead of GitHub to fetch latest stable release.
# This corresponds to the Updates tab in the web UI. See also
# https://github.com/Radarr/Radarr/blob/edec432244933a2143c5d13c71de7eb210434e7b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs
# https://github.com/Radarr/Radarr/blob/edec432244933a2143c5d13c71de7eb210434e7b/src/NzbDrone.Common/Cloud/RadarrCloudRequestBuilder.cs
version_update = requests.get(
f"https://radarr.servarr.com/v1/update/master?version={old_version}&includeMajorVersion=true",
).json()
if version_update["available"]:
new_version = version_update["updatePackage"]["version"]
if new_version == old_version:
sys.exit()
source_nix_hash, source_store_path = subprocess.run(
[
"nix-prefetch-url",
"--name", "source",
"--unpack",
"--print-path",
f"https://github.com/Radarr/Radarr/archive/v{new_version}.tar.gz",
],
stdout=subprocess.PIPE,
text=True,
check=True,
).stdout.rstrip().split("\n")
old_source_hash = package_attrs["sourceHash"]
new_source_hash = nix_hash_to_sri(source_nix_hash)
package_dir = package_attrs["dir"]
package_file_name = "package.nix"
deps_file_name = "deps.json"
# To update deps.nix, we copy the package to a temporary directory and run
# passthru.fetch-deps script there.
with tempfile.TemporaryDirectory() as work_dir:
package_file = os.path.join(work_dir, package_file_name)
deps_file = os.path.join(work_dir, deps_file_name)
shutil.copytree(package_dir, work_dir, dirs_exist_ok=True)
replace_in_file(package_file, {
# NB unlike hashes, versions are likely to be used in code or comments.
# Try to be more specific to avoid false positive matches.
f"version = \"{old_version}\"": f"version = \"{new_version}\"",
old_source_hash: new_source_hash,
})
# We need access to the patched and updated src to get the patched
# `yarn.lock`.
patched_src = os.path.join(work_dir, "patched-src")
subprocess.run(
[
"nix",
"--extra-experimental-features", "nix-command",
"build",
"--impure",
"--nix-path", "",
"--include", f"nixpkgs={nixpkgs_path}",
"--include", f"package={package_file}",
"--expr", "(import <nixpkgs> { }).callPackage <package> { }",
"--out-link", patched_src,
"src",
],
check=True,
)
old_yarn_hash = package_attrs["yarnHash"]
new_yarn_hash = nix_hash_to_sri(subprocess.run(
[
"prefetch-yarn-deps",
# does not support "--" separator :(
# Also --verbose writes to stdout, yikes.
os.path.join(patched_src, "yarn.lock"),
],
stdout=subprocess.PIPE,
text=True,
check=True,
).stdout.rstrip())
replace_in_file(package_file, {
old_yarn_hash: new_yarn_hash,
})
# Generate nuget-to-json dependency lock file.
fetch_deps = os.path.join(work_dir, "fetch-deps")
subprocess.run(
[
"nix",
"--extra-experimental-features", "nix-command",
"build",
"--impure",
"--nix-path", "",
"--include", f"nixpkgs={nixpkgs_path}",
"--include", f"package={package_file}",
"--expr", "(import <nixpkgs> { }).callPackage <package> { }",
"--out-link", fetch_deps,
"passthru.fetch-deps",
],
check=True,
)
subprocess.run(
[
fetch_deps,
deps_file,
],
stdout=subprocess.DEVNULL,
check=True,
)
shutil.copy(deps_file, os.path.join(package_dir, deps_file_name))
shutil.copy(package_file, os.path.join(package_dir, package_file_name))

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
autoreconfHook,
doxygen,
fetchFromGitHub,
gettext,
gnutls,
libabigail,
nettle,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "radcli";
version = "1.4.0";
src = fetchFromGitHub {
owner = "radcli";
repo = "radcli";
tag = version;
hash = "sha256-YnZkFYTiU2VNKxuP+JTnH64XYTB/+imeMKN1mZN9VCQ=";
};
postUnpack = ''
touch ${src.name}/config.rpath
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
doxygen
gettext
gnutls
libabigail
nettle
];
meta = {
description = "Simple RADIUS client library";
homepage = "https://github.com/radcli/radcli";
changelog = "https://github.com/radcli/radcli/blob/${version}/NEWS";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "radcli";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
pciutils,
pkg-config,
xorg,
}:
stdenv.mkDerivation rec {
pname = "radeontool";
version = "1.6.3";
src = fetchurl {
url = "https://people.freedesktop.org/~airlied/radeontool/${pname}-${version}.tar.gz";
sha256 = "0mjk9wr9rsb17yy92j6yi16hfpa6v5r1dbyiy60zp4r125wr63za";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [ xorg.libpciaccess ];
meta = with lib; {
description = "Lowlevel tools to tweak register and dump state on radeon GPUs";
homepage = "https://airlied.livejournal.com/";
license = licenses.zlib;
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
gettext,
makeWrapper,
ncurses,
libdrm,
libpciaccess,
libxcb,
}:
stdenv.mkDerivation rec {
pname = "radeontop";
version = "1.4";
src = fetchFromGitHub {
sha256 = "0kwqddidr45s1blp0h8r8h1dd1p50l516yb6mb4s6zsc827xzgg3";
rev = "v${version}";
repo = "radeontop";
owner = "clbr";
};
buildInputs = [
ncurses
libdrm
libpciaccess
libxcb
];
nativeBuildInputs = [
pkg-config
gettext
makeWrapper
];
enableParallelBuilding = true;
patchPhase = ''
substituteInPlace getver.sh --replace ver=unknown ver=${version}
substituteInPlace Makefile --replace pkg-config "$PKG_CONFIG"
'';
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/radeontop \
--prefix LD_LIBRARY_PATH : $out/lib
'';
meta = with lib; {
description = "Top-like tool for viewing AMD Radeon GPU utilization";
mainProgram = "radeontop";
longDescription = ''
View GPU utilization, both for the total activity percent and individual
blocks. Supports R600 and later cards: even Southern Islands should work.
Works with both the open drivers and AMD Catalyst. Total GPU utilization
is also valid for OpenCL loads; the other blocks are only useful for GL
loads.
'';
homepage = "https://github.com/clbr/radeontop";
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
python3Packages,
fetchFromGitHub,
git,
R,
rPackages,
}:
python3Packages.buildPythonApplication rec {
pname = "radian";
version = "0.6.13";
pyproject = true;
src = fetchFromGitHub {
owner = "randy3k";
repo = "radian";
tag = "v${version}";
hash = "sha256-gz2VczAgVbvISzvY/v0GvZ/Erv6ipZwPU61r6OJ+3Fo=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
build-system = with python3Packages; [
setuptools
setuptools-scm
];
nativeBuildInputs = [
R # needed at setup time to detect R_HOME
];
propagatedBuildInputs =
(with python3Packages; [
lineedit
prompt-toolkit
pygments
rchitect
])
++ (with rPackages; [
reticulate
askpass
]);
nativeCheckInputs =
(with python3Packages; [
pytestCheckHook
pyte
pexpect
ptyprocess
jedi
])
++ [ git ];
makeWrapperArgs = [ "--set R_HOME ${R}/lib/R" ];
preCheck = ''
export HOME=$TMPDIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib
'';
pythonImportsCheck = [ "radian" ];
meta = with lib; {
description = "21 century R console";
mainProgram = "radian";
homepage = "https://github.com/randy3k/radian";
changelog = "https://github.com/randy3k/radian/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ savyajha ];
};
}

View File

@@ -0,0 +1,47 @@
{
cmake,
fetchFromGitHub,
runCommand,
lib,
libGLU,
stdenv,
libX11,
tcsh,
tk,
}:
let
csh = runCommand "csh" { } ''
mkdir -p $out/bin
ln -s ${lib.getExe tcsh} $out/bin/csh
'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "radiance";
version = "5.4";
src = fetchFromGitHub {
owner = "LBNL-ETA";
repo = "radiance";
tag = "rad${lib.versions.major finalAttrs.version}R${lib.versions.minor finalAttrs.version}";
hash = "sha256-21lVWqO8uJefnm/dyfrjQJYbGck0fIRr2j0A+7WlZbM=";
};
nativeBuildInputs = [
cmake
csh # for some custom scripting in the repo
tk # for wish
];
buildInputs = [
libGLU
libX11
];
meta = {
description = "Validated Lighting Simulation Tool";
homepage = "https://github.com/LBNL-ETA/Radiance";
license = lib.licenses.bsd3Lbnl;
maintainers = with lib.maintainers; [ robwalt ];
mainProgram = "rad";
};
})

View File

@@ -0,0 +1,58 @@
{
fetchFromGitHub,
lib,
nixosTests,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "radicale";
version = "3.5.7";
pyproject = true;
src = fetchFromGitHub {
owner = "Kozea";
repo = "Radicale";
tag = "v${version}";
hash = "sha256-+vYLBd4psPxL2NkH8zriRpLUGK6cWrrkJyV230LePVE=";
};
build-system = with python3.pkgs; [
setuptools
];
dependencies =
with python3.pkgs;
[
defusedxml
passlib
vobject
pika
requests
pytz # https://github.com/Kozea/Radicale/issues/816
ldap3
]
++ passlib.optional-dependencies.bcrypt;
__darwinAllowLocalNetworking = true;
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
waitress
];
passthru.tests = {
inherit (nixosTests) radicale;
};
meta = {
homepage = "https://radicale.org/v3.html";
changelog = "https://github.com/Kozea/Radicale/blob/${src.tag}/CHANGELOG.md";
description = "CalDAV and CardDAV server";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
dotlambda
erictapen
];
};
}

View File

@@ -0,0 +1,135 @@
{
fetchFromGitHub,
cargo-tauri,
fetchFromRadicle,
git,
glib,
gtk3,
fetchNpmDeps,
npmHooks,
lib,
libsoup_3,
nodejs,
openssh,
openssl,
pkg-config,
playwright-driver,
radicle-node,
rustPlatform,
webkitgtk_4_1,
wrapGAppsHook4,
rustfmt,
clippy,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "radicle-desktop";
version = "0.8.0";
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z4D5UCArafTzTQpDZNQRuqswh3ury";
rev = "aeb405aaf53b56a426ab8d68c7f89b8953683224";
hash = "sha256-Z/6GdXf3ag/89H8UMD2GNU4CXA8TWyX8dl8uh0CTem8=";
leaveDotGit = true;
postFetch = ''
git -C $out rev-parse --short HEAD > $out/.git_head
rm -rf $out/.git
'';
};
postPatch = ''
patchShebangs scripts/copy-katex-assets scripts/check-js scripts/check-rs
mkdir -p public/twemoji
cp -t public/twemoji -r -- ${finalAttrs.twemojiAssets}/assets/svg/*
: >scripts/install-twemoji-assets
substituteInPlace scripts/check-rs \
--replace-fail "-Dwarnings" ""
'';
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-lcSNGmIv6u7DT47lOC69BRbVSK5IPiwjtdAS8aVxwqM=";
};
cargoHash = "sha256-z5fnwc7EjSvkyu4zTUyAvVfs6quwH2p9VFDK/TdzZJE=";
twemojiAssets = fetchFromGitHub {
owner = "twitter";
repo = "twemoji";
tag = "v14.0.2";
hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI=";
};
env = {
HW_RELEASE = "nixpkgs";
PLAYWRIGHT_BROWSERS_PATH = playwright-driver.browsers;
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = true;
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
};
nativeBuildInputs = [
cargo-tauri.hook
npmHooks.npmConfigHook
nodejs
pkg-config
wrapGAppsHook4
];
buildInputs = [
glib
gtk3
libsoup_3
openssl
webkitgtk_4_1
];
preBuild = ''
export GIT_HEAD=$(<$src/.git_head)
'';
nativeCheckInputs = [
git
openssh
radicle-node
rustfmt
clippy
];
checkPhase = ''
runHook preCheck
export RAD_HOME="$PWD/_rad-home"
export RAD_PASSPHRASE=""
rad auth --alias test
bins="tests/tmp/bin/heartwood/$HW_RELEASE"
mkdir -p "$bins"
cp -t "$bins" -- ${radicle-node}/bin/*
echo -n "$HW_RELEASE" >tests/support/heartwood-release
npm run build:http
npm run test:unit
scripts/check-js
scripts/check-rs
runHook postCheck
'';
passthru.env = finalAttrs.env;
meta = {
description = "Radicle desktop app";
homepage = "https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z4D5UCArafTzTQpDZNQRuqswh3ury";
changelog = "https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z4D5UCArafTzTQpDZNQRuqswh3ury/tree/CHANGELOG.md";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
matthiasbeyer
defelo
faukah
];
mainProgram = "radicle-desktop";
};
})

View File

@@ -0,0 +1,121 @@
{
radicle-httpd,
fetchFromGitHub,
lib,
buildNpmPackage,
writeText,
jq,
runCommand,
}:
let
# radicle-explorer bundles these freely available Emoji assets, but does not
# redistribute them.
twemojiAssets = fetchFromGitHub {
owner = "twitter";
repo = "twemoji";
rev = "v14.0.2";
hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI=";
meta.license = [ lib.licenses.cc-by-40 ];
};
mkPassthru = self: args: {
# radicle-explorer is configured through static build time configuration.
#
# Using this function you can override the this configuration, for example,
# to configure alternative preferred peers (which are shown in the UI by
# default).
#
# Example usage:
#
# ```nix
# radicle-explorer.withConfig {
# preferredSeeds = [{
# hostname = "seed.example.com";
# port = 443;
# scheme = "https";
# }];
# }
# ```
withConfig =
config:
let
overrides = writeText "config-overrides.json" (builtins.toJSON config);
newConfig = runCommand "config.json" { } ''
${jq}/bin/jq -s '.[0] * .[1]' ${(self args).src}/config/default.json ${overrides} > $out
'';
in
lib.fix (
final:
(self args).overrideAttrs (prev: {
preBuild = ''
${prev.preBuild or ""}
cp ${newConfig} config/local.json
'';
passthru = prev.passthru // mkPassthru final args;
})
);
};
in
lib.fix (
self:
lib.makeOverridable (
{
npmDepsHash ? "sha256-7/DH0p66FTfC0N42FhWTqehg5m/yq929ANhL4jAt7Ss=",
patches ? [ ],
}@args:
buildNpmPackage {
pname = "radicle-explorer";
version = radicle-httpd.version;
inherit patches npmDepsHash;
# radicle-explorer uses the radicle-httpd API, and they are developed in the
# same repo. For this reason we pin the sources to each other, but due to
# radicle-httpd using a more limited sparse checkout we need to carry a
# separate hash.
src = radicle-httpd.src.override {
hash = "sha256-1OhZ0x21NlZIiTPCRpvdUsx5UmeLecTjVzH8DWllPr8=";
sparseCheckout = [ ];
};
postPatch = ''
patchShebangs --build ./scripts
mkdir -p "public/twemoji"
cp -t public/twemoji -r -- ${twemojiAssets}/assets/svg/*
: >scripts/install-twemoji-assets
'';
dontConfigure = true;
doCheck = false;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r -t "$out" build/*
runHook postInstall
'';
passthru = mkPassthru self args;
meta = {
description = "Web frontend for Radicle";
longDescription = ''
Radicle Explorer is a web-frontend for Radicle which supports browsing
repositories, issues and patches on publicly available Radicle seeds.
This package builds the web interface, ready to be served by any web
server.
'';
homepage = "https://radicle.xyz";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [
tazjin
lorenzleutgeb
];
};
}
)
) { }

View File

@@ -0,0 +1,82 @@
{
asciidoctor,
fetchFromRadicle,
git,
installShellFiles,
lib,
makeWrapper,
man-db,
rustPlatform,
stdenv,
xdg-utils,
}:
rustPlatform.buildRustPackage rec {
pname = "radicle-httpd";
version = "0.20.0";
env.RADICLE_VERSION = version;
# You must update the radicle-explorer source hash when changing this.
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z4V1sjrXqjvFdnCUbxPFqd5p4DtH5";
node = "z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM";
tag = "v${version}";
sparseCheckout = [ "radicle-httpd" ];
hash = "sha256-9rJH4ECqOJ9wnYxCbEFHXo3PlhbPdeOnF+Pf1MzX25c=";
};
sourceRoot = "${src.name}/radicle-httpd";
cargoHash = "sha256-1GWWtrSYzTXUAgjeWaxyOuDqTDuTMWleug8SmxTHXbI=";
nativeBuildInputs = [
asciidoctor
installShellFiles
makeWrapper
];
nativeCheckInputs = [ git ];
doCheck = stdenv.hostPlatform.isLinux;
postInstall = ''
for page in $(find -name '*.adoc'); do
asciidoctor -d manpage -b manpage $page
installManPage ''${page::-5}
done
'';
postFixup = ''
for program in $out/bin/* ;
do
wrapProgram "$program" \
--prefix PATH : "${
lib.makeBinPath [
git
man-db
xdg-utils
]
}"
done
'';
meta = {
description = "Radicle JSON HTTP API Daemon";
longDescription = ''
A Radicle HTTP daemon exposing a JSON HTTP API that allows someone to browse local
repositories on a Radicle node via their web browser.
'';
homepage = "https://radicle.xyz";
# cargo.toml says MIT and asl20, LICENSE file says GPL3
license = with lib.licenses; [
gpl3Only
mit
asl20
];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
gador
lorenzleutgeb
];
mainProgram = "radicle-httpd";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
rustPlatform,
fetchFromRadicle,
fetchRadiclePatch,
radicle-node,
gitMinimal,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "radicle-job";
version = "0.3.0";
src = fetchFromRadicle {
seed = "iris.radicle.xyz";
repo = "z2UcCU1LgMshWvXj6hXSDDrwB8q8M";
tag = "releases/v${finalAttrs.version}";
hash = "sha256-6UrkKyIdSM5lSYNF/A3xIf3FGiM2pB/5s7F49jtn0KE=";
};
patches = [
# https://app.radicle.xyz/nodes/rosa.radicle.xyz/rad:z2UcCU1LgMshWvXj6hXSDDrwB8q8M/patches/dac4fef89d07fe609dd5d3d75ea57f76f1cca3dc
(fetchRadiclePatch {
inherit (finalAttrs.src) seed repo;
revision = "dac4fef89d07fe609dd5d3d75ea57f76f1cca3dc";
hash = "sha256-oFUkiBIqAa/DWqlTZw0LzHbgK/uhWik8qbRcGcGpkDY=";
})
];
cargoHash = "sha256-5GjLqs4ol7lUE96KwtE7W3lxL9H/A/0yDpiMDiLQDeY=";
nativeCheckInputs = [
radicle-node
gitMinimal
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = ./update.sh;
meta = {
description = "Create, update, and query Radicle Job Collaborative Objects";
homepage = "https://app.radicle.xyz/nodes/iris.radicle.xyz/rad:z2UcCU1LgMshWvXj6hXSDDrwB8q8M";
changelog = "https://app.radicle.xyz/nodes/iris.radicle.xyz/rad:z2UcCU1LgMshWvXj6hXSDDrwB8q8M/tree/CHANGELOG.md";
license = with lib.licenses; [
mit
asl20
];
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "rad-job";
};
})

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gnugrep common-updater-scripts nix-update
version=$(list-git-tags | grep -oP '^releases/v\K\d+\.\d+\.\d+$' | sort -rV | head -1)
nix-update --version="$version" radicle-job

View File

@@ -0,0 +1,176 @@
{
asciidoctor,
fetchFromRadicle,
gitMinimal,
installShellFiles,
jq,
lib,
makeBinaryWrapper,
man-db,
nixos,
nixosTests,
openssh,
radicle-node,
runCommand,
rustPlatform,
stdenv,
testers,
xdg-utils,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "radicle-node";
version = "1.5.0";
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z3gqcJUoA1n9HaHKufZs5FCSGazv5";
tag = "releases/${finalAttrs.version}";
hash = "sha256-/dWeG2jKCnfg7fwPP+BbRmEvM7rCppGYh2aeftcg3SY=";
leaveDotGit = true;
postFetch = ''
git -C $out rev-parse HEAD > $out/.git_head
git -C $out log -1 --pretty=%ct HEAD > $out/.git_time
rm -rf $out/.git
'';
};
cargoHash = "sha256-4URBtN5lyzFPaLJUf/HPAL2ugRUa6sZhpDeiFR0W7cc=";
env.RADICLE_VERSION = finalAttrs.version;
nativeBuildInputs = [
asciidoctor
installShellFiles
makeBinaryWrapper
];
nativeCheckInputs = [ gitMinimal ];
preBuild = ''
export GIT_HEAD=$(<$src/.git_head)
export SOURCE_DATE_EPOCH=$(<$src/.git_time)
'';
cargoBuildFlags = [
"--package=radicle-node"
"--package=radicle-cli"
"--package=radicle-remote-helper"
];
cargoTestFlags = finalAttrs.cargoBuildFlags;
# tests regularly time out on aarch64
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86;
preCheck = ''
export PATH=$PATH:$PWD/target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release
# Tests want to open many files.
ulimit -n 4096
'';
checkFlags = [
"--skip=service::message::tests::test_node_announcement_validate"
"--skip=tests::test_announcement_relay"
"--skip=tests::commands::rad_remote"
# https://radicle.zulipchat.com/#narrow/stream/369277-heartwood/topic/Flaky.20tests/near/438352360
"--skip=tests::e2e::test_connection_crossing"
# https://radicle.zulipchat.com/#narrow/stream/369277-heartwood/topic/Clone.20Partial.20Fail.20Flake
"--skip=rad_clone_partial_fail"
];
postInstall = ''
for page in $(find -name '*.adoc'); do
asciidoctor -d manpage -b manpage $page
installManPage ''${page::-5}
done
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
postFixup = ''
for program in $out/bin/* ;
do
wrapProgram "$program" \
--prefix PATH : "${
lib.makeBinPath [
gitMinimal
man-db
openssh
xdg-utils
]
}"
done
'';
passthru.updateScript = ./update.sh;
passthru.tests =
let
package = radicle-node;
in
{
basic =
runCommand "${package.name}-basic-test"
{
nativeBuildInputs = [
jq
openssh
radicle-node
];
}
''
set -e
export RAD_HOME="$PWD/.radicle"
mkdir -p "$RAD_HOME/keys"
ssh-keygen -t ed25519 -N "" -f "$RAD_HOME/keys/radicle" > /dev/null
jq -n '.node.alias |= "nix"' > "$RAD_HOME/config.json"
rad config > /dev/null
rad debug | jq -e '
(.sshVersion | contains("${openssh.version}"))
and
(.gitVersion | contains("${gitMinimal.version}"))
'
touch $out
'';
nixos-build = lib.recurseIntoAttrs {
checkConfig-success =
(nixos {
services.radicle.settings = {
node.alias = "foo";
};
}).config.services.radicle.configFile;
checkConfig-failure =
testers.testBuildFailure
(nixos {
services.radicle.settings = {
node.alias = null;
};
}).config.services.radicle.configFile;
};
nixos-run = nixosTests.radicle;
};
meta = {
description = "Radicle node and CLI for decentralized code collaboration";
longDescription = ''
Radicle is an open source, peer-to-peer code collaboration stack built on Git.
Unlike centralized code hosting platforms, there is no single entity controlling the network.
Repositories are replicated across peers in a decentralized manner, and users are in full control of their data and workflow.
'';
homepage = "https://radicle.xyz";
license = with lib.licenses; [
asl20
mit
];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
amesgen
lorenzleutgeb
defelo
];
mainProgram = "rad";
};
})

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gnugrep common-updater-scripts nix-update
version=$(list-git-tags | grep -oP '^releases/\K\d+\.\d+\.\d+$' | sort -rV | head -1)
nix-update --version="$version" radicle-node

View File

@@ -0,0 +1,111 @@
{
lib,
rustPlatform,
fetchFromRadicle,
stdenv,
libiconv,
zlib,
radicle-node,
makeBinaryWrapper,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "radicle-tui";
version = "0.6.0";
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z39mP9rQAaGmERfUMPULfPUi473tY";
node = "z6MkswQE8gwZw924amKatxnNCXA55BMupMmRg7LvJuim2C1V";
tag = finalAttrs.version;
hash = "sha256-rz9l9GtycqZoROUI6Hn0Fv5Br0YCIrcHlEWLMP4hasQ=";
leaveDotGit = true;
postFetch = ''
git -C $out rev-parse HEAD > $out/.git_head
git -C $out log -1 --pretty=%ct HEAD > $out/.git_time
rm -rf $out/.git
'';
};
cargoHash = "sha256-f9D4RKWw7y6z9rERuF7F6soyNITvKa6QVt34biZZ5JY=";
postPatch = ''
substituteInPlace build.rs \
--replace-fail "GIT_HEAD={hash}" "GIT_HEAD=$(<.git_head)" \
--replace-fail "GIT_COMMIT_TIME={commit_time}" "GIT_COMMIT_TIME=$(<.git_time)"
'';
nativeCheckInputs = [ radicle-node ];
checkFlags = [
"--skip=cli::can_be_executed"
"--skip=cli::empty_command_is_forwarded"
"--skip=cli::help_command_is_forwarded"
"--skip=cli::version_command_is_forwarded"
"--skip=commands::tui_inbox::cli::empty_operation"
"--skip=commands::tui_inbox::cli::empty_operation_is_not_forwarded"
"--skip=commands::tui_inbox::cli::empty_operation_is_not_forwarded_explicitly"
"--skip=commands::tui_inbox::cli::empty_operation_with_help_is_forwarded"
"--skip=commands::tui_inbox::cli::list_operation_is_not_forwarded"
"--skip=commands::tui_inbox::cli::list_operation_is_not_forwarded_explicitly"
"--skip=commands::tui_inbox::cli::list_operation_with_help_is_forwarded"
"--skip=commands::tui_inbox::cli::unknown_operation_show_is_forwarded"
"--skip=commands::tui_patch::cli::empty_operation"
"--skip=commands::tui_patch::cli::empty_operation_is_not_forwarded"
"--skip=commands::tui_patch::cli::empty_operation_is_not_forwarded_explicitly"
"--skip=commands::tui_patch::cli::empty_operation_with_help_is_forwarded"
"--skip=commands::tui_patch::cli::list_operation_is_not_forwarded"
"--skip=commands::tui_patch::cli::list_operation_is_not_forwarded_explicitly"
"--skip=commands::tui_patch::cli::list_operation_with_help_is_forwarded"
"--skip=commands::tui_patch::cli::unknown_operation_edit_is_forwarded"
"--skip=commands::tui_patch::cli::unknown_operation_is_not_forwarded"
"--skip=commands::tui_patch::cli::unknown_operation_show_is_forwarded"
"--skip=commands::tui_patch::review::test::app_with_single_file_multiple_hunks_can_be_constructed"
"--skip=commands::tui_patch::review::test::app_with_single_hunk_can_be_constructed"
"--skip=commands::tui_patch::review::test::first_hunk_is_selected_by_default"
"--skip=commands::tui_patch::review::test::hunk_can_be_selected"
"--skip=commands::tui_patch::review::test::hunks_are_rejected_by_default"
"--skip=commands::tui_patch::review::test::multiple_files_single_hunk_can_be_accepted"
"--skip=commands::tui_patch::review::test::single_file_multiple_hunks_only_last_can_be_accepted"
"--skip=commands::tui_patch::review::test::single_file_single_hunk_can_be_accepted"
];
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = lib.optionals stdenv.isDarwin [
libiconv
zlib
];
propagatedUserEnvPkgs = [ radicle-node ];
postInstall = ''
wrapProgram $out/bin/rad-tui \
--suffix PATH : ${lib.makeBinPath finalAttrs.propagatedUserEnvPkgs}
'';
# versionCheckHook doesn't support multiple arguments yet
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/rad-tui --version --no-forward | grep -F 'rad-tui ${finalAttrs.version}'
runHook postInstallCheck
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Radicle terminal user interface";
homepage = "https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z39mP9rQAaGmERfUMPULfPUi473tY";
changelog = "https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z39mP9rQAaGmERfUMPULfPUi473tY/tree/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [
matthiasbeyer
defelo
];
mainProgram = "rad-tui";
};
})

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gnused gitMinimal nix-update
set -euo pipefail
dirname="$(dirname "${BASH_SOURCE[0]}")"
url=$(nix-instantiate --eval --raw -A radicle-tui.src.url)
old_node=$(nix-instantiate --eval --raw -A radicle-tui.src.node)
ref=$(git ls-remote "$url" 'refs/namespaces/*/refs/tags/*' | cut -f2 | tail -1)
[[ "$ref" =~ ^refs/namespaces/([^/]+)/refs/tags/([^/]+)$ ]]
new_node="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
sed -i "s/${old_node}/${new_node}/g" "${dirname}/package.nix"
nix-update --version="$version" radicle-tui

View File

@@ -0,0 +1,68 @@
{
lib,
python3Packages,
fetchFromGitHub,
ffmpeg,
}:
let
## https://github.com/deep5050/radio-active/blob/main/requirements.txt
pyradios_1-0-2 = python3Packages.pyradios.overrideAttrs (
finalAttrs: previousAttrs:
let
version = "1.0.2";
in
{
inherit version;
src = previousAttrs.src.override {
inherit version;
hash = "sha256-O30ExmvWu4spwDytFVPWGjR8w3XSTaWd2Z0LGQibq9g=";
};
}
);
pname = "radio-active";
version = "2.9.1";
in
python3Packages.buildPythonApplication {
inherit pname version;
pyproject = true;
src = fetchFromGitHub {
owner = "S0AndS0";
repo = "radio-active";
rev = "2befa6a309d9c411ef1ea522e706ed3e098e5341";
hash = "sha256-wqETmdqvxsKnjkjQADq59J83QkOhLA74SPtuWTpsvO0=";
};
postPatch = ''
substituteInPlace radioactive/recorder.py \
--replace-fail '"ffmpeg",' '"${lib.getExe ffmpeg}",'
substituteInPlace radioactive/ffplay.py \
--replace-fail 'self.exe_path = which(self.program_name)' \
'self.exe_path = "${ffmpeg.outPath}/bin/ffplay"'
'';
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
requests
urllib3
psutil
pyradios_1-0-2
zenlog
requests-cache
rich
pick
];
meta = {
description = "Play any radios from around the globe right from the terminal";
homepage = "https://www.radio-browser.info/";
changelog = "https://github.com/deep5050/radio-active/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ S0AndS0 ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
rustPlatform,
fetchFromGitHub,
makeWrapper,
pkg-config,
openssl,
mpv,
}:
rustPlatform.buildRustPackage rec {
pname = "radio-cli";
version = "2.3.2";
src = fetchFromGitHub {
owner = "margual56";
repo = "radio-cli";
rev = "v${version}";
hash = "sha256-De/3tkvHf8dp04A0hug+aCbiXUc+XUYeHWYOiJ/bac0=";
};
cargoHash = "sha256-mxSlyQpMzLbiIbcVQUILHDyLsCf/9fanX9/yf0hyXHA=";
buildInputs = [ openssl ];
nativeBuildInputs = [
pkg-config
makeWrapper
];
postInstall = ''
wrapProgram "$out/bin/radio-cli" \
--suffix PATH : ${lib.makeBinPath [ mpv ]}
'';
meta = {
description = "Simple radio CLI written in rust";
homepage = "https://github.com/margual56/radio-cli";
changelog = "https://github.com/margual56/radio-cli/releases/tag/v${version}";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "radio-cli";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
mpv,
makeWrapper,
installShellFiles,
nix-update-script,
testers,
radioboat,
}:
buildGoModule rec {
pname = "radioboat";
version = "0.3.0";
src = fetchFromGitHub {
owner = "slashformotion";
repo = "radioboat";
rev = "v${version}";
hash = "sha256-4k+WK2Cxu1yBWgvEW9LMD2RGfiY7XDAe0qqph82zvlI=";
};
vendorHash = "sha256-H2vo5gngXUcrem25tqz/1MhOgpNZcN+IcaQHZrGyjW8=";
ldflags = [
"-s"
"-w"
"-X github.com/slashformotion/radioboat/internal/buildinfo.Version=${version}"
];
nativeBuildInputs = [
makeWrapper
installShellFiles
];
preFixup = ''
wrapProgram $out/bin/radioboat --prefix PATH ":" "${lib.makeBinPath [ mpv ]}";
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd radioboat \
--bash <($out/bin/radioboat completion bash) \
--fish <($out/bin/radioboat completion fish) \
--zsh <($out/bin/radioboat completion zsh)
'';
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = radioboat;
command = "radioboat version";
};
};
meta = with lib; {
description = "Terminal web radio client";
mainProgram = "radioboat";
homepage = "https://github.com/slashformotion/radioboat";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ zendo ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
openssl,
autoreconfHook,
nettle,
}:
stdenv.mkDerivation rec {
pname = "radsecproxy";
version = "1.11.2";
src = fetchFromGitHub {
owner = "radsecproxy";
repo = "radsecproxy";
tag = version;
hash = "sha256-E7nU6NgCmwRzX5j1Zyx/LTztjLqYJKv+3VU6UE0HhZA=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
openssl
nettle
];
configureFlags = [
"--with-openssl=${openssl.dev}"
"--sysconfdir=/etc"
"--localstatedir=/var"
];
meta = {
homepage = "https://radsecproxy.github.io/";
description = "Generic RADIUS proxy that supports both UDP and TLS (RadSec) RADIUS transports";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ sargon ];
platforms = with lib.platforms; linux;
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
libbsd,
libdaemon,
bison,
flex,
check,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "radvd";
version = "2.20";
src = fetchFromGitHub {
owner = "radvd-project";
repo = "radvd";
tag = "v${finalAttrs.version}";
hash = "sha256-s9KP6F6rSumuNDOV4rtE7I+o742al4hc3/dgNkpCCyQ=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
bison
flex
check
];
buildInputs = [
libdaemon
libbsd
];
# Needed for cross-compilation
makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
passthru.tests = {
inherit (nixosTests) connman ipv6 systemd-networkd-ipv6-prefix-delegation;
privacy_scripted = nixosTests.networking.scripted.privacy;
privacy_networkd = nixosTests.networking.networkd.privacy;
};
meta = with lib; {
homepage = "http://www.litech.org/radvd/";
changelog = "https://github.com/radvd-project/radvd/blob/${finalAttrs.src.rev}/CHANGES";
description = "IPv6 Router Advertisement Daemon";
downloadPage = "https://github.com/radvd-project/radvd";
platforms = platforms.linux;
license = licenses.bsdOriginal;
maintainers = with maintainers; [ fpletz ];
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
fetchFromGitHub,
rustPlatform,
makeBinaryWrapper,
fuzzel,
additionalPrograms ? [ ],
}:
rustPlatform.buildRustPackage rec {
pname = "raffi";
version = "0.8.2";
src = fetchFromGitHub {
owner = "chmouel";
repo = "raffi";
rev = "v${version}";
hash = "sha256-97gZZp2taX800Izhya4mYzS4PtCNCBbRnrn6cm1w8zY=";
};
cargoHash = "sha256-1n0JQdeExszuGFbpkBRT44eMov/x3BrIeofObdPNNdU=";
nativeBuildInputs = [
makeBinaryWrapper
];
postFixup = ''
wrapProgram $out/bin/raffi \
--prefix PATH : ${lib.makeBinPath ([ fuzzel ] ++ additionalPrograms)}
'';
meta = {
description = "Fuzzel launcher based on yaml configuration";
homepage = "https://github.com/chmouel/raffi";
changelog = "https://github.com/chmouel/raffi/releases/tag/v${version}";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ aos ];
mainProgram = "raffi";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,23 @@
diff --git a/test/unit/test_uv_fs.c b/test/unit/test_uv_fs.c
index 638c39c..c8758d2 100644
--- a/test/unit/test_uv_fs.c
+++ b/test/unit/test_uv_fs.c
@@ -40,18 +40,6 @@ TEST(UvFsCheckDir, exists, DirSetUp, DirTearDown, 0, NULL)
return MUNIT_OK;
}
-/* If the directory doesn't exist, it an error is returned. */
-TEST(UvFsCheckDir, doesNotExist, DirSetUp, DirTearDown, 0, NULL)
-{
- const char *parent = data;
- char errmsg[RAFT_ERRMSG_BUF_SIZE];
- char dir[128];
- sprintf(errmsg, "%s/sub", parent);
- sprintf(errmsg, "directory '%s' does not exist", dir);
- CHECK_DIR_ERROR(dir, RAFT_NOTFOUND, errmsg);
- return MUNIT_OK;
-}
-
/* If the process can't access the directory, an error is returned. */
TEST(UvFsCheckDir, permissionDenied, NULL, NULL, 0, NULL)
{

View File

@@ -0,0 +1,16 @@
diff --git a/Makefile.am b/Makefile.am
index 2137932..93abdb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -198,11 +198,7 @@ test_integration_uv_SOURCES = \
test/integration/test_uv_bootstrap.c \
test/integration/test_uv_load.c \
test/integration/test_uv_recover.c \
- test/integration/test_uv_recv.c \
- test/integration/test_uv_send.c \
test/integration/test_uv_set_term.c \
- test/integration/test_uv_tcp_connect.c \
- test/integration/test_uv_tcp_listen.c \
test/integration/test_uv_snapshot_put.c \
test/integration/test_uv_truncate.c \
test/integration/test_uv_work.c

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libuv,
lz4,
pkg-config,
incus,
gitUpdater,
}:
stdenv.mkDerivation rec {
pname = "raft-cowsql";
version = "0.22.1";
src = fetchFromGitHub {
owner = "cowsql";
repo = "raft";
tag = "v${version}";
hash = "sha256-aGw/ATu8Xdjfqa0qWg8Sld9PKCmQsMtZhuNBwagER7M=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
libuv
lz4
];
enableParallelBuilding = true;
patches = [
# network tests either hang indefinitely, or fail outright
./disable-net-tests.patch
# missing dir check is flaky
./disable-missing-dir-test.patch
];
preConfigure = ''
substituteInPlace configure --replace /usr/bin/ " "
'';
doCheck = true;
outputs = [
"dev"
"out"
];
passthru = {
inherit (incus) tests;
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = with lib; {
description = "Asynchronous C implementation of the Raft consensus protocol";
homepage = "https://github.com/cowsql/raft";
license = licenses.lgpl3Only;
platforms = platforms.linux;
teams = [ teams.lxc ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "rage";
version = "0.11.1";
src = fetchFromGitHub {
owner = "str4d";
repo = "rage";
rev = "v${version}";
hash = "sha256-aZs1iqfpsiMuhxXNqRatpKD99eDBCsWHk4OPpnnaB70=";
};
cargoHash = "sha256-GdvqkB/jHAGUbzhOLPkIX664JJH3WrZZtv+/E/PhTR8=";
nativeBuildInputs = [
installShellFiles
];
# cargo test has an x86-only dependency
doCheck = stdenv.hostPlatform.isx86;
postInstall = ''
installManPage target/*/release/manpages/man1/*
installShellCompletion \
--bash target/*/release/completions/*.bash \
--fish target/*/release/completions/*.fish \
--zsh target/*/release/completions/_*
'';
meta = {
description = "Simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability";
homepage = "https://github.com/str4d/rage";
changelog = "https://github.com/str4d/rage/blob/v${version}/rage/CHANGELOG.md";
license = with lib.licenses; [
asl20
mit
]; # either at your option
maintainers = with lib.maintainers; [ ryantm ];
mainProgram = "rage";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ragenix";
version = "2025.03.09";
src = fetchFromGitHub {
owner = "yaxitech";
repo = "ragenix";
tag = finalAttrs.version;
hash = "sha256-iQf1WdNxaApOFHIx4RLMRZ4f8g+8Xp0Z1/E/Mz2rLxY=";
};
cargoHash = "sha256-aM7kjyJJ8h4Yd1k2FTE8Vk/ezAXcCbfdAPxuNewptNQ=";
RAGENIX_NIX_BIN_PATH = lib.getExe nix;
checkNoDefaultFeatures = true;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
set -euo pipefail
# Provide a symlink from `agenix` to `ragenix` for compat
ln -sr "$out/bin/ragenix" "$out/bin/agenix"
# Stdout of build.rs
buildOut=$(grep -m 1 -Rl 'RAGENIX_COMPLETIONS_BASH=/' target/ | head -n 1)
printf "found build script output at %s\n" "$buildOut"
set +u # required due to `installShellCompletion`'s implementation
installShellCompletion --bash "$(grep -oP 'RAGENIX_COMPLETIONS_BASH=\K.+' "$buildOut")"
installShellCompletion --zsh "$(grep -oP 'RAGENIX_COMPLETIONS_ZSH=\K.+' "$buildOut")"
installShellCompletion --fish "$(grep -oP 'RAGENIX_COMPLETIONS_FISH=\K.+' "$buildOut")"
set -x
installManPage docs/ragenix.1
'';
meta = {
description = "Age-encrypted secrets for NixOS, drop-in replacement for agenix";
homepage = "https://github.com/yaxitech/ragenix";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
aciceri
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "ragenix";
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
writeText,
fontconfig,
libX11,
libXft,
libXcursor,
libXcomposite,
conf ? null,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ragnarwm";
version = "1.4";
src = fetchFromGitHub {
owner = "cococry";
repo = "Ragnar";
rev = finalAttrs.version;
hash = "sha256-OZhIwrKEhTfkw9K8nZIwGZzxXBObseWS92Y+85HmdNs=";
};
prePatch = ''
substituteInPlace Makefile \
--replace '/usr/bin' "$out/bin" \
--replace '/usr/share' "$out/share"
'';
postPatch =
let
configFile =
if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "cp ${configFile} config.h";
buildInputs = [
fontconfig
libX11
libXft
libXcursor
libXcomposite
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
enableParallelBuilding = true;
preInstall = ''
mkdir -p $out/bin
mkdir -p $out/share/applications
'';
postInstall = ''
install -Dm644 $out/share/applications/ragnar.desktop $out/share/xsessions/ragnar.desktop
'';
passthru = {
tests.ragnarwm = nixosTests.ragnarwm;
providedSessions = [ "ragnar" ];
};
meta = {
description = "Minimal, flexible & user-friendly X tiling window manager";
homepage = "https://ragnar-website.vercel.app";
changelog = "https://github.com/cococry/Ragnar/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ sigmanificient ];
mainProgram = "ragnar";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,74 @@
{
appstream,
blueprint-compiler,
desktop-file-utils,
fetchFromGitHub,
gtk4,
lib,
libadwaita,
meson,
mesonEmulatorHook,
ninja,
nix-update-script,
pkg-config,
stdenv,
wrapGAppsHook4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "raider";
version = "3.1.0";
src = fetchFromGitHub {
owner = "ADBeveridge";
repo = "raider";
tag = "v${finalAttrs.version}";
hash = "sha256-X8VIpxOhfvOIf5CYQOBVrC9T6Dhgz/oMIQCaoRch4Oo=";
};
nativeBuildInputs = [
appstream
blueprint-compiler
desktop-file-utils
meson
ninja
pkg-config
wrapGAppsHook4
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
buildInputs = [
gtk4
libadwaita
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Permanently delete your files (also named File Shredder)";
longDescription = ''
Raider is a shredding program built for the GNOME
desktop. It is meant to remove files from your
computer permanently. Within a certain limit, it is
effective. However, the way data is written physically
to SSDs at the hardware level ensures that shredding
is never perfect, and no software can fix that.
However, top-level agencies are usually the only ones
who can recover such data, due to the time, effort,
money and patience required to extract it effectively.
'';
homepage = "https://apps.gnome.org/Raider";
changelog = "https://github.com/ADBeveridge/raider/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
mainProgram = "raider";
maintainers = with lib.maintainers; [
benediktbroich
];
teams = [ lib.teams.gnome-circle ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "rails-new";
version = "0.5.0";
src = fetchFromGitHub {
owner = "rails";
repo = "rails-new";
tag = "v${version}";
hash = "sha256-7hEdLu9Koi2K2EFIl530yA+BGZmATFCcBMe3htYb0rs=";
};
cargoHash = "sha256-FrndtE9hjP1WswfOYJM4LW1UsE8S9QXthYO7P3nzs2I=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Generate new Rails applications without having to install Ruby";
homepage = "https://github.com/rails/rails-new";
license = lib.licenses.mit;
mainProgram = "rails-new";
maintainers = with lib.maintainers; [ coat ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
appimageTools,
fetchurl,
}:
appimageTools.wrapType2 rec {
pname = "railway-wallet";
version = "5.22.4";
src = fetchurl {
url = "https://github.com/Railway-Wallet/Railway-Wallet/releases/download/v${version}/Railway-v${version}-linux-x86_64.AppImage";
hash = "sha256-ikVDbUQOAx1626qtmzObu5Uzppz/PZPTPB4/LWoWZmI=";
};
meta = {
description = "Private DeFi wallet for Linux";
homepage = "https://www.railway.xyz";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ mitchmindtree ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "railway";
version = "4.10.0";
src = fetchFromGitHub {
owner = "railwayapp";
repo = "cli";
rev = "v${version}";
hash = "sha256-fvasxm9BjoHvSS5qqlYdCFN7j4E/MAsGhaKxt2y8Bhw=";
};
cargoHash = "sha256-yQtsL4FHEuA2Ji5HW4LYoYoY1CDQf8LO0E1en04JpOA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
OPENSSL_NO_VENDOR = 1;
meta = {
mainProgram = "railway";
description = "Railway.app CLI";
homepage = "https://github.com/railwayapp/cli";
changelog = "https://github.com/railwayapp/cli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
Crafter
techknowlogick
];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "rain";
version = "2.2.2";
src = fetchFromGitHub {
owner = "cenkalti";
repo = "rain";
tag = "v${version}";
hash = "sha256-FU0RjWT+ewM/13n/4zCdxLVrN8ikUJCtosXsx8L8vMk=";
};
vendorHash = "sha256-TFIrepXZPokVu9lW2V2s3seq58yQiHceu+zRHucB+0g=";
meta = {
description = "BitTorrent client and library in Go";
homepage = "https://github.com/cenkalti/rain";
license = lib.licenses.mit;
mainProgram = "rain";
maintainers = with lib.maintainers; [
justinrubek
matthewdargan
];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
rain,
}:
buildGoModule rec {
pname = "rain";
version = "1.23.1";
src = fetchFromGitHub {
owner = "aws-cloudformation";
repo = "rain";
rev = "v${version}";
sha256 = "sha256-B6eaoyYROF8LB5vO1qMqXYtBF8vvJE8xygarW2+GSpA=";
};
vendorHash = "sha256-ASiC/SXwaJ1xHlhPcVS9JsGcfRP6/fonq+ZIBehZgho=";
subPackages = [ "cmd/rain" ];
ldflags = [
"-s"
"-w"
];
passthru.tests.version = testers.testVersion {
package = rain;
command = "rain --version";
version = "v${version}";
};
meta = with lib; {
description = "Development workflow tool for working with AWS CloudFormation";
mainProgram = "rain";
homepage = "https://github.com/aws-cloudformation/rain";
license = licenses.asl20;
maintainers = with maintainers; [ jiegec ];
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchurl,
alglib,
unzip,
autoPatchelfHook,
}:
stdenv.mkDerivation rec {
pname = "rainbowcrack";
version = "1.8";
src = fetchurl {
url = "http://project-rainbowcrack.com/rainbowcrack-${version}-linux64.zip";
hash = "sha256-xMC9teHiDvBY/VHV63TsNQjdcuLqHGeXUyjHvRTO9HQ=";
};
nativeBuildInputs = [
unzip
autoPatchelfHook
];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
mkdir -p $out/{bin,share/rainbowcrack}
unzip $src -d $out || true
'';
installPhase = ''
install -Dm644 $out/rainbowcrack-1.8-linux64/*.txt $out/share/rainbowcrack
install -Dm755 $out/rainbowcrack-1.8-linux64/rt* $out/rainbowcrack-1.8-linux64/rcrack $out/bin
chmod +x $out/bin/*
rm -rf $out/rainbowcrack-1.8-linux64
'';
runtimeDependencies = [ alglib ];
meta = {
description = "Rainbow table generator used for password cracking";
homepage = "http://project-rainbowcrack.com";
maintainers = with lib.maintainers; [ tochiaha ];
license = lib.licenses.unfree;
mainProgram = "rcrack";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux64" ];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
testers,
nix-update-script,
rustPlatform,
rainfrog,
}:
let
version = "0.3.7";
in
rustPlatform.buildRustPackage {
inherit version;
pname = "rainfrog";
src = fetchFromGitHub {
owner = "achristmascarl";
repo = "rainfrog";
tag = "v${version}";
hash = "sha256-6E59Sqe3igXcbd/E11+gOuaJufVV7Ayb0rIX3MCVvPY=";
};
cargoHash = "sha256-UTzXm/fToi1HPfX9H+G6o39kc+n9pCbqzfQjvV7IMv4=";
passthru = {
tests.version = testers.testVersion {
package = rainfrog;
command = ''
RAINFROG_DATA="$(mktemp -d)" rainfrog --version
'';
};
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/achristmascarl/rainfrog/releases/tag/v${version}";
description = "Database management TUI for postgres";
homepage = "https://github.com/achristmascarl/rainfrog";
license = lib.licenses.mit;
mainProgram = "rainfrog";
maintainers = with lib.maintainers; [ patka ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication rec {
pname = "raiseorlaunch";
version = "2.3.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-L/hu0mYCAxHkp5me96a6HlEY6QsuJDESpTNhlzVRHWs=";
};
build-system = with python3Packages; [ setuptools ];
pythonPath = with python3Packages; [ i3ipc ];
# no tests
doCheck = false;
pythonImportsCheck = [ "raiseorlaunch" ];
meta = with lib; {
maintainers = with maintainers; [ winpat ];
description = "Run-or-raise-application-launcher for i3 window manager";
mainProgram = "raiseorlaunch";
homepage = "https://github.com/open-dynaMIX/raiseorlaunch";
license = licenses.mit;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'rake'

View File

@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
rake (13.2.1)
PLATFORMS
ruby
DEPENDENCIES
rake
BUNDLED WITH
2.5.6

View File

@@ -0,0 +1,12 @@
{
rake = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "17850wcwkgi30p7yqh60960ypn7yibacjjha0av78zaxwvd3ijs6";
type = "gem";
};
version = "13.2.1";
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
bundlerApp,
bundlerUpdateScript,
}:
bundlerApp {
pname = "rake";
gemdir = ./.;
exes = [ "rake" ];
passthru.updateScript = bundlerUpdateScript "rake";
meta = with lib; {
description = "Software task management and build automation tool";
homepage = "https://github.com/ruby/rake";
license = with licenses; mit;
maintainers = with maintainers; [
manveru
nicknovitski
];
platforms = platforms.unix;
mainProgram = "rake";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "rakkess";
version = "0.5.1";
src = fetchFromGitHub {
owner = "corneliusweig";
repo = "rakkess";
rev = "v${version}";
sha256 = "sha256-igovWWk8GfNmOS/NbZWfv9kox6QLNIbM09jdvA/lL3A=";
};
vendorHash = "sha256-lVxJ4wFBhHc8JVpkmqphLYPE9Z8Cr6o+aAHvC1naqyE=";
ldflags = [
"-s"
"-w"
"-X github.com/corneliusweig/rakkess/internal/version.version=v${version}"
];
meta = {
homepage = "https://github.com/corneliusweig/rakkess";
changelog = "https://github.com/corneliusweig/rakkess/releases/tag/v${version}";
description = "Review Access - kubectl plugin to show an access matrix for k8s server resources";
mainProgram = "rakkess";
longDescription = ''
Have you ever wondered what access rights you have on a provided
kubernetes cluster? For single resources you can use
`kubectl auth can-i list deployments`, but maybe you are looking for a
complete overview? This is what rakkess is for. It lists access rights for
the current user and all server resources, similar to
`kubectl auth can-i --list`.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jk ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
fetchzip,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "raleway";
version = "4.101";
src = fetchzip {
url = "https://github.com/theleagueof/raleway/releases/download/${finalAttrs.version}/Raleway-${finalAttrs.version}.tar.xz";
hash = "sha256-itNHIMoRjiaqYAJoDNetkCquv47VAfel8MAzwsd//Ww=";
};
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/truetype $src/static/TTF/*.ttf
install -D -m444 -t $out/share/fonts/opentype $src/static/OTF/*.otf
runHook postInstall
'';
meta = {
description = "Raleway is an elegant sans-serif typeface family";
longDescription = ''
Initially designed by Matt McInerney as a single thin weight, it was
expanded into a 9 weight family by Pablo Impallari and Rodrigo Fuenzalida
in 2012 and iKerned by Igino Marini. In 2013 the Italics where added, and
most recently a variable version.
It features both old style and lining numerals, standard and
discretionary ligatures, a pretty complete set of diacritics, as well as
a stylistic alternate inspired by more geometric sans-serif typefaces
than its neo-grotesque inspired default character set.
It also has a sister display family, Raleway Dots.
'';
homepage = "https://www.theleagueofmoveabletype.com/raleway";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ minijackson ];
};
})

View File

@@ -0,0 +1,99 @@
{
lib,
python3,
fetchFromGitHub,
go-md2man,
# TODO: switch to llama-cpp-vulkan when moltenvk is upgraded to 1.3.0:
# https://github.com/NixOS/nixpkgs/pull/434130
llama-cpp,
podman,
withPodman ? true,
# passthru
ramalama,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ramalama";
version = "0.12.3";
pyproject = true;
src = fetchFromGitHub {
owner = "containers";
repo = "ramalama";
tag = "v${version}";
hash = "sha256-PnuAPQ9RF7IRnmHtUrwDRXIKEzZBDEU2mWfG5FyfY0c=";
};
build-system = with python3.pkgs; [
setuptools
wheel
];
dependencies = with python3.pkgs; [
argcomplete
pyyaml
];
nativeBuildInputs = [
go-md2man
];
preBuild = ''
make docs
'';
postInstall = lib.optionalString withPodman ''
wrapProgram $out/bin/ramalama \
--prefix PATH : ${
lib.makeBinPath (
[
llama-cpp
podman
]
++ (
with python3.pkgs;
[
huggingface-hub
]
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform mlx-lm) mlx-lm
)
)
}
'';
pythonImportsCheck = [
"ramalama"
];
nativeCheckInputs = [
python3.pkgs.pytestCheckHook
];
# Enable when https://github.com/containers/ramalama/pull/1891 is released
disabledTests = [
"test_ollama_model_pull"
];
passthru = {
tests = {
withoutPodman = ramalama.override {
withPodman = false;
};
};
};
meta = {
description = "Serving AI models locally using familiar container workflows";
longDescription = ''
Ramalama is an open-source developer tool that simplifies the local
serving of AI models from any source and facilitates their use for
inference in production, all through the familiar language of containers
'';
homepage = "https://ramalama.ai/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ booxter ];
mainProgram = "ramalama";
};
}

View File

@@ -0,0 +1,50 @@
{
appimageTools,
lib,
fetchurl,
makeDesktopItem,
}:
let
pname = "rambox";
version = "2.5.1";
src = fetchurl {
url = "https://github.com/ramboxapp/download/releases/download/v${version}/Rambox-${version}-linux-x64.AppImage";
hash = "sha256-jtROOwqht/3j5h9SZx0UmGj5iKrQeSsXe7XvQnPhxuM=";
};
desktopItem = (
makeDesktopItem {
desktopName = "Rambox";
name = pname;
exec = "rambox";
icon = pname;
categories = [ "Network" ];
}
);
appimageContents = appimageTools.extract {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps
install -Dm644 ${appimageContents}/usr/share/icons/hicolor/256x256/apps/rambox*.png $out/share/icons/hicolor/256x256/apps/${pname}.png
install -Dm644 ${desktopItem}/share/applications/* $out/share/applications
'';
extraPkgs = pkgs: [ pkgs.procps ];
meta = with lib; {
description = "Workspace Simplifier - a cross-platform application organizing web services into Workspaces similar to browser profiles";
homepage = "https://rambox.app";
license = licenses.unfree;
maintainers = with maintainers; [ nazarewk ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchgit,
}:
stdenv.mkDerivation rec {
name = "ramfetch";
version = "1.1.0a";
src = fetchgit {
url = "https://codeberg.org/jahway603/ramfetch.git";
rev = version;
hash = "sha256-sUreZ6zm+a1N77OZszjnpS4mmo5wL1dhNGVldJCGoag=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
install -D ramfetch $out/bin/ramfetch
runHook postInstall
'';
meta = {
description = "Tool which displays memory information";
homepage = "https://codeberg.org/jahway603/ramfetch";
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.markbeep ];
mainProgram = "ramfetch";
};
}

View File

@@ -0,0 +1,50 @@
{
buildGoModule,
fetchFromGitHub,
lib,
runCommand,
ran,
curl,
}:
buildGoModule rec {
pname = "ran";
version = "0.1.6";
src = fetchFromGitHub {
owner = "m3ng9i";
repo = "ran";
rev = "v${version}";
hash = "sha256-iMvUvzr/jaTNdgHQFuoJNJnnkx2XHIUUlrPWyTlreEw=";
};
vendorHash = "sha256-ObroruWWNilHIclqNvbEaa7vwk+1zMzDKbjlVs7Fito=";
env.CGO_ENABLED = 0;
ldflags = [
"-X"
"main._version_=v${version}"
"-X"
"main._branch_=master"
];
passthru.tests = {
simple = runCommand "ran-test" { } ''
echo hello world > index.html
${ran}/bin/ran &
# Allow ran to fully initialize
sleep 1
[ "$(${curl}/bin/curl 127.0.0.1:8080)" == "hello world" ]
kill %1
${ran}/bin/ran --version > $out
'';
};
meta = with lib; {
homepage = "https://github.com/m3ng9i/ran";
description = "Simple web server for serving static files";
mainProgram = "ran";
license = licenses.mit;
maintainers = with maintainers; [ tomberek ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "rana";
version = "0.5.5";
src = fetchFromGitHub {
owner = "grunch";
repo = "rana";
tag = "v${version}";
hash = "sha256-gzyjOCGh45zEJvc0xFkp8gAH9Kxwfc2oPeMzbrTjnk8=";
};
cargoHash = "sha256-YOit8z1GAUmPz56M5jXA2EdyN5Pbo7517W3PNXgQnDs=";
meta = {
description = "Nostr public key mining tool";
homepage = "https://github.com/grunch/rana";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jigglycrumb ];
mainProgram = "rana";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "rancher";
version = "2.12.2";
src = fetchFromGitHub {
owner = "rancher";
repo = "cli";
tag = "v${version}";
hash = "sha256-KVJfeCv+rMPGvKknov1LQX/ndI182p8p+ze2522xb7U=";
};
env.CGO_ENABLED = 0;
ldflags = [
"-w"
"-s"
"-X main.VERSION=${version}"
"-extldflags"
"-static"
];
vendorHash = "sha256-guxr/co4IJoX+mSBPFqdjo8C/QnRIXcd/RztNdnfVQM=";
postInstall = ''
mv $out/bin/cli $out/bin/rancher
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/rancher | grep ${version} > /dev/null
'';
meta = with lib; {
description = "CLI tool for interacting with your Rancher Server";
mainProgram = "rancher";
homepage = "https://github.com/rancher/cli";
license = licenses.asl20;
maintainers = with maintainers; [ bryanasdev000 ];
};
}

View File

@@ -0,0 +1,146 @@
{
stdenv,
lib,
fetchFromGitHub,
writeShellScriptBin,
autoreconfHook,
libtool,
makeBinaryWrapper,
coreutils,
expect,
git,
gnugrep,
inetutils, # for telnet
gnused,
openssh,
perl,
runtimeShell,
}:
# we cannot use resholve.mkDerivation yet - the scripts are too hairy, although it might be possible
# to do them bit by bit
let
inherit (lib)
concatStringsSep
getExe
makeBinPath
mapAttrsToList
replaceStrings
;
# The installer executes ping to figure out how to call it and then sets the full path to the
# binary. This script "handles" it by pretending everything is OK and has very much not been
# tested on !NixOS.
wrappedPing = writeShellScriptBin "ping" ''
for b in /run/wrappers/bin/ping /usr/bin/ping /usr/local/bin/ping; do
if [ -x "$b" ]; then
exec "$b" "$@"
fi
done
# we are inside the installer. Pretend everything is OK so the installer will set the path to
# this wrapper as the ping program
exit 0
'';
# executables that need additional directories on their PATHs
needsBin = {
hlogin = [ (placeholder "out") ];
ulogin = [ (placeholder "out") ];
rancid-cvs = [ git ];
};
telnet' = inetutils;
in
stdenv.mkDerivation (finalAttrs: {
pname = "rancid";
version = "3.13";
src = fetchFromGitHub {
owner = "haussli";
repo = "rancid";
rev = "v" + replaceStrings [ "." ] [ "_" ] finalAttrs.version;
hash = "sha256-TAeOSwdDhP06OSV0en/hMVF3qWVwJUsiqt97rdgtAzE=";
};
postPatch = ''
patchShebangs .
substituteInPlace configure.ac \
--replace 'm4_esyscmd(configure.vers package_name),' ${finalAttrs.pname}, \
--replace 'm4_esyscmd(configure.vers package_version),' ${finalAttrs.version},
substituteInPlace etc/rancid.conf.sample.in \
--replace @ENV_PATH@ ${
makeBinPath [
"/run/wrappers"
(placeholder "out")
coreutils
git
gnugrep
gnused
openssh
perl
runtimeShell
telnet'
]
}
for f in bin/*.in; do \
if grep -q /usr/bin/tail $f ; then
substituteInPlace $f --replace /usr/bin/tail ${coreutils}/bin/tail
fi
done
substituteInPlace bin/par.c \
--replace '"sh"' '"${runtimeShell}"'
substituteInPlace bin/rancid-run.in \
--replace '>$LOGDIR/$GROUP.`date +%Y%m%d.%H%M%S` 2>&1' ' ' \
--replace 'perl ' '${getExe perl} ' \
--replace 'sh ' '${runtimeShell} ' \
--replace '"control_rancid ' '"${placeholder "out"}/bin/control_rancid ' \
substituteInPlace bin/control_rancid.in \
--replace "'rancid-fe " "'${placeholder "out"}/bin/rancid-fe "
'';
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
libtool
makeBinaryWrapper
wrappedPing
];
buildInputs = [
expect
openssh
perl
telnet'
];
postInstall = concatStringsSep "\n" (
mapAttrsToList (n: v: ''
mkdir -p $out/libexec
mv $out/bin/${n} $out/libexec/
makeWrapper $out/libexec/${n} $out/bin/${n} \
--prefix PATH : ${makeBinPath v}
'') needsBin
);
meta = with lib; {
description = "Really Awesome New Cisco confIg Differ";
longDescription = ''
RANCID monitors a device's configuration, including software and hardware
and uses a VCS to maintain history of changes.
'';
homepage = "https://shrubbery.net/rancid/";
license = licenses.bsd3;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "randomX";
version = "1.2.1";
nativeBuildInputs = [ cmake ];
src = fetchFromGitHub {
owner = "tevador";
repo = "randomX";
rev = "v${version}";
sha256 = "sha256-dfImzwbEfJQcaPZCoWypHiI6dishVRdqS/r+n3tfjvM=";
};
meta = with lib; {
description = "Proof of work algorithm based on random code execution";
homepage = "https://github.com/tevador/RandomX";
license = licenses.bsd3;
maintainers = with maintainers; [ rnhmjoj ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation rec {
version = "4.3.4";
pname = "randoop";
src = fetchurl {
url = "https://github.com/randoop/randoop/releases/download/v${version}/${pname}-${version}.zip";
sha256 = "sha256-yzQw9l3uAq51SHXJ4rsZNRCiFdhOEoSrwv9iPvD2i9c=";
};
nativeBuildInputs = [ unzip ];
installPhase = ''
mkdir -p $out/lib $out/doc
cp -R *.jar $out/lib
cp README.txt $out/doc
'';
meta = with lib; {
description = "Automatic test generation for Java";
homepage = "https://randoop.github.io/randoop/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.mit;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchzip,
zlib,
}:
stdenv.mkDerivation rec {
pname = "randtype";
version = "1.13";
src = fetchzip {
url = "mirror://sourceforge/randtype/${pname}-${version}.tar.gz";
sha256 = "055xs02qwpgbkn2l57bwghbsrsysg1zhm2asp0byvjpz4sc4w1rd";
};
buildInputs = [ zlib ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/man/man1 $out/bin
install -cp randtype.1.gz $out/share/man/man1
install -cps randtype $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Semi-random text typer";
mainProgram = "randtype";
homepage = "https://benkibbey.wordpress.com/randtype/";
maintainers = with maintainers; [ dandellion ];
license = licenses.gpl2Only;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/randtype.x86_64-darwin
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "rang";
version = "3.2";
src = fetchFromGitHub {
owner = "agauniyal";
repo = "rang";
tag = "v${version}";
hash = "sha256-NK7jB5ijcu9OObmfLgiWxlJi4cVAhr7p6m9HKf+5TnQ=";
};
nativeBuildInputs = [ cmake ];
meta = {
description = "Minimal, Header only Modern c++ library for terminal goodies";
homepage = "https://agauniyal.github.io/rang/";
license = lib.licenses.unlicense;
maintainers = [ lib.maintainers.HaoZeke ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "range-v3";
version = "0.12.0";
src = fetchFromGitHub {
owner = "ericniebler";
repo = "range-v3";
rev = version;
hash = "sha256-bRSX91+ROqG1C3nB9HSQaKgLzOHEFy9mrD2WW3PRBWU=";
};
nativeBuildInputs = [ cmake ];
# Building the tests currently fails on AArch64 due to internal compiler
# errors (with GCC 9.2):
cmakeFlags = [
"-DRANGES_ENABLE_WERROR=OFF"
]
++ lib.optional stdenv.hostPlatform.isAarch64 "-DRANGE_V3_TESTS=OFF";
doCheck = !stdenv.hostPlatform.isAarch64;
checkTarget = "test";
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-std=c++17";
};
meta = {
description = "Experimental range library for C++11/14/17";
homepage = "https://github.com/ericniebler/range-v3";
changelog = "https://github.com/ericniebler/range-v3/releases/tag/${version}";
license = lib.licenses.boost;
platforms = lib.platforms.all;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,83 @@
{
lib,
fetchFromGitHub,
python3Packages,
file,
less,
highlight,
w3m,
imagemagick,
imagePreviewSupport ? true,
sixelPreviewSupport ? true,
neoVimSupport ? true,
improvedEncodingDetection ? true,
rightToLeftTextSupport ? false,
unstableGitUpdater,
}:
python3Packages.buildPythonApplication {
pname = "ranger";
version = "1.9.3-unstable-2025-09-10";
format = "setuptools";
src = fetchFromGitHub {
owner = "ranger";
repo = "ranger";
rev = "3f7a3546e59d52e5de5bbb13b9d9968bfaf6b659";
hash = "sha256-a+bfOE0/TfYvyxKjPXo5Q2WKSmfPaM+YJdggjcWFv5I=";
};
LC_ALL = "en_US.UTF-8";
nativeCheckInputs = with python3Packages; [
pytestCheckHook
astroid
pylint
];
propagatedBuildInputs = [
less
file
]
++ lib.optionals imagePreviewSupport [ python3Packages.pillow ]
++ lib.optionals sixelPreviewSupport [ imagemagick ]
++ lib.optionals neoVimSupport [ python3Packages.pynvim ]
++ lib.optionals improvedEncodingDetection [ python3Packages.chardet ]
++ lib.optionals rightToLeftTextSupport [ python3Packages.python-bidi ];
preConfigure = ''
${lib.optionalString (highlight != null) ''
sed -i -e 's|^\s*highlight\b|${highlight}/bin/highlight|' \
ranger/data/scope.sh
''}
substituteInPlace ranger/__init__.py \
--replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin less}/bin/less'"
# give file previews out of the box
substituteInPlace ranger/config/rc.conf \
--replace /usr/share $out/share \
--replace "#set preview_script ~/.config/ranger/scope.sh" "set preview_script $out/share/doc/ranger/config/scope.sh"
''
+ lib.optionalString imagePreviewSupport ''
substituteInPlace ranger/ext/img_display.py \
--replace /usr/lib/w3m ${w3m}/libexec/w3m
# give image previews out of the box when building with w3m
substituteInPlace ranger/config/rc.conf \
--replace "set preview_images false" "set preview_images true"
'';
passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
meta = {
description = "File manager with minimalistic curses interface";
homepage = "https://ranger.github.io/";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
toonn
lucasew
];
mainProgram = "ranger";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "rankwidth";
version = "0.9";
src = fetchurl {
url = "mirror://sageupstream/rw/rw-${version}.tar.gz";
sha256 = "sha256-weA1Bv4lzfy0KMBR/Fay0q/7Wwb7o/LOdWYxRmvvtEE=";
};
configureFlags = [
"--enable-executable=no" # no igraph dependency
];
# check phase is empty for now (as of version 0.9)
doCheck = true;
meta = with lib; {
description = "Calculates rank-width and rank-decompositions";
license = with licenses; [ gpl2Plus ];
teams = [ teams.sage ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,141 @@
{
lib,
fetchFromGitHub,
python3Packages,
libsForQt5,
file,
intltool,
gobject-introspection,
libgudev,
udisks,
gexiv2,
gst_all_1,
libnotify,
ifuse,
libimobiledevice,
exiftool,
gdk-pixbuf,
libmediainfo,
vmtouch,
gitUpdater,
}:
python3Packages.buildPythonApplication rec {
pname = "rapid-photo-downloader";
version = "0.9.36";
pyproject = true;
src = fetchFromGitHub {
owner = "damonlynch";
repo = "rapid-photo-downloader";
rev = "v${version}";
hash = "sha256-fFmIbqymYkg2Z1/x0mNsCNlDCOyqVg65CM4a67t+kPQ=";
};
build-system = with python3Packages; [
setuptools
];
dependencies =
with python3Packages;
[
ifuse
libimobiledevice
# Python dependencies
pyqt5
pygobject3
gphoto2
pyzmq
tornado
psutil
pyxdg
arrow
python-dateutil
easygui
babel
colour
pillow
pymediainfo
sortedcontainers
requests
colorlog
pyprind
setuptools
show-in-file-manager
tenacity
]
++ lib.optional (pythonOlder "3.8") importlib-metadata;
postPatch = ''
# Drop broken version specifier
sed -i '/python_requires/d' setup.py
# Disable version check
substituteInPlace raphodo/constants.py \
--replace "disable_version_check = False" "disable_version_check = True"
'';
nativeBuildInputs = [
libsForQt5.wrapQtAppsHook
file
intltool
gobject-introspection
];
# Package has no generally usable unit tests.
# The included doctests expect specific, hardcoded hardware to be present.
# Instead, we just make sure the program runs enough to report its version.
checkPhase = ''
export XDG_DATA_HOME=$(mktemp -d)
export QT_QPA_PLATFORM=offscreen
$out/bin/rapid-photo-downloader --detailed-version
'';
buildInputs = [
gdk-pixbuf
gexiv2
gst_all_1.gst-libav
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gstreamer
gst_all_1.gstreamer.dev
libgudev
libnotify
udisks
];
# NOTE: Check if strictDeps can be renabled
# at the time of writing this the dependency easygui fails to build
# launching fails with:
# "Namespace [Notify / GExiv2 / GUdev] not available"
strictDeps = false;
preFixup = ''
makeWrapperArgs+=(
--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
--set PYTHONPATH "$PYTHONPATH"
--prefix PATH : "${
lib.makeBinPath [
exiftool
vmtouch
]
}"
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libmediainfo ]}"
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
"''${qtWrapperArgs[@]}"
)
'';
passthru.updateScript = gitUpdater {
rev-prefix = "v";
ignoredVersions = "a.*";
};
meta = {
description = "Photo and video importer for cameras, phones, and memory cards";
mainProgram = "rapid-photo-downloader";
homepage = "https://www.damonlynch.net/rapid/";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ philipdb ];
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
writeShellApplication,
curl,
cacert,
gnugrep,
common-updater-scripts,
versionCheckHook,
writeShellScript,
xcbuild,
coreutils,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "rapidapi";
version = "4.2.8-4002008002";
src = fetchurl {
url = "https://cdn-builds.paw.cloud/paw/RapidAPI-${finalAttrs.version}.zip";
hash = "sha256-ApBOYMOjpQJvUe+JsEAnyK7xpIZNt6qkX/2KUIT6S8g=";
};
dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
dontUnpack = true;
nativeBuildInputs = [ unzip ];
sourceRoot = "RapidAPI.app";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
unzip -d $out/Applications $src
runHook postInstall
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "rapidapi-update-script";
runtimeInputs = [
curl
cacert
gnugrep
common-updater-scripts
];
text = ''
url="https://paw.cloud/download"
version=$(curl -Ls -o /dev/null -w "%{url_effective}" "$url" | grep -oP '\d+\.\d+\.\d+-\d+')
update-source-version rapidapi "$version"
'';
});
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = writeShellScript "version-check" ''
marketing_version=$(${xcbuild}/bin/PlistBuddy -c "Print :CFBundleShortVersionString" "$1" | ${coreutils}/bin/tr -d '"')
build_version=$(${xcbuild}/bin/PlistBuddy -c "Print :CFBundleVersion" "$1")
echo $marketing_version-$build_version
'';
versionCheckProgramArg = [ "${placeholder "out"}/Applications/RapidAPI.app/Contents/Info.plist" ];
doInstallCheck = true;
meta = {
description = "Full-featured HTTP client that lets you test and describe the APIs you build or consume";
homepage = "https://paw.cloud";
changelog = "https://paw.cloud/updates/${lib.head (lib.splitString "-" finalAttrs.version)}";
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ DimitarNestorov ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
unstableGitUpdater,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rapidcheck";
version = "0-unstable-2023-12-14";
src = fetchFromGitHub {
owner = "emil-e";
repo = "rapidcheck";
rev = "ff6af6fc683159deb51c543b065eba14dfcf329b";
hash = "sha256-Ixz5RpY0n8Un/Pv4XoTfbs40+70iyMbkQUjDqoLaWOg=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "RC_INSTALL_ALL_EXTRAS" true)
];
passthru = {
updateScript = unstableGitUpdater { };
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = with lib; {
description = "C++ framework for property based testing inspired by QuickCheck";
inherit (finalAttrs.src.meta) homepage;
maintainers = [ ];
license = licenses.bsd2;
pkgConfigModules = [
"rapidcheck"
# Extras
"rapidcheck_boost"
"rapidcheck_boost_test"
"rapidcheck_catch"
"rapidcheck_doctest"
"rapidcheck_gtest"
];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
catch2_3,
python3Packages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rapidfuzz-cpp";
version = "3.3.3";
src = fetchFromGitHub {
owner = "rapidfuzz";
repo = "rapidfuzz-cpp";
rev = "v${finalAttrs.version}";
hash = "sha256-uyOkp+a08V+4Hvwp1OY6XMMd37z5RI+W5G4URu6FQtU=";
};
nativeBuildInputs = [
cmake
];
cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [
"-DRAPIDFUZZ_BUILD_TESTING=ON"
];
CXXFLAGS = lib.optionals stdenv.cc.isClang [
# error: no member named 'fill' in namespace 'std'
"-include algorithm"
];
nativeCheckInputs = [
catch2_3
];
passthru = {
tests = {
/**
`python3Packages.levenshtein` crucially depends on `rapidfuzz-cpp`
*/
inherit (python3Packages) levenshtein;
};
};
meta = {
description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
homepage = "https://github.com/rapidfuzz/rapidfuzz-cpp";
changelog = "https://github.com/rapidfuzz/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,22 @@
diff --git a/test/unittest/writertest.cpp b/test/unittest/writertest.cpp
index 4c24121..66c9087 100644
--- a/test/unittest/writertest.cpp
+++ b/test/unittest/writertest.cpp
@@ -386,6 +386,9 @@ TEST(Writer, InvalidEncoding) {
writer.EndArray();
}
+
+ // does not compile on clang-19
+#if 0
// Fail in encoding
{
StringBuffer buffer;
@@ -401,6 +404,7 @@ TEST(Writer, InvalidEncoding) {
static const UTF32<>::Ch s[] = { 0x110000, 0 }; // Out of U+0000 to U+10FFFF
EXPECT_FALSE(writer.String(s));
}
+#endif
}
TEST(Writer, ValidateEncoding) {

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
doxygen,
graphviz,
gtest,
unstableGitUpdater,
valgrind,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rapidjson";
version = "1.1.0-unstable-2025-02-05";
outputs = [
"out"
"doc"
];
src = fetchFromGitHub {
owner = "Tencent";
repo = "rapidjson";
rev = "24b5e7a8b27f42fa16b96fc70aade9106cf7102f";
hash = "sha256-oHHLYRDMb7Y/k0CwsdsxPC5lglr2IChQi0AiOMiFn78=";
};
patches = [
./use-nixpkgs-gtest.patch
# https://github.com/Tencent/rapidjson/issues/2214
./suppress-valgrind-failures.patch
# disable tests which don't build on clang-19
# https://github.com/Tencent/rapidjson/issues/2318
./char_traits-clang-19-errors.diff
];
postPatch = ''
for f in doc/Doxyfile.*; do
substituteInPlace $f \
--replace-fail "WARN_IF_UNDOCUMENTED = YES" "WARN_IF_UNDOCUMENTED = NO"
done
'';
nativeBuildInputs = [
cmake
doxygen
graphviz
];
buildInputs = [
gtest
];
strictDeps = true;
cmakeFlags = [
(lib.cmakeBool "RAPIDJSON_BUILD_DOC" true)
(lib.cmakeBool "RAPIDJSON_BUILD_TESTS" true)
(lib.cmakeBool "RAPIDJSON_BUILD_EXAMPLES" false)
# gtest 1.13+ requires C++14 or later.
(lib.cmakeBool "RAPIDJSON_BUILD_CXX11" false)
(lib.cmakeBool "RAPIDJSON_BUILD_CXX17" true)
# Prevent -march=native
(lib.cmakeBool "RAPIDJSON_ENABLE_INSTRUMENTATION_OPT" false)
# Disable -Werror by using build type specific flags, which are
# added after general CMAKE_CXX_FLAGS.
(lib.cmakeFeature "CMAKE_CXX_FLAGS_RELEASE" "-Wno-error")
];
doCheck =
!(stdenv.hostPlatform.isStatic || stdenv.hostPlatform.isDarwin)
&& lib.meta.availableOn stdenv.hostPlatform valgrind;
nativeCheckInputs = [
valgrind
];
passthru = {
updateScript = unstableGitUpdater {
tagPrefix = "v";
};
};
meta = {
description = "Fast JSON parser/generator for C++ with both SAX/DOM style API";
homepage = "http://rapidjson.org/";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = [
lib.maintainers.dotlambda
lib.maintainers.tobim
];
};
})

View File

@@ -0,0 +1,36 @@
diff --git a/test/valgrind.supp b/test/valgrind.supp
index c9d3d226..63af7bf9 100644
--- a/test/valgrind.supp
+++ b/test/valgrind.supp
@@ -24,3 +24,31 @@
fun:*Uri*Parse_UTF16_Std*
}
+{
+ Suppress memcpy_chk valgrind report 5
+ Memcheck:Overlap
+ fun:__memcpy_chk
+ fun:*dtoa_normal*
+}
+
+{
+ Suppress memcpy_chk valgrind report 6
+ Memcheck:Overlap
+ fun:__memcpy_chk
+ fun:*dtoa_maxDecimalPlaces*
+}
+
+{
+ Suppress memcpy_chk valgrind report 7
+ Memcheck:Overlap
+ fun:__memcpy_chk
+ ...
+ fun:*Reader*ParseDoubleHandler*
+}
+
+{
+ Suppress memcpy_chk valgrind report 8
+ Memcheck:Overlap
+ fun:__memcpy_chk
+ fun:*Reader*ParseNumber_NormalPrecisionError*
+}

View File

@@ -0,0 +1,43 @@
From b9206d360c19412d185263795d67c884feab281a Mon Sep 17 00:00:00 2001
From: Tobias Mayer <tobim@fastmail.fm>
Date: Mon, 29 Jul 2024 07:26:50 +0200
Subject: [PATCH] Use nixpkgs gtest
---
test/CMakeLists.txt | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 11c1b04c..3d02d475 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,20 +1,8 @@
-find_package(GTestSrc)
+find_package(GTest REQUIRED)
+enable_testing()
-IF(GTESTSRC_FOUND)
- enable_testing()
+set(TEST_LIBRARIES GTest::gtest GTest::gtest_main)
- if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
- set(gtest_disable_pthreads ON)
- set(gtest_force_shared_crt ON)
- endif()
-
- add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
- include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
-
- set(TEST_LIBRARIES gtest gtest_main)
-
- add_custom_target(tests ALL)
- add_subdirectory(perftest)
- add_subdirectory(unittest)
-
-ENDIF(GTESTSRC_FOUND)
+add_custom_target(tests ALL)
+add_subdirectory(perftest)
+add_subdirectory(unittest)
--
2.45.2

View File

@@ -0,0 +1,141 @@
{
lib,
fetchFromGitHub,
fetchNpmDeps,
rustPlatform,
makeWrapper,
pkg-config,
wrapGAppsHook4,
openssl,
onnxruntime,
webkitgtk_4_1,
gtk3,
glib,
gdk-pixbuf,
libappindicator,
cairo,
pango,
xorg,
libxkbcommon,
vulkan-loader,
libjpeg,
libpng,
zlib,
libGL,
dbus,
gvfs,
libheif,
glib-networking,
nodejs_20,
npmHooks,
cargo-tauri,
writableTmpDirAsHomeHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rapidraw";
version = "1.3.2";
src = fetchFromGitHub {
owner = "CyberTimon";
repo = "RapidRAW";
tag = "v${finalAttrs.version}";
hash = "sha256-j9Mpg3o90/PdKlSpJEePcnXZoO2BfnGtJEielM/5/uQ=";
};
cargoHash = "sha256-emwlK16NgeTYyQevWD4baHUxMP5xWJsKpQp/q5krAhQ=";
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-MULxH6gmHC58XdQe4ePvHcXP7/7fYNHgGHHltkODQ6w=";
};
nativeBuildInputs = [
pkg-config
makeWrapper
wrapGAppsHook4
nodejs_20
npmHooks.npmConfigHook
cargo-tauri.hook
writableTmpDirAsHomeHook
];
buildInputs = [
nodejs_20
glib-networking
openssl
webkitgtk_4_1
gtk3
glib
gdk-pixbuf
libappindicator
cairo
pango
xorg.libX11
xorg.libXi
xorg.libXcursor
xorg.libXext
xorg.libXrandr
xorg.libXrender
xorg.libxcb
xorg.libXfixes
libxkbcommon
vulkan-loader
libjpeg
libpng
zlib
libGL
dbus
gvfs
libheif
onnxruntime
wrapGAppsHook4
];
cargoRoot = "src-tauri";
buildAndTestSubdir = "src-tauri";
# Set HOME for npm to avoid permission issues and add node_modules to path
preBuild = ''
export PATH="$PWD/node_modules/.bin:$PATH"
# Configure Tauri to use lowercase binary name
substituteInPlace src-tauri/tauri.conf.json \
--replace ' "identifier": "com.rapidraw.app",' ' "identifier": "com.rapidraw.app", "mainBinaryName": "rapidraw",'
'';
dontWrapGApps = true;
# needs to be declared twice annoyingly
ORT_STRATEGY = "system";
postInstall = ''
# Patch the .desktop file to set the Categories field
sed -i '/^Categories=/c\Categories=Graphics;Photography' "$out/share/applications/RapidRAW.desktop"
# Ensure the resources directory exists before linking
mkdir -p $out/lib/RapidRAW/resources
# link the .so file
ln -sf ${onnxruntime}/lib/libonnxruntime.so $out/lib/RapidRAW/resources/libonnxruntime.so
# remove the .dylib file
rm -rf $out/lib/RapidRAW/resources/libonnxruntime.dylib
'';
postFixup = ''
wrapGApp $out/bin/rapidraw \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs} \
--set ORT_STRATEGY "system" \
--set ORT_DYLIB_PATH "${onnxruntime}/lib/libonnxruntime.so"
'';
meta = {
description = "Blazingly-fast, non-destructive, and GPU-accelerated RAW image editor built with performance in mind";
homepage = "https://github.com/CyberTimon/RapidRAW";
license = lib.licenses.agpl3Only;
mainProgram = "rapidraw";
maintainers = with lib.maintainers; [ taciturnaxolotl ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
wxGTK32,
subversion,
apr,
aprutil,
python3,
}:
stdenv.mkDerivation {
pname = "rapidsvn";
version = "unstable-2021-08-02";
src = fetchFromGitHub {
owner = "RapidSVN";
repo = "RapidSVN";
rev = "3a564e071c3c792f5d733a9433b9765031f8eed0";
hash = "sha256-6bQTHAOZAP+06kZDHjDx9VnGm4vrZUDyLHZdTpiyP08=";
};
postPatch = ''
substituteInPlace configure.ac \
--replace "[3.0.*]" "[3.*]"
'';
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
wxGTK32
subversion
apr
aprutil
python3
];
configureFlags = [
"--with-svn-include=${subversion.dev}/include"
"--with-svn-lib=${subversion.out}/lib"
];
env.NIX_CFLAGS_COMPILE = "-std=c++14";
meta = {
description = "Multi-platform GUI front-end for the Subversion revision system";
homepage = "http://rapidsvn.tigris.org/";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.unix;
mainProgram = "rapidsvn";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation rec {
pname = "rapidxml";
version = "1.13";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.zip";
sha256 = "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63";
};
nativeBuildInputs = [ unzip ];
installPhase = ''
mkdir -p $out/include/${pname}
cp * $out/include/${pname}
'';
meta = with lib; {
description = "Fast XML DOM-style parser in C++";
homepage = "https://rapidxml.sourceforge.net/";
license = licenses.boost;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
git,
}:
stdenv.mkDerivation rec {
pname = "rapidyaml";
version = "0.9.0";
src = fetchFromGitHub {
owner = "biojppm";
repo = "rapidyaml";
fetchSubmodules = true;
tag = "v${version}";
hash = "sha256-+ENfflVjeesX14m0G71HdeSIECopZV4J2JL9+c+nbXE=";
};
nativeBuildInputs = [
cmake
git
];
meta = with lib; {
description = "Library to parse and emit YAML, and do it fast";
homepage = "https://github.com/biojppm/rapidyaml";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
libedit,
makeWrapper,
nasm,
}:
stdenv.mkDerivation {
pname = "rappel";
version = "0-unstable-2024-03-07";
src = fetchFromGitHub {
owner = "yrp604";
repo = "rappel";
rev = "981d8faf32b984e791841193498f46313fb6a56d";
hash = "sha256-EnHNwasET3EdYjOQtvg4SDC9cWIA7RKP6xox3Ux9oRk=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ libedit ];
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin bin/rappel
wrapProgram $out/bin/rappel --prefix PATH : "${nasm}/bin"
runHook postInstall
'';
meta = {
homepage = "https://github.com/yrp604/rappel";
description = "Pretty janky assembly REPL";
mainProgram = "rappel";
license = lib.licenses.bsdOriginal;
maintainers = [ lib.maintainers.pamplemousse ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
installShellFiles,
}:
let
version = "7.01";
downloadVersion = lib.replaceStrings [ "." ] [ "" ] version;
# Use `./update.sh` to generate the entries below
srcs = {
i686-linux = {
url = "https://www.rarlab.com/rar/rarlinux-x32-${downloadVersion}.tar.gz";
hash = "sha256-1CSbxM7arGpn4Yj5fHEFKcDURFPrC2+XptLoaDH8LDs=";
};
x86_64-linux = {
url = "https://www.rarlab.com/rar/rarlinux-x64-${downloadVersion}.tar.gz";
hash = "sha256-34iWajylsSmIOuAT6kV7c2537qWFHc+gT+JT/trWrw8=";
};
aarch64-darwin = {
url = "https://www.rarlab.com/rar/rarmacos-arm-${downloadVersion}.tar.gz";
hash = "sha256-BjEJFzKyRpN4XL6KYW7ykQcSxqF4tYr2dCFf50JHH38=";
};
x86_64-darwin = {
url = "https://www.rarlab.com/rar/rarmacos-x64-${downloadVersion}.tar.gz";
hash = "sha256-1ExnVDre49wWwB/BKP/L9xdYOMx8qkeZfmObJ7xm4dY=";
};
};
manSrc = fetchurl {
url = "https://aur.archlinux.org/cgit/aur.git/plain/rar.1?h=rar&id=8e39a12e88d8a3b168c496c44c18d443c876dd10";
name = "rar.1";
hash = "sha256-93cSr9oAsi+xHUtMsUvICyHJe66vAImS2tLie7nt8Uw=";
};
in
stdenv.mkDerivation {
pname = "rar";
inherit version;
src = fetchurl (
srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")
);
dontBuild = true;
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib stdenv.cc.cc) ];
nativeBuildInputs = [
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
install -Dm755 {rar,unrar} -t "$out/bin"
install -Dm755 default.sfx -t "$out/lib"
install -Dm644 {acknow.txt,license.txt} -t "$out/share/doc/rar"
install -Dm644 rarfiles.lst -t "$out/etc"
runHook postInstall
'';
postInstall = ''
installManPage ${manSrc}
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Utility for RAR archives";
homepage = "https://www.rarlab.com/";
license = licenses.unfree;
mainProgram = "rar";
maintainers = with maintainers; [ thiagokokada ];
platforms = lib.attrNames srcs;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}

78
pkgs/by-name/ra/rar/update.sh Executable file
View File

@@ -0,0 +1,78 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gawk gnused pup jq
set -euo pipefail
DIRNAME=$(dirname "$0")
readonly DIRNAME
readonly NIXPKGS_ROOT="../../../.."
readonly NIX_FLAGS=(--extra-experimental-features 'nix-command flakes')
# awk is used for parsing the RARLAB website to get the newest version
readonly AWK_FIELD_SEPARATOR='[-.]'
# shellcheck disable=SC2016
readonly AWK_COMMAND='
# We will get the following output from pup:
# /rar/rarlinux-x64-700b3.tar.gz
# /rar/rarmacos-x64-700b3.tar.gz
# /rar/rarlinux-x64-624.tar.gz
# /rar/rarbsd-x64-624.tar.gz
# /rar/rarmacos-x64-624.tar.gz
# Ignore anything that is flagged as beta (e.g.: `/rar/rarlinux-x64-700b3.tar.gz`)
!/[0-9]+b[0-9]*.tar.gz$/ {
# /rar/rarlinux-x64-624.tar.gz -> 624
val = $3
# Only get the value if it is bigger than the current one
if (val > max) max = val
}
END {
# 624 -> 6.24
printf "%.2f\n", max/100
}
'
updateHash() {
local -r version="${1//./}"
local -r arch="$2"
local -r os="$3"
local -r nix_arch="$4"
url="https://www.rarlab.com/rar/rar$os-$arch-$version.tar.gz"
hash=$(nix store prefetch-file --json "$url" | jq -r .hash)
currentHash=$(cd "$DIRNAME" && nix "${NIX_FLAGS[@]}" eval --raw "$NIXPKGS_ROOT#legacyPackages.$nix_arch.rar.src.outputHash")
sed -i "s|$currentHash|$hash|g" "$DIRNAME/default.nix"
}
updateVersion() {
local -r version="$1"
sed -i "s|version = \"[0-9.]*\";|version = \"$version\";|g" "$DIRNAME/default.nix"
}
latestVersion="${1:-}"
if [[ -z "$latestVersion" ]]; then
latestVersion=$(
curl --silent --location --fail https://www.rarlab.com/download.htm | \
pup 'a[href*=".tar.gz"] attr{href}' | \
awk -F"$AWK_FIELD_SEPARATOR" "$AWK_COMMAND"
)
fi
readonly latestVersion
echo "Latest version: $latestVersion"
currentVersion=$(cd "$DIRNAME" && nix "${NIX_FLAGS[@]}" eval --raw "$NIXPKGS_ROOT#legacyPackages.x86_64-linux.rar.version")
readonly currentVersion
echo "Current version: $currentVersion"
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "rar is up-to-date"
exit 0
fi
updateHash "$latestVersion" x32 linux i686-linux
updateHash "$latestVersion" x64 linux x86_64-linux
updateHash "$latestVersion" arm macos aarch64-darwin
updateHash "$latestVersion" x64 macos x86_64-darwin
updateVersion "$latestVersion"

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
fuse2,
unrar,
}:
stdenv.mkDerivation rec {
pname = "rar2fs";
version = "1.29.7";
src = fetchFromGitHub {
owner = "hasse69";
repo = "rar2fs";
rev = "v${version}";
sha256 = "sha256-iYlmNtaJZrnsNNNlaoV1Vu6PHrHIr/glhgs3784JCm4=";
};
postPatch = ''
substituteInPlace get-version.sh \
--replace "which echo" "echo"
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
fuse2
unrar
];
configureFlags = [
"--with-unrar=${unrar.src}/unrar"
"--disable-static-unrar"
];
meta = with lib; {
description = "FUSE file system for reading RAR archives";
homepage = "https://hasse69.github.io/rar2fs/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
kraem
wegank
];
platforms = with platforms; linux ++ freebsd;
};
}

View File

@@ -0,0 +1,24 @@
diff --git a/Makefile b/Makefile
index eca86a9..f11931b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
# Common variables
-CFLAGS = -g -static -O2 -D_GNU_SOURCE -DARCH_LITTLE_ENDIAN=1
+CFLAGS = -g -O2 -D_GNU_SOURCE -DARCH_LITTLE_ENDIAN=1
TARGET = rar2hashcat
# Variables for Linux target
diff --git a/base64_convert.c b/base64_convert.c
index 0d2635d..b101e3c 100644
--- a/base64_convert.c
+++ b/base64_convert.c
@@ -163,7 +163,7 @@ static char *strnzcpy(char *dst, const char *src, int size)
return dst;
}
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
static char *strupr(char *s)
{
unsigned char *ptr = (unsigned char *)s;

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rar2hashcat";
version = "1.0";
src = fetchFromGitHub {
owner = "hashstation";
repo = "rar2hashcat";
rev = finalAttrs.version;
hash = "sha256-GVh4Gyjn84xAwO7wKXYe2DPnpb8gnxGIMH5Szce+XpY=";
};
patches = [
./darwin-support.patch
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration -Wno-error=int-conversion";
makeFlags = [
"CC_LINUX=${stdenv.cc.targetPrefix}cc"
"rar2hashcat"
];
installPhase = ''
runHook preInstall
install -D rar2hashcat $out/bin/rar2hashcat
runHook postInstall
'';
meta = {
changelog = "https://github.com/hashstation/rar2hashcat/releases/tag/${finalAttrs.version}";
description = "Processes input RAR files into a format suitable for use with hashcat";
homepage = "https://github.com/hashstation/rar2hashcat";
license = lib.licenses.mit;
mainProgram = "rar2hashcat";
maintainers = with lib.maintainers; [ emilytrau ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
libxml2,
file,
p7zip,
unrar,
unzip,
}:
stdenv.mkDerivation {
pname = "rarcrack";
version = "0.2";
src = fetchFromGitHub {
owner = "jaredsburrows";
repo = "Rarcrack";
rev = "35ead64cd2b967eec3e3e3a4c328b89b11ff32a0";
sha256 = "134fq84896w5vp8vg4qg0ybpb466njibigyd7bqqm1xydr07qrgn";
};
nativeBuildInputs = [ unzip ];
buildInputs = [
libxml2
file
p7zip
unrar
];
buildFlags = lib.optional stdenv.cc.isClang "CC=clang";
installFlags = [ "PREFIX=\${out}" ];
patchPhase = ''
substituteInPlace rarcrack.c --replace "file -i" "${file}/bin/file -i"
'';
preInstall = ''
mkdir -p $out/bin
'';
meta = with lib; {
description = "This program can crack zip,7z and rar file passwords";
longDescription = ''
If you forget your password for compressed archive (rar, 7z, zip), this program is the solution.
This program uses bruteforce algorithm to find correct password. You can specify wich characters will be used in password generations.
Warning: Please don't use this program for any illegal things!
'';
homepage = "https://github.com/jaredsburrows/Rarcrack";
license = licenses.gpl2Only;
maintainers = with maintainers; [ davidak ];
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
withPcre2 ? stdenv.hostPlatform.isLinux,
pcre2,
testers,
rare-regex,
}:
buildGoModule rec {
pname = "rare";
version = "0.4.4";
src = fetchFromGitHub {
owner = "zix99";
repo = "rare";
rev = version;
hash = "sha256-hdOG7UGEi4MnFg0wbyDN4gDpQLb9sG3yUrQ/J0fwKkA=";
};
vendorHash = "sha256-wUOtxNjL/4MosACCzPTWKWrnMZhxINfN1ppkRsqDh9M=";
buildInputs = lib.optionals withPcre2 [
pcre2
];
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
"-X=main.buildSha=${src.rev}"
];
tags = lib.optionals withPcre2 [
"pcre2"
];
passthru.tests = {
version = testers.testVersion {
package = rare-regex;
};
};
meta = with lib; {
description = "Fast text scanner/regex extractor and realtime summarizer";
homepage = "https://rare.zdyn.net";
changelog = "https://github.com/zix99/rare/releases/tag/${src.rev}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ figsoda ];
};
}

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