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,43 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ruapu";
version = "0.1.0";
src = fetchFromGitHub {
owner = "nihui";
repo = "ruapu";
rev = finalAttrs.version;
hash = "sha256-gP2O0KtzArNCU3Sqc7STitO6WkS1536Z4VkA5U1uZuc=";
};
buildPhase = ''
runHook preBuild
$CC main.c -o ruapu
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ruapu $out/bin/ruapu
install -Dm644 ruapu.h $out/include/ruapu.h
runHook postInstall
'';
meta = {
description = "Detect CPU ISA features with single-file";
homepage = "https://github.com/nihui/ruapu";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aleksana ];
mainProgram = "ruapu";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitLab,
python3Packages,
texinfo,
}:
let
pypkgs = python3Packages;
in
pypkgs.buildPythonApplication rec {
pname = "rubber";
version = "1.6.6";
pyproject = true;
src = fetchFromGitLab {
owner = "latex-rubber";
repo = "rubber";
rev = version;
hash = "sha256-C26PN3jyV6qwSjgPem54bykZrpKj+n8iHYYUyR+8dgI=";
};
postPatch = ''
sed -i -e '/texi2dvi/d' hatch_build.py
substituteInPlace tests/run.sh \
--replace-fail /var/tmp /tmp
'';
nativeBuildInputs = [
pypkgs.hatchling
texinfo
];
checkPhase = ''
runHook preCheck
pushd tests >/dev/null
${stdenv.shell} run.sh
popd >/dev/null
runHook postCheck
'';
meta = with lib; {
description = "Wrapper for LaTeX and friends";
longDescription = ''
Rubber is a program whose purpose is to handle all tasks related
to the compilation of LaTeX documents. This includes compiling
the document itself, of course, enough times so that all
references are defined, and running BibTeX to manage
bibliographic references. Automatic execution of dvips to
produce PostScript documents is also included, as well as usage
of pdfLaTeX to produce PDF documents.
'';
license = licenses.gpl2Plus;
homepage = "https://gitlab.com/latex-rubber/rubber";
maintainers = with maintainers; [
ttuegel
peterhoeg
];
platforms = platforms.unix;
mainProgram = "rubber";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libsamplerate,
libsndfile,
fftw,
lv2,
jdk_headless,
vamp-plugin-sdk,
ladspaH,
meson,
ninja,
}:
stdenv.mkDerivation rec {
pname = "rubberband";
version = "4.0.0";
src = fetchurl {
url = "https://breakfastquay.com/files/releases/rubberband-${version}.tar.bz2";
hash = "sha256-rwUDE+5jvBizWy4GTl3OBbJ2qvbRqiuKgs7R/i+AKOk=";
};
nativeBuildInputs = [
pkg-config
meson
ninja
jdk_headless
];
buildInputs = [
libsamplerate
libsndfile
fftw
vamp-plugin-sdk
ladspaH
lv2
];
makeFlags = [ "AR:=$(AR)" ];
# TODO: package boost-test, so we can run the test suite. (Currently it fails
# to find libboost_unit_test_framework.a.)
mesonFlags = [ "-Dtests=disabled" ];
doCheck = false;
meta = with lib; {
description = "High quality software library for audio time-stretching and pitch-shifting";
homepage = "https://breakfastquay.com/rubberband/";
# commercial license available as well, see homepage. You'll get some more optimized routines
license = licenses.gpl2Plus;
maintainers = [ maintainers.marcweber ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,107 @@
{
stdenv,
lib,
fetchurl,
}:
let
# Latest commit touching the rubik tree
commit = "054aa9d546cd6308f8ff7139b332490e0967aebe";
in
stdenv.mkDerivation {
pname = "rubik";
version = "2.200";
srcs = [
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Black.ttf";
sha256 = "0h4mxqz0b5as7g964bv98aanaghp4wgs2g5wnf7apxnd2fng14dn";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-BlackItalic.ttf";
sha256 = "0x8j3fwavkf1jf7s97ncvs0jk463v1fyajcxqxvv7lpk55sjnbpy";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Bold.ttf";
sha256 = "0prjqdbdpnhwr66gjw9mc1590gmjl7fir8wnanzch6arvngmxaj9";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-BoldItalic.ttf";
sha256 = "1zyl55fkjr61k6yfvgi0cr2iz4s0kkv3mkjpdmpla9jnk10rd8lm";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-ExtraBold.ttf";
sha256 = "0vi01lc2dadgmw5z26nkfzn7vl3lsd0flhqqfp40nn8jvpdkb2mq";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-ExtraBoldItalic.ttf";
sha256 = "0ldcszzzrc44gldflman7kcfk38x77grjb3zjvxjvgn875ggwabk";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Italic.ttf";
sha256 = "09x7fh6ad4w6027410vhkvisgy8vqm2mzdsc19z3szlrxi0gl0rx";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Light.ttf";
sha256 = "19a6k0pprcra6nxk3l0k6wkg9g0qn5h1v71rw2m8im64kyjx4qpf";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-LightItalic.ttf";
sha256 = "0r9hbh9xnbp0584vjiiq72583j1ai3dw93gfy823c736y6bk0j2m";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Medium.ttf";
sha256 = "01nky9la4qjd80dy200j8l7zl0r2h9zw90k7aghzlb5abk4i3zvf";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-MediumItalic.ttf";
sha256 = "1i81x9h2cr65bj85z5b2mki59532nvlbh92wb84zfhfdz97s30cq";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-Regular.ttf";
sha256 = "1vk4n6yc4x1vlwfrp26jhagyl5l86jwa4lalccc320crrwqfc521";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-SemiBold.ttf";
sha256 = "0blmy1ywsf9hr1a66cl12bjn32i072w6ncvsir0s5smm2c0gksvb";
})
(fetchurl {
url = "https://raw.githubusercontent.com/googlefonts/rubik/${commit}/fonts/ttf/Rubik-SemiBoldItalic.ttf";
sha256 = "1sj22d3jrlxl6ka0naf5nby3k0i7pzadk5b8xgdhcslwijwiib3y";
})
];
sourceRoot = ".";
unpackCmd = ''
ttfName=$(basename $(stripHash $curSrc))
cp $curSrc ./$ttfName
'';
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp -a *.ttf $out/share/fonts/truetype/
'';
meta = with lib; {
homepage = "https://fonts.google.com/specimen/Rubik";
description = "Rubik Font - is a 5 weight Roman + Italic family";
longDescription = ''
The Rubik Fonts project was initiated as part of the Chrome CubeLab
project.
Rubik is a 5 weight Roman + Italic family.
Rubik supports the Latin, Cyrillic and Hebrew scripts. The Latin and Cyrillic
were designed by Philipp Hubert and Sebastian Fischer at Hubert Fischer.
The Hebrew was initially designed by Philipp and Sebastian, and then revised by
type designer and Hebrew native reader Meir Sadan to adjust proportions,
spacing and other design details.
Cyrillic was initially designed by Philipp and Sebastian, and then revised and
expanded by Cyreal Fonts Team (Alexei Vanyashin and Nikita Kanarev). Existing
glyphs were improved, and glyph set was expanded to GF Cyrillic Plus.
'';
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,114 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
coreutils,
dos2unix,
}:
stdenv.mkDerivation rec {
pname = "rubiks";
version = "20070912";
src = fetchurl {
url = "mirror://sageupstream/rubiks/rubiks-${version}.tar.bz2";
sha256 = "0zdmkb0j1kyspdpsszzb2k3279xij79jkx0dxd9f3ix1yyyg3yfq";
};
preConfigure = ''
export INSTALL="${coreutils}/bin/install"
'';
# everything is done in `make install`
dontBuild = true;
installFlags = [
"PREFIX=$(out)"
];
nativeBuildInputs = [ dos2unix ];
prePatch = ''
find ./dietz/ -type f -exec dos2unix {} \;
'';
patches = [
# Fix makefiles which use all the variables in all the wrong ways and
# hardcode values for some variables.
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch";
sha256 = "bRU7MJ/6BgCp2PUqZOragJhm38Q3E8ShStXQIYwIjvw=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch";
sha256 = "f53z4DogXKax1vUNkraOTt3TQ4bvT7CdQK/hOaaBS38=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch";
sha256 = "7gMC8y9elyIy2KvXYcp7YjPBNqn9PVhUle+/GrYAAdE=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/reid-Makefile.patch";
sha256 = "rp3SYtx02vVBtSlg1vJpdIoXNcdBNKDLCLqLAKwOYeQ=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-1-rubiks-includes.patch";
sha256 = "QYJ1KQ73HTEGY/beMVbcU215g/B8rHDjYD1YM2WZ7sk=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-2-rubiks-ansi-c.patch";
sha256 = "Rnu7uphE9URxnbg2K8mkymnB61magweH+WxVWR9JC4s=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-3-rubiks-prototypes.patch";
sha256 = "Wi038g+y7No1TNMiITtAdipjRi0+g6h0Sspslm5rZGU=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-4-rubiks-longtype.patch";
sha256 = "6pNuxFM69CZ/TQGZfHXLlCN5g5lf3RiYYZKzMvLJwkw=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-5-rubiks-signed.patch";
sha256 = "CCGXBMYvSjTm4YKQZAQMi6pWGjyHDYYQzdMZDSW2vFE=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/sagemath/sage/2a9a4267f93588cf33119cbacc032ed9acc433e5/build/pkgs/rubiks/patches/fedora-6-rubiks-attributes.patch";
sha256 = "RhlzMb33iaLfeBoF7Y0LIgEzOB/EC+AoWMSkRPCICaU=";
})
];
meta = with lib; {
homepage = "https://wiki.sagemath.org/spkg/rubiks";
description = "Several programs for working with Rubik's cubes";
# The individual websites are no longer available
longDescription = ''
There are several programs for working with Rubik's cubes, by three
different people. Look inside the directories under /src to see
specific info and licensing. In summary the three contributers are:
Michael Reid (GPL) http://www.math.ucf.edu/~reid/Rubik/optimal_solver.html
optimal - uses many pre-computed tables to find an optimal
solution to the 3x3x3 Rubik's cube
Dik T. Winter (MIT License)
cube - uses Kociemba's algorithm to iteratively find a short
solution to the 3x3x3 Rubik's cube
size222 - solves a 2x2x2 Rubik's cube
Eric Dietz (GPL) http://www.wrongway.org/?rubiksource
cu2 - A fast, non-optimal 2x2x2 solver
cubex - A fast, non-optimal 3x3x3 solver
mcube - A fast, non-optimal 4x4x4 solver
'';
license = with licenses; [
gpl2 # Michael Reid's and Eric Dietz software
mit # Dik T. Winter's software
];
teams = [ teams.sage ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,62 @@
From 3bbc396c4ddc8a5e26f7776155bb366c8d47c440 Mon Sep 17 00:00:00 2001
From: Bob van der Linden <bobvanderlinden@gmail.com>
Date: Thu, 9 Feb 2023 16:55:00 +0100
Subject: [PATCH 2/2] remove dependency on git
---
librubyfmt/build.rs | 35 +++--------------------------------
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/librubyfmt/build.rs b/librubyfmt/build.rs
index ef94c09..4668785 100644
--- a/librubyfmt/build.rs
+++ b/librubyfmt/build.rs
@@ -26,27 +26,9 @@ fn main() -> Output {
let path = std::env::current_dir()?;
let ruby_checkout_path = path.join("ruby_checkout");
- let old_checkout_sha = if ruby_checkout_path.join(ripper).exists() {
- Some(get_ruby_checkout_sha())
- } else {
- None
- };
-
- let _ = Command::new("git")
- .args(&["submodule", "update", "--init"])
- .status();
-
- let new_checkout_sha = get_ruby_checkout_sha();
-
- // Only rerun this build if the ruby_checkout has changed
- match old_checkout_sha {
- Some(old_sha) if old_sha == new_checkout_sha => {}
- _ => {
- make_configure(&ruby_checkout_path)?;
- run_configure(&ruby_checkout_path)?;
- build_ruby(&ruby_checkout_path)?;
- }
- }
+ make_configure(&ruby_checkout_path)?;
+ run_configure(&ruby_checkout_path)?;
+ build_ruby(&ruby_checkout_path)?;
cc::Build::new()
.file("src/rubyfmt.c")
@@ -152,14 +134,3 @@ fn check_process_success(command: &str, code: ExitStatus) -> Output {
}
}
-fn get_ruby_checkout_sha() -> String {
- String::from_utf8(
- Command::new("git")
- .args(&["rev-parse", "HEAD"])
- .current_dir("./ruby_checkout")
- .output()
- .expect("git rev-parse shouldn't fail")
- .stdout,
- )
- .expect("output should be valid utf8")
-}
--
2.39.1

View File

@@ -0,0 +1,21 @@
diff --git i/librubyfmt/build.rs w/librubyfmt/build.rs
index 296b749..941a4ca 100644
--- i/librubyfmt/build.rs
+++ w/librubyfmt/build.rs
@@ -166,6 +166,7 @@ fn run_configure(ruby_checkout_path: &Path) -> Output {
command
.arg("--target=aarch64-unknown-linux-gnu")
.arg("--host=x86_64")
+ .arg("--disable-werror")
.env("CC", "aarch64-linux-gnu-gcc")
.env("AR", "aarch64-linux-gnu-ar")
.env("RANLIB", "aarch64-linux-gnu-ranlib");
diff --git i/librubyfmt/src/lib.rs w/librubyfmt/src/lib.rs
index 9b94b5f..b78e99f 100644
--- i/librubyfmt/src/lib.rs
+++ w/librubyfmt/src/lib.rs
@@ -1,4 +1,3 @@
-#![deny(warnings, missing_copy_implementations)]
#![allow(clippy::upper_case_acronyms, clippy::enum_variant_names)]
use serde::de::value;

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
autoconf,
automake,
bison,
ruby,
zlib,
readline,
libiconv,
libunwind,
libxcrypt,
libyaml,
rust-jemalloc-sys-unprefixed,
}:
rustPlatform.buildRustPackage rec {
pname = "rubyfmt";
version = "0.10.0";
src = fetchFromGitHub {
owner = "fables-tales";
repo = "rubyfmt";
tag = "v${version}";
hash = "sha256-IIHPU6iwFwQ5cOAtOULpMSjexFtTelSd/LGLuazdmUo=";
fetchSubmodules = true;
};
nativeBuildInputs = [
autoconf
automake
bison
ruby
];
buildInputs = [
zlib
libxcrypt
libyaml
rust-jemalloc-sys-unprefixed
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
readline
libiconv
libunwind
];
preConfigure = ''
pushd librubyfmt/ruby_checkout
autoreconf --install --force --verbose
./configure
popd
'';
cargoPatches = [
# Avoid checking whether ruby gitsubmodule is up-to-date.
./0002-remove-dependency-on-git.patch
# Avoid failing on unused variable warnings.
./0003-ignore-warnings.patch
];
cargoHash = "sha256-8LgAHznxU30bbK8ivNamVD3Yi2pljgpqJg2WC0nxftk=";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-fdeclspec";
preFixup = ''
mv $out/bin/rubyfmt{-main,}
'';
meta = {
description = "Ruby autoformatter";
homepage = "https://github.com/fables-tales/rubyfmt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bobvanderlinden ];
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "rubyfmt";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
cdparanoia,
cddiscid,
ruby,
}:
stdenv.mkDerivation rec {
version = "0.8.0rc3";
pname = "rubyripper";
src = fetchFromGitHub {
owner = "bleskodev";
repo = "rubyripper";
rev = "v${version}";
sha256 = "1qfwv8bgc9pyfh3d40bvyr9n7sjc2na61481693wwww640lm0f9f";
};
preConfigure = "patchShebangs .";
configureFlags = [ "--enable-cli" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
cddiscid
cdparanoia
ruby
];
postInstall = ''
cp -r share $out/
'';
postFixup = ''
wrapProgram $out/bin/rrip_cli \
--prefix PATH : ${
lib.makeBinPath [
cddiscid
cdparanoia
ruby
]
}
'';
meta = with lib; {
description = "High quality CD audio ripper";
mainProgram = "rrip_cli";
platforms = platforms.linux;
license = licenses.gpl3Plus;
homepage = "https://github.com/bleskodev/rubyripper";
};
}

View File

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

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
liblaxjson,
cmake,
freeimage,
}:
stdenv.mkDerivation rec {
version = "3.1.0";
pname = "rucksack";
src = fetchFromGitHub {
owner = "andrewrk";
repo = "rucksack";
rev = version;
sha256 = "0bcm20hqxqnq1j0zghb9i7z9frri6bbf7rmrv5g8dd626sq07vyv";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
liblaxjson
freeimage
];
meta = with lib; {
description = "Texture packer and resource bundler";
platforms = [
"i686-linux"
"x86_64-linux"
]; # fails on Darwin and AArch64
homepage = "https://github.com/andrewrk/rucksack";
license = licenses.mit;
maintainers = [ maintainers.andrewrk ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
oniguruma,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "rucola";
version = "0.5.0";
src = fetchFromGitHub {
owner = "Linus-Mussmaecher";
repo = "rucola";
rev = "v${version}";
hash = "sha256-vBY6tkzLgZuSU5AqH3uzDwjPl/ayWY0S8uRvlgE/Wmw=";
};
cargoHash = "sha256-a1f+WSXMNaZCKc7bScknW9WW+Qi1CZIuNLdJseem11I=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
oniguruma
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
# Fails on Darwin
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"--skip=io::file_tracker::tests::test_watcher_rename"
];
meta = {
description = "Terminal-based markdown note manager";
homepage = "https://github.com/Linus-Mussmaecher/rucola";
changelog = "https://github.com/Linus-Mussmaecher/rucola/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ donovanglover ];
mainProgram = "rucola";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rucredstash";
version = "0.9.2";
src = fetchFromGitHub {
owner = "psibi";
repo = "rucredstash";
rev = "v${version}";
hash = "sha256-trupBiinULzD8TAy3eh1MYXhQilO08xu2a4yN7wwhwk=";
};
cargoHash = "sha256-QylZkqE8my2ldCjtg3++6TTDm0om3SVp0jwYUZ9qVes=";
# Disable tests since it requires network access and relies on the
# presence of certain AWS infrastructure
doCheck = false;
meta = with lib; {
description = "Utility for managing credentials securely in AWS cloud";
homepage = "https://github.com/psibi/rucredstash";
license = licenses.mit;
maintainers = with maintainers; [ psibi ];
mainProgram = "rucredstash";
};
}

View File

@@ -0,0 +1,102 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
rust-jemalloc-sys,
buildPackages,
versionCheckHook,
# passthru
nixosTests,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ruff";
version = "0.13.1";
src = fetchFromGitHub {
owner = "astral-sh";
repo = "ruff";
tag = finalAttrs.version;
hash = "sha256-dCxCpJLG2qjfrMxDJOL4rCwdVYfrz3P+4kDQ9d9Mbus=";
};
cargoBuildFlags = [ "--package=ruff" ];
cargoHash = "sha256-WtRryq8bmKfL3EL2kRFFokmG2f0lnS6zRMbUzGeYLDM=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [
rust-jemalloc-sys
];
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd ruff \
--bash <(${emulator} $out/bin/ruff generate-shell-completion bash) \
--fish <(${emulator} $out/bin/ruff generate-shell-completion fish) \
--zsh <(${emulator} $out/bin/ruff generate-shell-completion zsh)
''
);
# Run cargo tests
checkType = "debug";
# tests do not appear to respect linker options on doctests
# Upstream issue: https://github.com/rust-lang/cargo/issues/14189
# This causes errors like "error: linker `cc` not found" on static builds
doCheck = !stdenv.hostPlatform.isStatic;
# Exclude tests from `ty`-related crates, run everything else.
# Ordinarily we would run all the tests, but there is significant overlap with the `ty` package in nixpkgs,
# which ruff shares a monorepo with.
# As such, we leave running `ty` tests to the `ty` package, and concentrate on everything else.
cargoTestFlags = [
"--workspace"
"--exclude=ty"
"--exclude=ty_ide"
"--exclude=ty_project"
"--exclude=ty_python_semantic"
"--exclude=ty_server"
"--exclude=ty_static"
"--exclude=ty_test"
"--exclude=ty_vendored"
"--exclude=ty_wasm"
];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
nixos-test-driver-busybox = nixosTests.nixos-test-driver.busybox;
};
# Updating `ruff` needs to be done on staging due to NixOS tests. Disabling r-ryantm update bot:
# nixpkgs-update: no auto update
updateScript = nix-update-script { };
};
meta = {
description = "Extremely fast Python linter and code formatter";
homepage = "https://github.com/astral-sh/ruff";
changelog = "https://github.com/astral-sh/ruff/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "ruff";
maintainers = with lib.maintainers; [
bengsparks
figsoda
GaetanLepage
];
};
})

View File

@@ -0,0 +1,150 @@
{
lib,
stdenv,
rustPlatform,
withRuffleTools ? false,
fetchFromGitHub,
jre_minimal,
pkg-config,
autoPatchelfHook,
alsa-lib,
wayland,
xorg,
vulkan-loader,
udev,
libxkbcommon,
openh264,
writeShellApplication,
curl,
jq,
nix-update,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ruffle";
version = "0.2-nightly-2025-10-05";
src = fetchFromGitHub {
owner = "ruffle-rs";
repo = "ruffle";
tag = lib.strings.removePrefix "0.2-" finalAttrs.version;
hash = "sha256-u12Qfc0fmcs7TU35/gqfRxjSpw9SDbc4+ebR7lGpvJI=";
};
cargoHash = "sha256-v/3vf7YYJiz+PMBsznvOJsNLtv6bEQ9pffAI33rLVuw=";
cargoBuildFlags = lib.optional withRuffleTools "--workspace";
env =
let
tag = lib.strings.removePrefix "0.2-" finalAttrs.version;
versionDate = lib.strings.removePrefix "0.2-nightly-" finalAttrs.version;
in
{
VERGEN_IDEMPOTENT = "1";
VERGEN_GIT_SHA = tag;
VERGEN_GIT_COMMIT_DATE = versionDate;
VERGEN_GIT_COMMIT_TIMESTAMP = "${versionDate}T00:00:00Z";
};
nativeBuildInputs = [
jre_minimal
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
autoPatchelfHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
udev
(lib.getLib stdenv.cc.cc)
];
# Prevents ruffle from downloading openh264 at runtime for Linux
openh264-241 =
if stdenv.hostPlatform.isLinux then
openh264.overrideAttrs (_: rec {
version = "2.4.1";
src = fetchFromGitHub {
owner = "cisco";
repo = "openh264";
tag = "v${version}";
hash = "sha256-ai7lcGcQQqpsLGSwHkSs7YAoEfGCIbxdClO6JpGA+MI=";
};
})
else
null;
runtimeDependencies = lib.optionals stdenv.hostPlatform.isLinux [
wayland
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libX11
xorg.libxcb
libxkbcommon
vulkan-loader
finalAttrs.openh264-241
];
postInstall = ''
mv $out/bin/ruffle_desktop $out/bin/ruffle
install -Dm644 LICENSE.md -t $out/share/doc/ruffle
install -Dm644 README.md -t $out/share/doc/ruffle
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.desktop \
-t $out/share/applications/
install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.svg \
-t $out/share/icons/hicolor/scalable/apps/
install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.metainfo.xml \
-t $out/share/metainfo/
'';
passthru = {
updateScript = lib.getExe (writeShellApplication {
name = "ruffle-update";
runtimeInputs = [
curl
jq
nix-update
];
text = ''
version="$( \
curl https://api.github.com/repos/ruffle-rs/ruffle/releases?per_page=1 | \
jq -r ".[0].tag_name" \
)"
exec nix-update --version "0.2-$version" ruffle
'';
});
};
meta = {
description = "Cross platform Adobe Flash Player emulator";
longDescription = ''
Ruffle is a cross platform emulator for running and preserving
Adobe Flash content. It is capable of running ActionScript 1, 2
and 3 programs with machine-native performance thanks to being
written in the Rust programming language.
Additionally, overriding the `withRuffleTools` input to
`true` will build all the available packages in the ruffle
project, including the `exporter` and `scanner` utilities.
'';
homepage = "https://ruffle.rs/";
downloadPage = "https://ruffle.rs/downloads";
changelog = "https://github.com/ruffle-rs/ruffle/releases/tag/${lib.strings.removePrefix "0.2" finalAttrs.version}";
license = [
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [
lib.maintainers.jchw
lib.maintainers.normalcea
];
mainProgram = "ruffle";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'rufo'

View File

@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
rufo (0.18.1)
PLATFORMS
ruby
DEPENDENCIES
rufo
BUNDLED WITH
2.6.2

View File

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

View File

@@ -0,0 +1,21 @@
{
bundlerApp,
bundlerUpdateScript,
lib,
}:
bundlerApp {
pname = "rufo";
gemdir = ./.;
exes = [ "rufo" ];
passthru.updateScript = bundlerUpdateScript "rufo";
meta = with lib; {
description = "Ruby formatter";
homepage = "https://github.com/ruby-formatter/rufo";
license = licenses.mit;
maintainers = with maintainers; [ andersk ];
mainProgram = "rufo";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "ruler";
version = "2.4.1";
src = fetchFromGitHub {
owner = "sensepost";
repo = "ruler";
tag = version;
hash = "sha256-cEYpK1LB9b65xr6MCMax1vUtSWefjJdXNs4sPgx65d0=";
};
vendorHash = "sha256-ITd3cvZmRBWK3922dDRvNHNH8KzHoVfIQI6S318ibxA=";
ldflags = [
"-w"
"-s"
];
meta = {
description = "Tool to abuse Exchange services";
homepage = "https://github.com/sensepost/ruler";
changelog = "https://github.com/sensepost/ruler/releases/tag/${version}";
license = with lib.licenses; [ cc-by-nc-40 ];
maintainers = with lib.maintainers; [ fab ];
mainProgram = "ruler";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "run";
version = "0.11.2";
src = fetchFromGitHub {
owner = "TekWizely";
repo = "run";
rev = "v${version}";
sha256 = "sha256-an5AuRJJEM18IssdLLZC/zzPpsVCCtawRQXK/AfzMN0=";
};
vendorHash = "sha256-BAyhuE9hGGDfDGmXQ7dseUvHlK5vC87uLT78lHSvLeg=";
doCheck = false;
meta = with lib; {
description = "Easily manage and invoke small scripts and wrappers";
mainProgram = "run";
homepage = "https://github.com/TekWizely/run";
license = licenses.mit;
maintainers = with maintainers; [
rawkode
Br1ght0ne
];
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
fetchFromGitHub,
buildGoModule,
go-md2man,
installShellFiles,
pkg-config,
which,
libapparmor,
libseccomp,
libselinux,
stdenv,
makeBinaryWrapper,
nixosTests,
}:
buildGoModule (finalAttrs: {
pname = "runc";
version = "1.3.2";
src = fetchFromGitHub {
owner = "opencontainers";
repo = "runc";
tag = "v${finalAttrs.version}";
hash = "sha256-Yva0zrcnuHCuIYVi07sxTxNc4fOXVo93jO1hbHjdYNo=";
};
vendorHash = null;
outputs = [
"out"
"man"
];
nativeBuildInputs = [
go-md2man
installShellFiles
makeBinaryWrapper
pkg-config
which
];
buildInputs = [
libselinux
libseccomp
libapparmor
];
makeFlags = [
"BUILDTAGS+=seccomp"
"SHELL=${stdenv.shell}"
];
buildPhase = ''
runHook preBuild
patchShebangs .
make ${toString finalAttrs.makeFlags} runc man
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 runc $out/bin/runc
installManPage man/*/*.[1-9]
wrapProgram $out/bin/runc \
--prefix PATH : /run/current-system/systemd/bin
runHook postInstall
'';
passthru.tests = { inherit (nixosTests) cri-o docker podman; };
meta = with lib; {
homepage = "https://github.com/opencontainers/runc";
description = "CLI tool for spawning and running containers according to the OCI specification";
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
teams = [ teams.podman ];
platforms = platforms.linux;
mainProgram = "runc";
};
})

View File

@@ -0,0 +1,56 @@
{
stdenv,
lib,
fetchFromGitHub,
ldc ? null,
dcompiler ? ldc,
}:
assert dcompiler != null;
stdenv.mkDerivation rec {
pname = "rund";
version = "1.0.0";
src = fetchFromGitHub {
owner = "dragon-lang";
repo = "rund";
rev = "v${version}";
sha256 = "10x6f1nn294r5qnpacrpcbp348dndz5fv4nz6ih55c61ckpkvgcf";
};
buildInputs = [ dcompiler ];
buildPhase = ''
for candidate in dmd ldmd2; do
echo Checking for DCompiler $candidate ...
dc=$(type -P $candidate || echo "")
if [ ! "$dc" == "" ]; then
break
fi
done
if [ "$dc" == "" ]; then
exit "Error: could not find a D compiler"
fi
echo Using DCompiler $candidate
$dc -I=$src/src -i -run $src/make.d build --out $NIX_BUILD_TOP
'';
doCheck = true;
checkPhase = ''
$NIX_BUILD_TOP/rund make.d test
'';
installPhase = ''
mkdir -p $out/bin
mv $NIX_BUILD_TOP/rund $out/bin
'';
meta = with lib; {
description = "Compiler-wrapper that runs and caches D programs";
mainProgram = "rund";
homepage = "https://github.com/dragon-lang/rund";
license = lib.licenses.boost;
maintainers = with maintainers; [ jonathanmarler ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchurl,
makeBinaryWrapper,
jre11_minimal,
jdk11_headless,
versionCheckHook,
nix-update-script,
}:
let
jre11_minimal_headless = jre11_minimal.override {
jdk = jdk11_headless;
modules = [
"java.logging"
];
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "rundeck-cli";
version = "2.0.9";
src = fetchurl {
url = "https://github.com/rundeck/rundeck-cli/releases/download/v${finalAttrs.version}/rundeck-cli-${finalAttrs.version}-all.jar";
hash = "sha256-c6QAgwyRCtoOlS7DEmjyK3BwHV122bilL6H+Hzrv2dQ=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ jre11_minimal_headless ];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/rundeck-cli
cp $src $out/share/rundeck-cli/rundeck-cli.jar
mkdir -p $out/bin
makeWrapper ${lib.getExe jre11_minimal_headless} $out/bin/rd \
--add-flags "-jar $out/share/rundeck-cli/rundeck-cli.jar"
runHook postInstall
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/rd";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Official CLI tool for Rundeck";
longDescription = ''
The rd command provides command line access to the Rundeck HTTP API,
allowing you to access and control your Rundeck server from the
command line or shell scripts.
'';
homepage = "https://github.com/rundeck/rundeck-cli";
changelog = "https://github.com/rundeck/rundeck-cli/blob/v${finalAttrs.version}/docs/changes.md";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "rd";
};
})

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
jdk17,
which,
coreutils,
openssh,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rundeck";
version = "5.16.0-20251006";
src = fetchurl {
url = "https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-${finalAttrs.version}.war/artifacts/rundeck-${finalAttrs.version}.war/download?distro_version_id=167";
hash = "sha256-ws84HDqowYz2ouvN7E3SlouGZdZUDVDK4LUmzKXOyec=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk17 ];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/rundeck
cp $src $out/share/rundeck/rundeck.war
mkdir -p $out/bin
makeWrapper ${lib.getExe jdk17} $out/bin/rundeck \
--add-flags "-jar $out/share/rundeck/rundeck.war" \
--prefix PATH : ${
lib.makeBinPath [
which
coreutils
openssh
]
}
runHook postInstall
'';
passthru.updateScript = writeScript "update-rundeck" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl jq
set -eu -o pipefail
latest_tag=$(curl -s "https://api.github.com/repos/rundeck/rundeck/tags" | jq -r '.[0].name')
version=$(echo "$latest_tag" | sed -E 's/^v//')
full_version="$version-$(date +"%Y%m%d")"
if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$full_version" ]]; then
download_url="https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-$full_version.war/artifacts/rundeck-$full_version.war/download?distro_version_id=167"
hash=$(curl -L "$download_url" | nix-hash --flat --type sha256 --base32 - | nix --extra-experimental-features nix-command hash to-sri --type sha256)
update-source-version "$UPDATE_NIX_ATTR_PATH" "$full_version" "$hash"
fi
'';
meta = {
description = "Job scheduler and runbook automation";
longDescription = ''
Rundeck is an open source automation service with a web console,
command line tools and a WebAPI. It lets you easily run automation tasks
across a set of nodes.
'';
homepage = "https://www.rundeck.com/";
changelog = "https://docs.rundeck.com/docs/history/";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "rundeck";
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rune-languageserver";
version = "0.13.4";
src = fetchCrate {
inherit pname version;
hash = "sha256-Kw6Qh/9eQPMj4V689+7AxuJB+aCciK3FZTfcdhyZXGY=";
};
cargoHash = "sha256-YviRACndc4r4ul72ZF3I/R/nEsIoML2Ek2xqUUE3FDQ=";
env = {
RUNE_VERSION = version;
};
meta = {
description = "Language server for the Rune Language, an embeddable dynamic programming language for Rust";
homepage = "https://crates.io/crates/rune-languageserver";
changelog = "https://github.com/rune-rs/rune/releases/tag/${version}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "rune-languageserver";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rune";
version = "0.13.4";
src = fetchCrate {
pname = "rune-cli";
inherit version;
hash = "sha256-+2eXTkn9yOMhvS8cFwAorLBNIPvIRwsPOsGCl3gtRSE=";
};
cargoHash = "sha256-SgfgoMqr2Cc7+qhf9Ejl4Ect1JR9RqI9I0b+PrdvdOs=";
env = {
RUNE_VERSION = version;
};
meta = {
description = "Interpreter for the Rune Language, an embeddable dynamic programming language for Rust";
homepage = "https://rune-rs.github.io/";
changelog = "https://github.com/rune-rs/rune/releases/tag/${version}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "rune";
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
fetchFromGitHub,
makeDesktopItem,
makeWrapper,
maven,
jdk17,
jre,
xorg,
gitUpdater,
libGL,
}:
maven.buildMavenPackage rec {
pname = "runelite";
version = "2.7.2";
src = fetchFromGitHub {
owner = "runelite";
repo = "launcher";
rev = version;
hash = "sha256-ckeZ/7rACyZ5j+zzC5hv1NaXTi9q/KvOzMPTDd1crHQ=";
};
mvnJdk = jdk17;
mvnHash = "sha256-FpfHtGIfo84z6v9/nzc47+JeIM43MR9mWhVOPSi0xhM=";
desktop = makeDesktopItem {
name = "RuneLite";
type = "Application";
exec = "runelite";
icon = "runelite";
comment = "Open source Old School RuneScape client";
desktopName = "RuneLite";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
};
# tests require internet :(
mvnParameters = "-Dmaven.test.skip";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/share/icons
mkdir -p $out/share/applications
cp target/RuneLite.jar $out/share
cp appimage/runelite.png $out/share/icons
ln -s ${desktop}/share/applications/RuneLite.desktop $out/share/applications/RuneLite.desktop
makeWrapper ${jre}/bin/java $out/bin/runelite \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
xorg.libXxf86vm
libGL
]
}" \
--add-flags "-jar $out/share/RuneLite.jar"
'';
passthru.updateScript = gitUpdater { };
meta = {
description = "Open source Old School RuneScape client";
homepage = "https://runelite.net/";
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
kmeakin
moody
];
platforms = [ "x86_64-linux" ];
mainProgram = "runelite";
};
}

View File

@@ -0,0 +1,161 @@
{
stdenv,
lib,
autoPatchelfHook,
buildFHSEnv,
cairo,
dpkg,
fetchurl,
gcc-unwrapped,
glib,
glibc,
gtk2-x11,
libGL,
libpulseaudio,
libSM,
libXxf86vm,
libX11,
openssl_1_1,
pango,
SDL2,
wrapGAppsHook3,
xdg-utils,
xorg,
xorg_sys_opengl,
zlib,
}:
let
runescape = stdenv.mkDerivation rec {
pname = "runescape-launcher";
version = "2.2.11";
# Packages: https://content.runescape.com/downloads/ubuntu/dists/trusty/non-free/binary-amd64/Packages
# upstream is https://content.runescape.com/downloads/ubuntu/pool/non-free/r/${pname}/${pname}_${version}_amd64.deb
src = fetchurl {
url = "https://archive.org/download/${pname}_${version}_amd64/${pname}_${version}_amd64.deb";
sha256 = "0dyilgbsr28zqpf711wygg706vn7sqxklnsnbghwkxfzzjppz2xw";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
wrapGAppsHook3
];
buildInputs = [
cairo
gcc-unwrapped
glib
glibc
gtk2-x11
libSM
libXxf86vm
libX11
openssl_1_1
pango
zlib
];
runtimeDependencies = [
libGL
libpulseaudio
SDL2
openssl_1_1
xdg-utils # The launcher uses `xdg-open` to open HTTP URLs in the user's browser
xorg_sys_opengl
zlib
];
dontUnpack = true;
preBuild = ''
export DH_VERBOSE=1
'';
envVarsWithXmodifiers = ''
export MESA_GLSL_CACHE_DIR=~/Jagex
export GDK_SCALE=2
unset XMODIFIERS
'';
installPhase = ''
mkdir -p $out/bin $out/share
dpkg -x $src $out
patchShebangs $out/usr/bin/runescape-launcher
substituteInPlace $out/usr/bin/runescape-launcher \
--replace "unset XMODIFIERS" "$envVarsWithXmodifiers" \
--replace "/usr/share/games/runescape-launcher/runescape" "$out/share/games/runescape-launcher/runescape"
cp -r $out/usr/bin $out/
cp -r $out/usr/share $out/
rm -r $out/usr
'';
meta = with lib; {
description = "Launcher for RuneScape 3, the current main RuneScape";
homepage = "https://www.runescape.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [
grburst
iedame
];
platforms = [ "x86_64-linux" ];
};
};
in
/*
* We can patch the runescape launcher, but it downloads a client at runtime and checks it for changes.
* For that we need use a buildFHSEnv.
* FHS simulates a classic linux shell
*/
buildFHSEnv {
pname = "RuneScape";
inherit (runescape) version;
targetPkgs = pkgs: [
runescape
cairo
dpkg
gcc-unwrapped
glib
glibc
gtk2-x11
libGL
libpulseaudio
libSM
libXxf86vm
libX11
openssl_1_1
pango
SDL2
xdg-utils
xorg.libX11
xorg_sys_opengl
zlib
];
multiPkgs = pkgs: [ libGL ];
runScript = "runescape-launcher";
extraInstallCommands = ''
mkdir -p "$out/share/applications"
cp ${runescape}/share/applications/runescape-launcher.desktop "$out/share/applications"
cp -r ${runescape}/share/icons "$out/share/icons"
substituteInPlace "$out/share/applications/runescape-launcher.desktop" \
--replace "/usr/bin/runescape-launcher" "RuneScape"
'';
meta = with lib; {
description = "RuneScape Game Client (NXT) - Launcher for RuneScape 3";
homepage = "https://www.runescape.com/";
license = licenses.unfree;
maintainers = with maintainers; [
grburst
iedame
];
platforms = [ "x86_64-linux" ];
};
}

1685
pkgs/by-name/ru/runiq/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage {
pname = "runiq";
version = "2.0.0-unstable-2024-08-19";
src = fetchFromGitHub {
owner = "whitfin";
repo = "runiq";
rev = "a642926f6ec09d4faeebebb563d4aed89e0d36fb";
hash = "sha256-DWP0kbTjXlyUI/+bHgom9/XJ2XW/BJEU4xvIisPVug0=";
};
cargoLock.lockFile = ./Cargo.lock;
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
meta = with lib; {
description = "Efficient way to filter duplicate lines from input, à la uniq";
mainProgram = "runiq";
homepage = "https://github.com/whitfin/runiq";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,18 @@
--- runit-2.1.2/src/print-ar.sh
+++ runit-2.1.2/src/print-ar.sh
@@ -1,7 +1,7 @@
cat warn-auto.sh
echo 'main="$1"; shift'
echo 'rm -f "$main"'
-echo 'ar cr "$main" ${1+"$@"}'
+echo '$AR cr "$main" ${1+"$@"}'
case "`cat systype`" in
sunos-5.*) ;;
unix_sv*) ;;
@@ -10,5 +10,5 @@ case "`cat systype`" in
dgux-*) ;;
hp-ux-*) ;;
sco*) ;;
- *) echo 'ranlib "$main"' ;;
+ *) echo '$RANLIB "$main"' ;;
esac

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchurl,
# Build runit-init as a static binary
static ? false,
}:
stdenv.mkDerivation rec {
pname = "runit";
version = "2.2.0";
src = fetchurl {
url = "http://smarden.org/runit/${pname}-${version}.tar.gz";
sha256 = "sha256-le9NKGi5eMcXn+R5AeXFeOEc8nPSkr1iCL06fMsCkpA=";
};
patches = [
./fix-ar-ranlib.patch
];
outputs = [
"out"
"man"
];
sourceRoot = "admin/${pname}-${version}";
doCheck = true;
buildInputs = lib.optionals static [
stdenv.cc.libc
stdenv.cc.libc.static
];
postPatch = ''
sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h
# usernamespace sandbox of nix seems to conflict with runit's assumptions
# about unix users. Therefor skip the check
sed -i '/.\/chkshsgr/d' src/Makefile
''
+ lib.optionalString (!static) ''
sed -i 's,-static,,g' src/Makefile
'';
preBuild = ''
cd src
# Both of these are originally hard-coded to gcc
echo ${stdenv.cc.targetPrefix}cc > conf-cc
echo ${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.hostPlatform.isDarwin "-Xlinker -x "}> conf-ld
'';
installPhase = ''
mkdir -p $out/bin
cp -t $out/bin $(< ../package/commands)
mkdir -p $man/share/man
cp -r ../man $man/share/man/man8
'';
meta = with lib; {
description = "UNIX init scheme with service supervision";
license = licenses.bsd3;
homepage = "http://smarden.org/runit";
maintainers = with maintainers; [ joachifm ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
runitor,
}:
buildGoModule rec {
pname = "runitor";
version = "1.4.1";
vendorHash = "sha256-SYYAAtuWt/mTmZPBilYxf2uZ6OcgeTnobYiye47i8mI=";
src = fetchFromGitHub {
owner = "bdd";
repo = "runitor";
rev = "v${version}";
sha256 = "sha256-y4wIfal8aiVD5ZoRF6GnYUGRssBLMOPSWa40+3OU4y0=";
};
ldflags = [
"-s"
"-w"
"-X main.Version=v${version}"
];
passthru.tests.version = testers.testVersion {
package = runitor;
command = "runitor -version";
version = "v${version}";
};
# Unit tests require binding to local addresses for listening sockets.
__darwinAllowLocalNetworking = true;
meta = with lib; {
homepage = "https://bdd.fi/x/runitor";
description = "Command runner with healthchecks.io integration";
longDescription = ''
Runitor runs the supplied command, captures its output, and based on its exit
code reports successful or failed execution to https://healthchecks.io or your
private instance.
Healthchecks.io is a web service for monitoring periodic tasks. It's like a
dead man's switch for your cron jobs. You get alerted if they don't run on time
or terminate with a failure.
'';
license = licenses.bsd0;
maintainers = with maintainers; [ bdd ];
mainProgram = "runitor";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "runmd";
version = "1.4.1";
src = fetchFromGitHub {
owner = "broofa";
repo = "runmd";
tag = "v${finalAttrs.version}";
hash = "sha256-NaHBoRp6VuQwobpew7b1us8t2vbVPR4OLe3p3suykOw=";
};
npmDepsHash = "sha256-0djcoEq1O6zubD8OTFNE0BrOebSiw4JAXxa6flbHLb0=";
dontNpmBuild = true;
meta = {
description = "Executable markdown files";
homepage = "https://github.com/broofa/runmd";
changelog = "https://github.com/broofa/runmd/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "runmd";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,81 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nodejs,
python3,
runtimeShell,
stdenv,
testers,
runme,
}:
buildGoModule rec {
pname = "runme";
version = "3.15.2";
src = fetchFromGitHub {
owner = "runmedev";
repo = "runme";
rev = "v${version}";
hash = "sha256-NtFKzObi0mIdzhRiu7CCZ3e4yIhI2gHMtVsdf5TEb/s=";
};
vendorHash = "sha256-Uw5igaQpKKI4y7EoznFdmyTXfex350Pps6nt3lvKeAM=";
nativeBuildInputs = [
installShellFiles
];
nativeCheckInputs = [
nodejs
python3
];
subPackages = [
"."
];
ldflags = [
"-s"
"-w"
"-X=github.com/runmedev/runme/v3/internal/version.BuildDate=1970-01-01T00:00:00Z"
"-X=github.com/runmedev/runme/v3/internal/version.BuildVersion=${version}"
"-X=github.com/runmedev/runme/v3/internal/version.Commit=${src.rev}"
];
# checkFlags = [
# "-ldflags=-X=github.com/runmedev/runme/v3/internal/version.BuildVersion=${version}"
# ];
# tests fail to access /etc/bashrc on darwin
doCheck = !stdenv.hostPlatform.isDarwin;
postPatch = ''
substituteInPlace testdata/{flags/fmt,prompts/basic,runall/basic,script/basic,tags/categories}.txtar \
--replace-fail /bin/bash "${runtimeShell}"
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd runme \
--bash <($out/bin/runme completion bash) \
--fish <($out/bin/runme completion fish) \
--zsh <($out/bin/runme completion zsh)
'';
passthru.tests = {
version = testers.testVersion {
package = runme;
};
};
meta = {
description = "Execute commands inside your runbooks, docs, and READMEs";
mainProgram = "runme";
homepage = "https://runme.dev";
changelog = "https://github.com/runmedev/runme/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libX11,
}:
stdenv.mkDerivation {
pname = "runningx";
version = "1.0";
src = fetchurl {
url = "http://www.fiction.net/blong/programs/mutt/autoview/RunningX.c";
sha256 = "1mikkhrx6jsx716041qdy3nwjac08pxxvxyq2yablm8zg9hrip0d";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libX11 ];
dontUnpack = true;
buildPhase = ''
cc -O2 -o RunningX $(pkg-config --cflags --libs x11) $src
'';
installPhase = ''
mkdir -p "$out"/bin
cp -vai RunningX "$out/bin"
'';
meta = {
homepage = "http://www.fiction.net/blong/programs/mutt/";
description = "Program for testing if X is running";
license = lib.licenses.free;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.romildo ];
mainProgram = "RunningX";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "runpodctl";
version = "1.14.11";
src = fetchFromGitHub {
owner = "runpod";
repo = "runpodctl";
rev = "v${version}";
hash = "sha256-RXI1NAdEg5QypRDXg0NCpHLDrxcRCCS22KGnZyotXrI=";
};
vendorHash = "sha256-SaaHVaN2r3DhUk7sVizhRggYZRujd+e8qbpq0xOVD88=";
postInstall = ''
rm $out/bin/docs # remove the docs binary
'';
meta = {
homepage = "https://github.com/runpod/runpodctl";
description = "CLI tool to automate / manage GPU pods for runpod.io";
changelog = "https://github.com/runpod/runpodctl/raw/v${version}/CHANGELOG.md";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.georgewhewell ];
mainProgram = "runpodctl";
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
libiconv,
zlib,
autoreconfHook,
}:
stdenv.mkDerivation rec {
version = "1.4";
pname = "runzip";
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libiconv
zlib
];
src = fetchFromGitHub {
owner = "vlm";
repo = "zip-fix-filename-encoding";
rev = "v${version}";
sha256 = "0l5zbb5hswxczigvyal877j0aiq3fc01j3gv88bvy7ikyvw3lc07";
};
postPatch = ''
patchShebangs tests/check-runzip.sh
'';
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-int"
"-Wno-error=incompatible-pointer-types"
];
doCheck = true;
meta = {
description = "Tool to convert filename encoding inside a ZIP archive";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.unix;
mainProgram = "runzip";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "ruplacer";
version = "0.10.0";
src = fetchFromGitHub {
owner = "TankerHQ";
repo = "ruplacer";
rev = "v${version}";
sha256 = "sha256-Zvbb9pQpxbJZi0qcDU6f2jEgavl9cA7gIYU7NRXZ9fc=";
};
cargoHash = "sha256-Ko6EBASK6olMyp0kDY4wgfpH+5j9vq0dJ74l8K6HPGY=";
meta = {
description = "Find and replace text in source files";
mainProgram = "ruplacer";
homepage = "https://github.com/TankerHQ/ruplacer";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ Br1ght0ne ];
};
}

View File

@@ -0,0 +1,65 @@
{
stdenv,
lib,
fetchFromGitLab,
cmake,
extra-cmake-modules,
kdePackages,
qt6,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
name = "ruqola";
version = "2.5.1";
src = fetchFromGitLab {
domain = "invent.kde.org";
owner = "network";
repo = "ruqola";
tag = "v${finalAttrs.version}";
hash = "sha256-Oeea+IX2H9UvLZnq6X4AjwH5O4VPCg/RHRwohidPalo=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
qt6.wrapQtAppsHook
];
buildInputs = [
kdePackages.karchive
kdePackages.kcodecs
kdePackages.kcoreaddons
kdePackages.kcrash
kdePackages.ki18n
kdePackages.kiconthemes
kdePackages.kidletime
kdePackages.kio
kdePackages.knotifyconfig
kdePackages.kstatusnotifieritem
kdePackages.ktextaddons
kdePackages.ktextwidgets
kdePackages.kxmlgui
kdePackages.plasma-activities
kdePackages.prison
kdePackages.purpose
kdePackages.qtkeychain
kdePackages.sonnet
kdePackages.syntax-highlighting
qt6.qtbase
qt6.qtmultimedia
qt6.qtnetworkauth
qt6.qtwebsockets
];
passthru.updateScript = nix-update-script { };
meta = {
description = "KDE client for Rocket Chat";
homepage = "https://invent.kde.org/network/ruqola";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ lykos153 ];
mainProgram = "ruqola";
};
})

61
pkgs/by-name/ru/rure/Cargo.lock generated Normal file
View File

@@ -0,0 +1,61 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "libc"
version = "0.2.175"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
[[package]]
name = "memchr"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "regex"
version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
[[package]]
name = "rure"
version = "0.2.3"
dependencies = [
"libc",
"regex",
]

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
fixDarwinDylibNames,
haskellPackages,
}:
let
pin = lib.importJSON ./pin.json;
in
rustPlatform.buildRustPackage {
inherit (pin) pname version;
src = fetchCrate pin;
# upstream doesn't ship a Cargo.lock, is generated by the update script
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
cargoLock.lockFile = ./Cargo.lock;
outputs = [
"out"
"dev"
];
# Headers are not handled by cargo nor buildRustPackage
postInstall = ''
install -Dm644 include/rure.h -t "$dev/include"
'';
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
passthru = {
updateScript = ./update.sh;
tests.haskell-bindings = haskellPackages.regex-rure;
};
meta = {
description = "C API for Rust's regular expression library";
homepage = "https://crates.io/crates/rure";
license = [
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [ lib.maintainers.sternenseemann ];
};
}

View File

@@ -0,0 +1,5 @@
{
"pname": "rure",
"version": "0.2.3",
"hash": "sha256:0d8r0fv93ganqi9iyrgljbkvrvys33n0zrkaf11zsb23b2hwcsxa"
}

51
pkgs/by-name/ru/rure/update.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env nix-shell
#! nix-shell -p nix jq curl cargo rsync
#! nix-shell -i bash
set -eu
cd "$(dirname "$0")"
crate=rure
echo "Getting latest version from crates.io API" >&2
curlOpts=(
-H "Accept: application/json"
-H "User-Agent: $crate update script (https://github.com/nixos/nixpkgs/)"
)
version="$(curl "${curlOpts[@]}" "https://crates.io/api/v1/crates/$crate" \
| jq -r .crate.max_stable_version)"
echo "Prefetching latest tarball from crates.io" >&2
url="https://crates.io/api/v1/crates/$crate/$version/download"
prefetch="$(nix-prefetch-url --print-path --type sha256 --unpack "$url")"
cat > pin.json <<EOF
{
"pname": "$crate",
"version": "$version",
"hash": "sha256:$(printf '%s' "$prefetch" | head -n1)"
}
EOF
echo "Generating updated Cargo.lock" >&2
tmp="$(mktemp -d)"
cleanup() {
echo "Removing $tmp" >&2
rm -rf "$tmp"
}
trap cleanup EXIT
rsync -a --chmod=ugo=rwX "$(printf '%s' "$prefetch" | tail -n1)/" "$tmp"
pushd "$tmp"
cargo update
popd
cp "$tmp/Cargo.lock" ./Cargo.lock

View File

@@ -0,0 +1,20 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -201,7 +201,7 @@
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
add_library(ruri SHARED ${SOURCES})
- install (TARGETS ruri DESTINATION /usr/lib/)
+ install (TARGETS ruri)
else ()
# add the executable
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
@@ -215,7 +215,7 @@
VERBATIM
)
endif()
- install (TARGETS ruri DESTINATION /usr/bin/)
+ install (TARGETS ruri)
endif()
add_custom_target(

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
libcap,
libseccomp,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ruri";
version = "3.9.1";
src = fetchFromGitHub {
owner = "RuriOSS";
repo = "ruri";
tag = "v${finalAttrs.version}";
hash = "sha256-stM4hSLdSqmYUZ/XBD3Y1GylrrGRISlcy8LN07HREpQ=";
};
patches = [
./cmake-install.patch
];
buildInputs = [
libcap
libseccomp
];
nativeBuildInputs = [
cmake
];
meta = {
description = "Self-contained Linux container implementation";
homepage = "https://wiki.crack.moe/ruri";
downloadPage = "https://github.com/Moe-hacker/ruri";
changelog = "https://github.com/Moe-hacker/ruri/releases/tag/${finalAttrs.src.tag}";
mainProgram = "ruri";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.dabao1955 ];
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "rush-parallel";
version = "0.7.0";
src = fetchFromGitHub {
owner = "shenwei356";
repo = "rush";
rev = "v${version}";
hash = "sha256-5xuRA3Jf9SiNc6E/XBP9PCSA7vmioww0G5QkUAzHmEI=";
};
vendorHash = "sha256-zCloMhjHNkPZHYX1e1nx072IYbWHFWam4Af0l0s8a6M=";
ldflags = [
"-s"
"-w"
];
meta = {
description = "Cross-platform command-line tool for executing jobs in parallel";
homepage = "https://github.com/shenwei356/rush";
changelog = "https://github.com/shenwei356/rush/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kranzes ];
mainProgram = "rush-parallel";
};
}

View File

@@ -0,0 +1,67 @@
{
fetchurl,
lib,
stdenv,
bash,
perl,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "rush";
version = "2.4";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-Jm80iJq2pwO/CJCItSN8gUo5ThxRQsG0Z5TYVtWSEts=";
};
strictDeps = true;
buildInputs = [ bash ];
# Make sure that Rush looks for rush.rc in a directory that users can
# modify easily.
configureFlags = [ "--sysconfdir=/etc" ];
# Prevent “make install” from trying to copy something to
# /etc/rush.rc.
installFlags = [ "sysconfdir=$(out)/etc" ];
postInstall = ''
substituteInPlace $out/bin/rush-po \
--replace "exec perl" "exec ${lib.getExe perl}"
'';
doCheck = true;
meta = {
mainProgram = "rush";
broken = stdenv.hostPlatform.isDarwin;
description = "Restricted User Shell";
longDescription = ''
GNU Rush is a Restricted User Shell, designed for sites
providing limited remote access to their resources, such as
svn or git repositories, scp, or the like. Using a
sophisticated configuration file, Rush gives you complete
control over the command lines that users execute, as well as
over the usage of system resources, such as virtual memory,
CPU time, etc.
In particular, it allows remote programs to be run in a chrooted
environment, which is important with such programs as
sftp-server or scp, that lack this ability.
'';
homepage = "https://www.gnu.org/software/rush/";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
c4f3z1n
];
};
passthru = {
shellPath = "/bin/rush";
tests = { inherit (nixosTests) rush; };
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "russ";
version = "0.5.0";
src = fetchFromGitHub {
owner = "ckampfe";
repo = "russ";
rev = "b21aa80ebc9dc2668463386f9eb270b1782d5842";
hash = "sha256-/76CvSBYim831OZzLhsj2Hm+0hoY/FLtKQqt19E5YOI=";
};
cargoHash = "sha256-G2s/IggPXfi7FXOoM5s9I9PEphYHjEdg9W1LCAxIk1M=";
# tests are network based :(
doCheck = false;
meta = {
changelog = "https://github.com/ckampfe/russ/blob/master/CHANGELOG.md";
description = "TUI RSS reader with vim-like controls and a local-first, offline-first focus";
homepage = "https://github.com/ckampfe/russ";
license = with lib.licenses; [ agpl3Only ];
maintainers = with lib.maintainers; [ blusk ];
mainProgram = "russ";
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
cmake,
libiconv,
useMimalloc ? false,
doCheck ? true,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-analyzer-unwrapped";
version = "2025-08-25";
cargoHash = "sha256-G1R3IiKbQg1Dl6OFJSto0w4c18OUIrAPRiM/YStfkl0=";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "rust-analyzer";
rev = version;
hash = "sha256-apbJj2tsJkL2l+7Or9tJm1Mt5QPB6w/zIyDkCx8pfvk=";
};
cargoBuildFlags = [
"--bin"
"rust-analyzer"
"--bin"
"rust-analyzer-proc-macro-srv"
];
cargoTestFlags = [
"--package"
"rust-analyzer"
"--package"
"proc-macro-srv-cli"
];
# Code format check requires more dependencies but don't really matter for packaging.
# So just ignore it.
checkFlags = [ "--skip=tidy::check_code_formatting" ];
nativeBuildInputs = lib.optional useMimalloc cmake;
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
buildFeatures = lib.optional useMimalloc "mimalloc";
env.CFG_RELEASE = version;
inherit doCheck;
preCheck = lib.optionalString doCheck ''
export RUST_SRC_PATH=${rustPlatform.rustLibSrc}
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
versionOutput="$($out/bin/rust-analyzer --version)"
echo "'rust-analyzer --version' returns: $versionOutput"
[[ "$versionOutput" == "rust-analyzer ${version}" ]]
runHook postInstallCheck
'';
passthru = {
updateScript = nix-update-script { };
# FIXME: Pass overrided `rust-analyzer` once `buildRustPackage` also implements #119942
# FIXME: test script can't find rust std lib so hover doesn't return expected result
# https://github.com/NixOS/nixpkgs/pull/354304
# tests.neovim-lsp = callPackage ./test-neovim-lsp.nix { };
};
meta = with lib; {
description = "Modular compiler frontend for the Rust language";
homepage = "https://rust-analyzer.github.io";
license = with licenses; [
mit
asl20
];
maintainers = with maintainers; [ oxalica ];
mainProgram = "rust-analyzer";
};
}

View File

@@ -0,0 +1,75 @@
{
runCommand,
cargo,
neovim,
rust-analyzer,
rustc,
}:
runCommand "test-neovim-rust-analyzer"
{
nativeBuildInputs = [
cargo
neovim
rust-analyzer
rustc
];
testRustSrc = ''
fn main() {
let mut var = vec![None];
var.push(Some("hello".to_owned()));
}
'';
# NB. Wait for server done type calculations before sending `hover` request,
# otherwise it would return `{unknown}`.
# Ref: https://github.com/rust-lang/rust-analyzer/blob/7b11fdeb681c12002861b9804a388efde81c9647/docs/dev/lsp-extensions.md#server-status
nvimConfig = ''
local caps = vim.lsp.protocol.make_client_capabilities()
caps["experimental"] = { serverStatusNotification = true }
vim.lsp.buf_attach_client(vim.api.nvim_get_current_buf(), vim.lsp.start_client({
cmd = { "rust-analyzer" },
capabilities = caps,
handlers = {
["experimental/serverStatus"] = function(_, msg, ctx)
if msg.health == "ok" then
if msg.quiescent then
vim.cmd("goto 23") -- let mut |var =...
vim.lsp.buf.hover()
end
else
print("error: server status is not ok: ")
vim.cmd("q")
end
end,
["textDocument/hover"] = function(_, msg, ctx)
if msg then
-- Keep newlines.
io.write(msg.contents.value)
vim.cmd("q")
end
end,
},
on_error = function(code)
print("error: " .. code)
vim.cmd("q")
end
}))
'';
}
''
# neovim requires a writable HOME.
export HOME="$(pwd)"
cargo new --bin test-rust-analyzer
cd test-rust-analyzer
cat <<<"$testRustSrc" >src/main.rs
cat <<<"$nvimConfig" >script.lua
# `-u` doesn't work
result="$(nvim --headless +'lua dofile("script.lua")' src/main.rs)"
echo "$result"
[[ "$result" == *"var: Vec<Option<String>>"* ]]
touch $out
''

View File

@@ -0,0 +1,21 @@
{
rustPlatform,
runCommand,
makeWrapper,
rust-analyzer-unwrapped,
pname ? "rust-analyzer",
version ? rust-analyzer-unwrapped.version,
# Use name from `RUST_SRC_PATH`
rustSrc ? rustPlatform.rustLibSrc,
}:
runCommand "${pname}-${version}"
{
inherit pname version;
inherit (rust-analyzer-unwrapped) src meta;
nativeBuildInputs = [ makeWrapper ];
}
''
mkdir -p $out/bin
makeWrapper ${rust-analyzer-unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
--set-default RUST_SRC_PATH "${rustSrc}"
''

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-audit-info";
version = "0.5.2";
src = fetchCrate {
inherit pname version;
hash = "sha256-g7ElNehBAVSRRlqsxkNm20C0KOMkf310bXNs3EN+/NQ=";
};
cargoHash = "sha256-TvbFhFtdQ6fBNjIMgzQDVnK+IZThUJmht7r2zSmcllE=";
meta = with lib; {
description = "Command-line tool to extract the dependency trees embedded in binaries by cargo-auditable";
mainProgram = "rust-audit-info";
homepage = "https://github.com/rust-secure-code/cargo-auditable/tree/master/rust-audit-info";
license = with licenses; [
mit # or
asl20
];
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
cmake,
python3Packages,
# tests
firefox-unwrapped,
firefox-esr-unwrapped,
mesa,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-cbindgen";
version = "0.29.0";
src = fetchFromGitHub {
owner = "mozilla";
repo = "cbindgen";
rev = "v${version}";
hash = "sha256-wCl2GpHqF7wKIE8UFyZRY0M1hxonZek2FN6+5x/jGWI=";
};
cargoHash = "sha256-BErgOnmatxpfF5Ip44WOqnEWOzOJaVP6vfhXPsF9wuc=";
nativeCheckInputs = [
cmake
python3Packages.cython
];
checkFlags = [
# Disable tests that require rust unstable features
# https://github.com/eqrion/cbindgen/issues/338
"--skip test_expand"
"--skip test_bitfield"
"--skip lib_default_uses_debug_build"
"--skip lib_explicit_debug_build"
"--skip lib_explicit_release_build"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# WORKAROUND: test_body fails when using clang
# https://github.com/eqrion/cbindgen/issues/628
"--skip test_body"
];
passthru.tests = {
inherit
firefox-unwrapped
firefox-esr-unwrapped
mesa
;
};
meta = {
changelog = "https://github.com/mozilla/cbindgen/blob/v${version}/CHANGES";
description = "Project for generating C bindings from Rust code";
mainProgram = "cbindgen";
homepage = "https://github.com/mozilla/cbindgen";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-code-analysis";
version = "0.0.25";
src = fetchCrate {
pname = "rust-code-analysis-cli";
inherit version;
hash = "sha256-/Irmtsy1PdRWQ7dTAHLZJ9M0J7oi2IiJyW6HeTIDOCs=";
};
cargoHash = "sha256-HirLjKkfZfc9UmUcUF5WW7xAJuCu7ftJDH8+zTSYlxs=";
meta = with lib; {
description = "Analyze and collect metrics on source code";
homepage = "https://github.com/mozilla/rust-code-analysis";
license = with licenses; [
mit # grammars
mpl20 # code
];
maintainers = with maintainers; [ figsoda ];
mainProgram = "rust-code-analysis-cli";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-motd";
version = "2.1.0";
src = fetchFromGitHub {
owner = "rust-motd";
repo = "rust-motd";
rev = "v${version}";
hash = "sha256-06iWk0VobdHP94eNaEyQnIBx5YkoW0/IQQtUFWTkEe0=";
};
cargoHash = "sha256-f+441tEy1+AWXsz2Byrg0+Tz8jHcC1SD9WNZlkgWGZ4=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
OPENSSL_NO_VENDOR = 1;
meta = {
description = "Beautiful, useful MOTD generation with zero runtime dependencies";
homepage = "https://github.com/rust-motd/rust-motd";
changelog = "https://github.com/rust-motd/rust-motd/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "rust-motd";
};
}

View File

@@ -0,0 +1,49 @@
{
bash,
fetchFromGitHub,
lib,
rustPlatform,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-parallel";
version = "1.18.1";
src = fetchFromGitHub {
owner = "aaronriekenberg";
repo = "rust-parallel";
rev = "v${version}";
hash = "sha256-4f/JE8KWYDdLwx+bCSSbz0Cpfy/g3WIaRzqCvUix4t0=";
};
cargoHash = "sha256-wJtXYx2mncOnnUep4CMFt+1mK1vMyhYFCQM/2B9m6zY=";
postPatch = ''
substituteInPlace tests/dummy_shell.sh \
--replace "/bin/bash" "${bash}/bin/bash"
'';
checkFlags = [
"--skip=runs_echo_commands_dry_run"
"--skip=runs_regex_command_with_dollar_signs"
"--skip=runs_regex_from_command_line_args_nomatch_1"
"--skip=runs_regex_from_input_file_badline_j1"
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Rust shell tool to run commands in parallel with a similar interface to GNU parallel";
homepage = "https://github.com/aaronriekenberg/rust-parallel";
license = lib.licenses.mit;
mainProgram = "rust-parallel";
maintainers = with lib.maintainers; [ sedlund ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-petname";
version = "2.0.2";
src = fetchCrate {
inherit version;
crateName = "petname";
hash = "sha256-KP+GdGlwLHcKE8nAmFr2wHbt5RD9Ptpiz1X5HgJ6BgU=";
};
cargoHash = "sha256-gZxZeirvGHwm8C87HdCBYr30+0bbjwnWxIQzcLgl3iQ=";
meta = with lib; {
description = "Generate human readable random names";
homepage = "https://github.com/allenap/rust-petname";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
mainProgram = "petname";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-script";
version = "0.36.0";
src = fetchFromGitHub {
owner = "fornwall";
repo = "rust-script";
rev = version;
sha256 = "sha256-Bb8ULD2MmZiSW/Tx5vAAHv95OMJ0EdWgR+NFhBkTlDU=";
};
cargoHash = "sha256-kxnylNZ8FsaR2S1o/p7qtlaXsBLDNv2PsFye0rcf/+A=";
# tests require network access
doCheck = false;
meta = {
description = "Run Rust files and expressions as scripts without any setup or compilation step";
mainProgram = "rust-script";
homepage = "https://rust-script.org";
changelog = "https://github.com/fornwall/rust-script/releases/tag/${version}";
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with lib.maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
rustPlatform.buildRustPackage {
pname = "rust-stakeholder";
version = "0-unstable-2025-03-15";
src = fetchFromGitHub {
owner = "giacomo-b";
repo = "rust-stakeholder";
rev = "aacdccbed72be34e0231e6d15cecb6d87a9a5ef6";
hash = "sha256-YnXqvZlItCoAUEYUpRVQLM4fuLaf9Wd+OFY9ItSg25U=";
};
cargoHash = "sha256-NxO+7Wh8Ff6RPFtmbEa3EJszfDaZDXGWZDAoXPEAnpI=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Generate impressive-looking terminal output to look busy when stakeholders walk by";
homepage = "https://github.com/giacomo-b/rust-stakeholder";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.awwpotato ];
mainProgram = "rust-stakeholder";
};
}

View File

@@ -0,0 +1,56 @@
{
rustPlatform,
fetchFromGitHub,
fetchpatch,
pkg-config,
lib,
udev,
udevCheckHook,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-streamdeck";
version = "0.9.0";
src = fetchFromGitHub {
owner = "ryankurte";
repo = "rust-streamdeck";
tag = "v${version}";
hash = "sha256-9FuTnRQHKYJzMqhhgyTVq2R+drn4HAr3GDNjQgc3r+w=";
};
cargoPatches = [
(fetchpatch {
name = "add_cargo_lock.patch";
url = "https://github.com/ryankurte/rust-streamdeck/commit/d8497c34898daebafca21885f464f241c29ff9d7.patch";
hash = "sha256-cwt4nvtuME//t9KpHgIXHCwLQgpybs2CqV2jO02umfE=";
})
];
cargoHash = "sha256-OiXpG45jwWydbpRHnbIlECOaa75CzUOmdWxZ3WE5+hY=";
nativeBuildInputs = [
pkg-config
udevCheckHook
];
buildInputs = [ udev ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
postInstall = ''
install -Dm444 40-streamdeck.rules -t $out/lib/udev/rules.d/
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "ibusb based driver for Elgato StreamDeck devices";
homepage = "https://github.com/ryankurte/rust-streamdeck";
license = lib.licenses.mpl20;
maintainers = [ lib.maintainers.gdifolco ];
mainProgram = "streamdeck-cli";
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
rustPlatform,
python3,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-synapse-compress-state";
version = "0.1.4";
src = fetchFromGitHub {
owner = "matrix-org";
repo = "rust-synapse-compress-state";
rev = "v${version}";
hash = "sha256-nNQ/d4FFAvI+UY+XeqExyhngq+k+j5Pkz94ch27aoVM=";
};
cargoHash = "sha256-l8N6+xh0CbFKt4eEbSAvUJ5oHxhp5jf2YHLheYAegnU=";
cargoBuildFlags = [
"--all"
];
# Needed to get openssl-sys to use pkgconfig.
env.OPENSSL_NO_VENDOR = 1;
nativeBuildInputs = [
python3
pkg-config
];
buildInputs = [ openssl ];
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Tool to compress some state in a Synapse instance's database";
homepage = "https://github.com/matrix-org/rust-synapse-compress-state";
license = licenses.asl20;
maintainers = with maintainers; [
hexa
maralorn
];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
bzip2,
zstd,
}:
rustPlatform.buildRustPackage rec {
pname = "rust-traverse";
version = "2.0.0";
src = fetchFromGitHub {
owner = "dmcg310";
repo = "Rust-Traverse";
rev = "v${version}";
hash = "sha256-OcCWmBNDo4AA5Pk5TQqb8hen9LlHaY09Wrm4BkrU7qA=";
};
cargoHash = "sha256-UGPXV55+0w6QFYxfmmimSX/dleCdtEahveNi8DgSVzQ=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
bzip2
zstd
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
meta = with lib; {
description = "Terminal based file explorer";
homepage = "https://github.com/dmcg310/Rust-Traverse";
changelog = "https://github.com/dmcg310/Rust-Traverse/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "rt";
};
}

143
pkgs/by-name/ru/rustc-demangle/Cargo.lock generated Normal file
View File

@@ -0,0 +1,143 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "arbitrary"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
[[package]]
name = "cc"
version = "1.2.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f"
dependencies = [
"find-msvc-tools",
"jobserver",
"libc",
"shlex",
]
[[package]]
name = "cfg-if"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
[[package]]
name = "find-msvc-tools"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959"
[[package]]
name = "getrandom"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasi",
]
[[package]]
name = "jobserver"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
dependencies = [
"getrandom",
"libc",
]
[[package]]
name = "libc"
version = "0.2.176"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
[[package]]
name = "libfuzzer-sys"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404"
dependencies = [
"arbitrary",
"cc",
]
[[package]]
name = "r-efi"
version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "rustc-demangle"
version = "0.1.26"
dependencies = [
"rustc-std-workspace-core",
]
[[package]]
name = "rustc-demangle-capi"
version = "0.1.2"
dependencies = [
"rustc-demangle",
]
[[package]]
name = "rustc-demangle-fuzz"
version = "0.0.0"
dependencies = [
"libfuzzer-sys",
"rustc-demangle",
"rustc-demangle-native-c",
]
[[package]]
name = "rustc-demangle-native-c"
version = "0.1.0"
dependencies = [
"cc",
]
[[package]]
name = "rustc-std-workspace-core"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "wasi"
version = "0.14.7+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c"
dependencies = [
"wasip2",
]
[[package]]
name = "wasip2"
version = "1.0.1+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wit-bindgen"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"

View File

@@ -0,0 +1,49 @@
{
rustPlatform,
fetchFromGitHub,
lib,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "rustc-demangle";
version = "0.1.26";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "rustc-demangle";
tag = "rustc-demangle-v${version}";
hash = "sha256-4/x3kUIKi3xnDRznr+6xmPeWHmhlpbuwSNH3Ej6+Ifc=";
};
cargoLock = {
# generated using `cargo generate-lockfile` since repo is missing lockfile
lockFile = ./Cargo.lock;
};
cargoBuildFlags = [
"-p"
"rustc-demangle-capi"
];
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
postInstall = ''
mkdir -p $out/lib
cp target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/librustc_demangle${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib
cp -R crates/capi/include $out
'';
meta = {
description = "Rust symbol demangling";
homepage = "https://github.com/rust-lang/rustc-demangle";
license = with lib.licenses; [
asl20
mit
];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ _1000teslas ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "rustcat";
version = "3.0.0";
src = fetchFromGitHub {
owner = "robiot";
repo = "rustcat";
tag = "v${version}";
hash = "sha256-/6vNFh7n6WvYerrL8m9sgUKsO2KKj7/f8xc4rzHy9Io=";
};
cargoHash = "sha256-76/JK9IKYD6mxMddUyTgKAw53GM4EUhC0NbKFKdg8CI=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = [ "${placeholder "out"}/bin/rcat" ];
meta = {
description = "Port listener and reverse shell";
homepage = "https://github.com/robiot/rustcat";
changelog = "https://github.com/robiot/rustcat/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "rcat";
};
}

View File

@@ -0,0 +1,56 @@
#!@bash@
packagePath() {
jq --raw-output --arg name "$1" '.packages.[] | select(.name == $name) .rootUri | sub("file://"; "")' .dart_tool/package_config.json
}
# Runs a Dart executable from a package with a custom path.
#
# Usage:
# packageRunCustom <package> [executable] [bin_dir]
#
# By default, [bin_dir] is "bin", and [executable] is <package>.
# i.e. `packageRunCustom build_runner` is equivalent to `packageRunCustom build_runner build_runner bin`, which runs `bin/build_runner.dart` from the build_runner package.
packageRunCustom() {
local args=()
local passthrough=()
while [ $# -gt 0 ]; do
if [ "$1" != "--" ]; then
args+=("$1")
shift
else
shift
passthrough=("$@")
break
fi
done
local name="${args[0]}"
local path="${args[1]:-$name}"
local prefix="${args[2]:-bin}"
dart --packages=.dart_tool/package_config.json "$(packagePath "$name")/$prefix/$path.dart" "${passthrough[@]}"
}
# Runs a Dart executable from a package.
#
# Usage:
# packageRun <package> [-e executable] [...]
#
# To run an executable from an unconventional location, use packageRunCustom.
packageRun() {
local name="build_runner"
shift
local executableName="$name"
if [ "build_runner" = "-e" ]; then
shift
executableName="build_runner"
shift
fi
fileName="$(yq --raw-output --arg name "$executableName" '.executables.[$name] // $name' "$(packagePath "$name")/pubspec.yaml")"
packageRunCustom "$name" "$fileName" -- "$@"
}
packageRun build_runner "$@"

View File

@@ -0,0 +1,30 @@
{
buildDartApplication,
fetchFromGitHub,
lib,
flutter,
}:
buildDartApplication rec {
pname = "ffigen";
version = "8.0.2"; # According to https://github.com/rustdesk/rustdesk/blob/master/build.py#L173. We should use 5.0.1. But It can't run on flutter324. So I found another old version.
src = fetchFromGitHub {
owner = "dart-lang";
repo = "native";
tag = "ffigen-v${version}";
hash = "sha256-TUtgdT8huyo9sharIMHZ998UzzfMq2gj9Q9aspXYumU=";
};
postBuild = ''
mkdir -p $out/bin
ln -s ${flutter}/bin/dart $out/bin/dart
'';
sourceRoot = "${src.name}/pkgs/ffigen";
pubspecLock = lib.importJSON ./ffigen.pubspec.lock.json;
dartEntryPoints."bin/ffigen" = "bin/ffigen.dart";
meta.mainProgram = "ffigen";
meta.license = lib.licenses.bsd3;
}

View File

@@ -0,0 +1,527 @@
{
"packages": {
"_fe_analyzer_shared": {
"dependency": "transitive",
"description": {
"name": "_fe_analyzer_shared",
"sha256": "dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "80.0.0"
},
"analyzer": {
"dependency": "transitive",
"description": {
"name": "analyzer",
"sha256": "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.3.0"
},
"args": {
"dependency": "direct main",
"description": {
"name": "args",
"sha256": "bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.6.0"
},
"async": {
"dependency": "transitive",
"description": {
"name": "async",
"sha256": "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.13.0"
},
"boolean_selector": {
"dependency": "transitive",
"description": {
"name": "boolean_selector",
"sha256": "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.2"
},
"cli_util": {
"dependency": "direct main",
"description": {
"name": "cli_util",
"sha256": "ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.4.2"
},
"collection": {
"dependency": "transitive",
"description": {
"name": "collection",
"sha256": "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.19.1"
},
"convert": {
"dependency": "transitive",
"description": {
"name": "convert",
"sha256": "b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"coverage": {
"dependency": "transitive",
"description": {
"name": "coverage",
"sha256": "e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.11.1"
},
"crypto": {
"dependency": "transitive",
"description": {
"name": "crypto",
"sha256": "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.6"
},
"ffi": {
"dependency": "direct main",
"description": {
"name": "ffi",
"sha256": "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.3"
},
"file": {
"dependency": "direct main",
"description": {
"name": "file",
"sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.4"
},
"frontend_server_client": {
"dependency": "transitive",
"description": {
"name": "frontend_server_client",
"sha256": "f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.0"
},
"glob": {
"dependency": "direct main",
"description": {
"name": "glob",
"sha256": "c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.3"
},
"http_multi_server": {
"dependency": "transitive",
"description": {
"name": "http_multi_server",
"sha256": "aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.2"
},
"http_parser": {
"dependency": "transitive",
"description": {
"name": "http_parser",
"sha256": "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.1.2"
},
"io": {
"dependency": "transitive",
"description": {
"name": "io",
"sha256": "dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.5"
},
"js": {
"dependency": "transitive",
"description": {
"name": "js",
"sha256": "c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.7.1"
},
"lints": {
"dependency": "direct dev",
"description": {
"name": "lints",
"sha256": "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"logging": {
"dependency": "direct main",
"description": {
"name": "logging",
"sha256": "c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.0"
},
"matcher": {
"dependency": "transitive",
"description": {
"name": "matcher",
"sha256": "dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.12.17"
},
"meta": {
"dependency": "transitive",
"description": {
"name": "meta",
"sha256": "e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.16.0"
},
"mime": {
"dependency": "transitive",
"description": {
"name": "mime",
"sha256": "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.0"
},
"node_preamble": {
"dependency": "transitive",
"description": {
"name": "node_preamble",
"sha256": "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.2"
},
"package_config": {
"dependency": "direct main",
"description": {
"name": "package_config",
"sha256": "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"path": {
"dependency": "direct main",
"description": {
"name": "path",
"sha256": "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.9.1"
},
"pool": {
"dependency": "transitive",
"description": {
"name": "pool",
"sha256": "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.5.1"
},
"pub_semver": {
"dependency": "transitive",
"description": {
"name": "pub_semver",
"sha256": "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.5"
},
"quiver": {
"dependency": "direct main",
"description": {
"name": "quiver",
"sha256": "ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.2"
},
"shelf": {
"dependency": "transitive",
"description": {
"name": "shelf",
"sha256": "e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.2"
},
"shelf_packages_handler": {
"dependency": "transitive",
"description": {
"name": "shelf_packages_handler",
"sha256": "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.2"
},
"shelf_static": {
"dependency": "transitive",
"description": {
"name": "shelf_static",
"sha256": "c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.3"
},
"shelf_web_socket": {
"dependency": "transitive",
"description": {
"name": "shelf_web_socket",
"sha256": "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.0"
},
"source_map_stack_trace": {
"dependency": "transitive",
"description": {
"name": "source_map_stack_trace",
"sha256": "c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.2"
},
"source_maps": {
"dependency": "transitive",
"description": {
"name": "source_maps",
"sha256": "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.10.13"
},
"source_span": {
"dependency": "transitive",
"description": {
"name": "source_span",
"sha256": "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.10.1"
},
"stack_trace": {
"dependency": "transitive",
"description": {
"name": "stack_trace",
"sha256": "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.12.1"
},
"stream_channel": {
"dependency": "transitive",
"description": {
"name": "stream_channel",
"sha256": "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"string_scanner": {
"dependency": "transitive",
"description": {
"name": "string_scanner",
"sha256": "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.1"
},
"term_glyph": {
"dependency": "transitive",
"description": {
"name": "term_glyph",
"sha256": "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.2"
},
"test": {
"dependency": "direct dev",
"description": {
"name": "test",
"sha256": "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.25.15"
},
"test_api": {
"dependency": "transitive",
"description": {
"name": "test_api",
"sha256": "fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.7.4"
},
"test_core": {
"dependency": "transitive",
"description": {
"name": "test_core",
"sha256": "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.8"
},
"typed_data": {
"dependency": "transitive",
"description": {
"name": "typed_data",
"sha256": "f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.0"
},
"vm_service": {
"dependency": "transitive",
"description": {
"name": "vm_service",
"sha256": "ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "15.0.0"
},
"watcher": {
"dependency": "transitive",
"description": {
"name": "watcher",
"sha256": "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"web": {
"dependency": "transitive",
"description": {
"name": "web",
"sha256": "cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.0"
},
"web_socket": {
"dependency": "transitive",
"description": {
"name": "web_socket",
"sha256": "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.6"
},
"web_socket_channel": {
"dependency": "transitive",
"description": {
"name": "web_socket_channel",
"sha256": "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.2"
},
"webkit_inspection_protocol": {
"dependency": "transitive",
"description": {
"name": "webkit_inspection_protocol",
"sha256": "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.1"
},
"yaml": {
"dependency": "direct main",
"description": {
"name": "yaml",
"sha256": "b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.3"
},
"yaml_edit": {
"dependency": "direct main",
"description": {
"name": "yaml_edit",
"sha256": "fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.2"
}
},
"sdks": {
"dart": ">=3.5.0 <4.0.0"
}
}

View File

@@ -0,0 +1,13 @@
diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs
index 15ef310..f3ac940 100644
--- a/libs/hbb_common/src/lib.rs
+++ b/libs/hbb_common/src/lib.rs
@@ -218,7 +218,7 @@ pub fn gen_version() {
}
}
// generate build date
- let build_date = format!("{}", chrono::Local::now().format("%Y-%m-%d %H:%M"));
+ let build_date = "1970-01-01 00:00";
file.write_all(
format!("#[allow(dead_code)]\npub const BUILD_DATE: &str = \"{build_date}\";\n").as_bytes(),
)

View File

@@ -0,0 +1,257 @@
{
lib,
clangStdenv,
cargo,
copyDesktopItems,
fetchFromGitHub,
flutter,
ffmpeg,
gst_all_1,
fuse3,
libXtst,
libaom,
libopus,
libpulseaudio,
libva,
libvdpau,
libvpx,
libxkbcommon,
libyuv,
pam,
makeDesktopItem,
rustPlatform,
libayatana-appindicator,
rustc,
rustfmt,
xdotool,
xdg-user-dirs,
pipewire,
cargo-expand,
yq,
callPackage,
addDriverRunpath,
}:
let
flutterRustBridge = rustPlatform.buildRustPackage rec {
pname = "flutter_rust_bridge_codegen";
version = "1.80.1"; # https://github.com/rustdesk/rustdesk/blob/1.4.1/.github/workflows/bridge.yml#L10
src = fetchFromGitHub {
owner = "fzyzcjy";
repo = "flutter_rust_bridge";
rev = "v${version}";
hash = "sha256-SbwqWapJbt6+RoqRKi+wkSH1D+Wz7JmnVbfcfKkjt8Q=";
};
patches = [
./update-flutter-dev-path.patch
];
cargoHash = "sha256-4khuq/DK4sP98AMHyr/lEo1OJdqLujOIi8IgbKBY60Y=";
cargoBuildFlags = [
"--package"
"flutter_rust_bridge_codegen"
];
doCheck = false;
};
ffigen = callPackage ./ffigen {
inherit flutter;
};
sharedLibraryExt = rustc.stdenv.hostPlatform.extensions.sharedLibrary;
in
flutter.buildFlutterApplication rec {
pname = "rustdesk";
version = "1.4.1";
src = fetchFromGitHub {
owner = "rustdesk";
repo = "rustdesk";
tag = version;
fetchSubmodules = true;
hash = "sha256-nS8KjLzgdzgvn5mM1lJL2vFk0g/ZUZBvdkjyC+MdHDE=";
};
strictDeps = true;
env.VCPKG_ROOT = "/homeless-shelter"; # idk man, makes the build go since https://github.com/21pages/hwcodec/commit/1873c34e3da070a462540f61c0b782b7ab15dc84
# Configure the Flutter/Dart build
sourceRoot = "${src.name}/flutter";
# curl https://raw.githubusercontent.com/rustdesk/rustdesk/1.4.1/flutter/pubspec.lock | yq > pubspec.lock.json
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
dash_chat_2 = "sha256-J5Bc6CeCoRGN870aNEVJ2dkQNb+LOIZetfG2Dsfz5Ow=";
desktop_multi_window = "sha256-NOe0jMcH02c0TDTtv62OMTR/qDPnRQrRe73vXDuEq8Q=";
dynamic_layouts = "sha256-eFp1YVI6vI2HRgtE5nTqGZIylB226H0O8kuxy9ypuf8=";
flutter_gpu_texture_renderer = "sha256-EZa1FOMbcwdVs/m0vsUvlHv+MifPby4I97ZFe1bqmwQ=";
window_manager = "sha256-40mwj4D8W2xW8C7RshTjOhelOiLPM7uU9rsF4NvQn8c=";
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
texture_rgba_renderer = "sha256-V/bmT/5x+Bt7kdjLTkgkoXdBcFVXxPyp9kIUhf+Rnt4=";
uni_links = "sha256-O2BgNwu5HFRQyaNkskWHORx8pZhdwEjtljvw1+zFzfo=";
};
# Configure the Rust build
cargoRoot = "..";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
patches
;
hash = "sha256-ecLR6cMVDrTKeoTE5Yxkw5dN4ceAm+RD7BVXwIQ1fnk=";
};
dontCargoBuild = true;
cargoBuildFlags = "--lib";
cargoBuildType = "release";
cargoBuildFeatures = [
"flutter"
"hwcodec"
"linux-pkg-config"
];
nativeBuildInputs = [
# flutter_rust_bridge_codegen
cargo
copyDesktopItems
rustfmt
# Rust
rustPlatform.cargoSetupHook
rustPlatform.cargoBuildHook
cargo-expand
rustPlatform.bindgenHook
ffigen
yq
];
buildInputs = [
ffmpeg
fuse3
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
libXtst
libaom
libopus
libpulseaudio
libva
libvdpau
libvpx
pipewire
libxkbcommon
libyuv
pam
xdotool
];
prePatch = ''
chmod -R +w ..
cd ..
'';
patches = [
./make-build-reproducible.patch
];
prepareBuildRunner = ''
cp ${./build-runner.sh} build_runner
substituteInPlace build_runner \
--replace-fail "@bash@" "$SHELL"
chmod +x build_runner
export PATH=$PATH:$PWD
'';
postPatch = ''
cd flutter
if [ $cargoDepsCopy ]; then # That will be inherited to buildDartPackage and it doesn't have cargoDepsCopy
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${lib.getLib libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
# Disable static linking of ffmpeg since https://github.com/21pages/hwcodec/commit/1873c34e3da070a462540f61c0b782b7ab15dc84
sed -i 's/static=//g' $cargoDepsCopy/hwcodec-*/build.rs
fi
substituteInPlace ../Cargo.toml --replace-fail ", \"staticlib\", \"rlib\"" ""
'';
preBuild = ''
# Build the Flutter/Rust bridge bindings
cat <<EOF > bridge.yml
rust_input:
- "../src/flutter_ffi.rs"
dart_output:
- "./lib/generated_bridge.dart"
llvm_path:
- "${lib.getLib clangStdenv.cc.cc}"
dart_format_line_length: 80
llvm_compiler_opts: "-I ${lib.getLib clangStdenv.cc.cc}/lib/clang/${lib.versions.major clangStdenv.cc.version}/include -I ${clangStdenv.cc.libc_dev}/include"
EOF
runHook prepareBuildRunner
RUST_LOG=info ${flutterRustBridge}/bin/flutter_rust_bridge_codegen bridge.yml
# Build the Rust shared library
cd ..
preBuild=() # prevent loops
cargoBuildHook
mv ./target/*/release/liblibrustdesk${sharedLibraryExt} ./target/release/liblibrustdesk${sharedLibraryExt}
cd flutter
'';
postInstall = ''
mkdir -p $out/share/polkit-1/actions $out/share/icons/hicolor/{256x256,scalable}/apps
cp ../res/128x128@2x.png $out/share/icons/hicolor/256x256/apps/rustdesk.png
cp ../res/scalable.svg $out/share/icons/hicolor/scalable/apps/rustdesk.svg
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : ${addDriverRunpath.driverLink}/lib \
--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs ]}
'';
desktopItems = [
(makeDesktopItem {
name = "rustdesk";
desktopName = "RustDesk";
genericName = "Remote Desktop";
comment = "Remote Desktop";
exec = "rustdesk %u";
icon = "rustdesk";
terminal = false;
type = "Application";
startupNotify = true;
categories = [
"Network"
"RemoteAccess"
"GTK"
];
keywords = [ "internet" ];
actions.new-window = {
name = "Open a New Window";
exec = "rustdesk %u";
};
})
(makeDesktopItem {
name = "rustdesk-link";
desktopName = "RustDeskURL Scheme Handler";
noDisplay = true;
mimeTypes = [ "x-scheme-handler/rustdesk" ];
tryExec = "rustdesk";
exec = "rustdesk %u";
icon = "rustdesk";
terminal = false;
type = "Application";
startupNotify = false;
})
];
meta = {
description = "Virtual / remote desktop infrastructure for everyone! Open source TeamViewer / Citrix alternative";
homepage = "https://rustdesk.com";
changelog = "https://github.com/rustdesk/rustdesk/releases/${version}";
license = lib.licenses.agpl3Only;
teams = [ lib.teams.helsinki-systems ];
mainProgram = "rustdesk";
platforms = lib.platforms.linux; # should work on darwin as well but I have no machine to test with
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
diff --git a/frb_codegen/src/commands.rs b/frb_codegen/src/commands.rs
index 91b05ca..41aba36 100644
--- a/frb_codegen/src/commands.rs
+++ b/frb_codegen/src/commands.rs
@@ -174,8 +174,6 @@ fn ffigen(
let repo = DartRepository::from_str(dart_root).unwrap();
let res = command_run!(
call_shell[Some(dart_root)],
- *repo.toolchain.as_run_command(),
- "run",
"ffigen",
"--config",
config_file.path()
@@ -229,8 +227,6 @@ pub fn build_runner(dart_root: &str) -> Result {
let repo = DartRepository::from_str(dart_root).unwrap();
let out = command_run!(
call_shell[Some(dart_root)],
- *repo.toolchain.as_run_command(),
- "run",
"build_runner",
"build",
"--delete-conflicting-outputs",
--
2.47.1

View File

@@ -0,0 +1,56 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libsodium,
sqlite,
nix-update-script,
testers,
rustdesk-server,
}:
rustPlatform.buildRustPackage rec {
pname = "rustdesk-server";
version = "1.1.14";
src = fetchFromGitHub {
owner = "rustdesk";
repo = "rustdesk-server";
tag = version;
hash = "sha256-5LRMey1cxmjLg1s9RtVwgPjHjwYLSQHa6Tyv7r/XEQs=";
fetchSubmodules = true;
};
cargoHash = "sha256-U1LTnqi2iEsm2U7t0Fr4VJWLo1MdQmeTKrPsNqRWap0=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libsodium
sqlite
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
inherit version;
package = rustdesk-server;
command = "hbbr --version";
};
};
meta = {
description = "RustDesk Server Program";
homepage = "https://github.com/rustdesk/rustdesk-server";
changelog = "https://github.com/rustdesk/rustdesk-server/releases/tag/${version}";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
gaelreyrol
tjni
];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs
index 15ef310..f3ac940 100644
--- a/libs/hbb_common/src/lib.rs
+++ b/libs/hbb_common/src/lib.rs
@@ -218,7 +218,7 @@ pub fn gen_version() {
}
}
// generate build date
- let build_date = format!("{}", chrono::Local::now().format("%Y-%m-%d %H:%M"));
+ let build_date = "1970-01-01 00:00";
file.write_all(
format!("#[allow(dead_code)]\npub const BUILD_DATE: &str = \"{build_date}\";\n").as_bytes(),
)

View File

@@ -0,0 +1,148 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
wrapGAppsHook3,
atk,
bzip2,
cairo,
dbus,
gdk-pixbuf,
glib,
gst_all_1,
gtk3,
libayatana-appindicator,
libgit2,
libpulseaudio,
libsodium,
libXtst,
libvpx,
libyuv,
libopus,
libaom,
libxkbcommon,
libsciter,
xdotool,
pam,
pango,
zlib,
zstd,
stdenv,
alsa-lib,
makeDesktopItem,
copyDesktopItems,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rustdesk";
version = "1.4.2";
src = fetchFromGitHub {
owner = "rustdesk";
repo = "rustdesk";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-ZUk/6r7HjlWAU7sUxbBxp9ZtxXUJftjcDy/V3LcMNPA=";
};
cargoHash = "sha256-b0jsW0208zKFMyoqKti8TuTNZL7hQ8PX7Gwm0faW4po=";
patches = [
./make-build-reproducible.patch
];
desktopItems = [
(makeDesktopItem {
name = "rustdesk";
exec = finalAttrs.meta.mainProgram;
icon = "rustdesk";
desktopName = "RustDesk";
comment = finalAttrs.meta.description;
genericName = "Remote Desktop";
categories = [ "Network" ];
mimeTypes = [ "x-scheme-handler/rustdesk" ];
})
];
nativeBuildInputs = [
copyDesktopItems
pkg-config
rustPlatform.bindgenHook
wrapGAppsHook3
];
buildFeatures = lib.optionals stdenv.hostPlatform.isLinux [ "linux-pkg-config" ];
# Checks require an active X server
doCheck = false;
buildInputs = [
atk
bzip2
cairo
dbus
gdk-pixbuf
glib
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
gtk3
libgit2
libpulseaudio
libsodium
libXtst
libvpx
libyuv
libopus
libaom
libxkbcommon
pam
pango
zlib
zstd
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
xdotool
];
# Add static ui resources and libsciter to same folder as binary so that it
# can find them.
postInstall = ''
mkdir -p $out/{share/src,lib/rustdesk}
# .so needs to be next to the executable
mv $out/bin/rustdesk $out/lib/rustdesk
${lib.optionalString stdenv.hostPlatform.isLinux "ln -s ${libsciter}/lib/libsciter-gtk.so $out/lib/rustdesk"}
makeWrapper $out/lib/rustdesk/rustdesk $out/bin/rustdesk \
--chdir "$out/share"
cp -a $src/src/ui $out/share/src
install -Dm0644 $src/res/logo.svg $out/share/icons/hicolor/scalable/apps/rustdesk.svg
'';
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf --add-rpath "${libayatana-appindicator}/lib" "$out/lib/rustdesk/rustdesk"
'';
env = {
SODIUM_USE_PKG_CONFIG = true;
ZSTD_SYS_USE_PKG_CONFIG = true;
};
meta = {
description = "Virtual / remote desktop infrastructure for everyone! Open source TeamViewer / Citrix alternative";
homepage = "https://rustdesk.com";
changelog = "https://github.com/rustdesk/rustdesk/releases/tag/${finalAttrs.version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
ocfox
leixb
];
mainProgram = "rustdesk";
badPlatforms = lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
rustPlatform,
cmake,
openssl,
pkg-config,
}:
rustPlatform.buildRustPackage rec {
pname = "rustdress";
version = "0.5.2";
src = fetchFromGitHub {
owner = "niteshbalusu11";
repo = "rustdress";
tag = "v${version}";
hash = "sha256-XEXvAAnktr7gfk3y8kLtrVmg0slx5wc4dCCWT2r+Wj0=";
};
cargoHash = "sha256-COuHTjEy/VkfVd2/kjTKw1kiJI0XC72TEXaS8lVXsAQ=";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
openssl
];
meta = {
description = "Self-hosted Lightning Address Server";
homepage = "https://github.com/niteshbalusu11/rustdress";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jordan-bravo ];
mainProgram = "rustdress";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "rustfinity";
version = "0.2.14";
src = fetchCrate {
inherit pname version;
hash = "sha256-Oh+AEgmBhlOQaCFECheuHCXT6hndpUnZH/l+tWMp2RQ=";
};
cargoHash = "sha256-e1RnPqfgeyeEh8Av81RTuaMgYc6zoBZcygbc29DNKqE=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
OPENSSL_NO_VENDOR = 1;
# Requires network and fs access
checkFlags = [
"--skip=challenge::tests::test_challenge_exists"
"--skip=crates_io::tests::test_get_latest_version"
"--skip=dir::tests::test_get_current_dir"
"--skip=download::tests::download_file::test_downloads_file"
"--skip=download::tests::download_file::test_renames_starter"
];
meta = {
description = "CLI for Rustfinity challenges solving";
homepage = "https://github.com/dcodesdev/rustfinity.com/tree/main/crates/cli";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nartsiss ];
mainProgram = "rustfinity";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rusti-cal";
version = "1.1.0";
src = fetchFromGitHub {
owner = "arthurhenrique";
repo = "rusti-cal";
rev = "v${version}";
hash = "sha256-pdsP2nuJh30BzqIyxSQXak/rceA4hI9jBYy1dDVEIvI=";
};
cargoHash = "sha256-9nd8xm3jAFouRYKSFpx3vQQaI/2wQzTaaehXjqljIfw=";
meta = with lib; {
description = "Minimal command line calendar, similar to cal";
mainProgram = "rusti-cal";
homepage = "https://github.com/arthurhenrique/rusti-cal";
license = [ licenses.mit ];
maintainers = [ maintainers.detegr ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rustic";
version = "0.10.0";
src = fetchFromGitHub {
owner = "rustic-rs";
repo = "rustic";
tag = "v${version}";
hash = "sha256-KyJce0pTTpPv3K0WXWQv2MPx8dDGhUVYEIjTeYH1KPY=";
};
cargoHash = "sha256-Axiq1Yu5pg3fZ/E8aYFGAuPi3KVIlotQ2TZs0pczG+4=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd rustic \
--bash <($out/bin/rustic completions bash) \
--fish <($out/bin/rustic completions fish) \
--zsh <($out/bin/rustic completions zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/rustic-rs/rustic";
changelog = "https://github.com/rustic-rs/rustic/blob/${src.rev}/CHANGELOG.md";
description = "Fast, encrypted, deduplicated backups powered by pure Rust";
mainProgram = "rustic";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
license = [
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [
lib.maintainers.nobbz
lib.maintainers.pmw
];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rustical";
version = "0.9.11";
src = fetchFromGitHub {
owner = "lennart-k";
repo = "rustical";
tag = "v${finalAttrs.version}";
hash = "sha256-XDnhHgswje335c3OHR/cUO9qtOj1MQBYvAsoH5coiDY=";
};
cargoHash = "sha256-MevmHEdkczL4CcQpjdvv21rvnCmbnSr37Ny6G0kodag=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
env.OPENSSL_NO_VENDOR = true;
meta = {
description = "Yet another calendar server aiming to be simple, fast and passwordless";
homepage = "https://github.com/lennart-k/rustical";
changelog = "https://github.com/lennart-k/rustical/releases/tag/v${finalAttrs.version}";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ PopeRigby ];
mainProgram = "rustical";
};
})

View File

@@ -0,0 +1,58 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
cargo,
rustc,
clippy,
gcc,
makeWrapper,
}:
let
pname = "rustlings";
version = "6.5.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "rust-lang";
repo = "rustlings";
rev = "v${version}";
hash = "sha256-dUQIzNPxmKbhew9VjFIW7bY0D1IkuJ5+hRY2/CwmYhY=";
};
cargoHash = "sha256-AvwulWEqZMywaG7lEmT8nn9s2hda+bbIV1rnVXnKH8o=";
# Disabled test that does not work well in an isolated environment
checkFlags = [
"--skip=run_compilation_success"
"--skip=run_test_success"
"--skip=init"
];
nativeBuildInputs = [
pkg-config
makeWrapper
];
postFixup = ''
wrapProgram $out/bin/rustlings --suffix PATH : ${
lib.makeBinPath [
cargo
rustc
clippy
gcc
]
}
'';
meta = {
description = "Explore the Rust programming language and learn more about it while doing exercises";
homepage = "https://rustlings.cool/";
changelog = "https://github.com/rust-lang/rustlings/releases";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "rustlings";
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchFromGitHub,
cargo,
rustPlatform,
cargo-c,
validatePkgConfig,
rust,
libiconv,
curl,
apacheHttpd,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rustls-ffi";
version = "0.15.0";
src = fetchFromGitHub {
owner = "rustls";
repo = "rustls-ffi";
tag = "v${finalAttrs.version}";
hash = "sha256-m92kWH+J8wuGmI0msrp2aginY1K51iqgi3+u4ncmfts=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-gqc6en59QQpD14hOgRuGEPWLvrkyGn9tPR9vQmRAxIg=";
};
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
cargo-c
validatePkgConfig
];
buildPhase = ''
runHook preBuild
${rust.envVars.setEnv} cargo cbuild -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
runHook postBuild
'';
installPhase = ''
runHook preInstall
${rust.envVars.setEnv} cargo cinstall -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
runHook postInstall
'';
checkPhase = ''
runHook preCheck
${rust.envVars.setEnv} cargo ctest -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
runHook postCheck
'';
passthru.tests = {
curl = curl.override {
opensslSupport = false;
rustlsSupport = true;
rustls-ffi = finalAttrs.finalPackage;
};
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = with lib; {
description = "C-to-rustls bindings";
homepage = "https://github.com/rustls/rustls-ffi/";
pkgConfigModules = [ "rustls" ];
license = with lib.licenses; [
mit
asl20
isc
];
maintainers = [ maintainers.lesuisse ];
};
})

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
llvmPackages,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
nixosTests,
}:
let
version = "0.2.1";
target = stdenv.hostPlatform.rust.rustcTargetSpec;
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
in
rustPlatform.buildRustPackage {
pname = "rustls-libssl";
inherit version;
src = fetchFromGitHub {
owner = "rustls";
repo = "rustls-openssl-compat";
rev = "v/${version}";
hash = "sha256-/QSFrkFVSRBmpXHc80dJFnYwvVYceAFnoCtmAGtnmqo=";
};
# NOTE: No longer necessary in the next release.
sourceRoot = "source/rustls-libssl";
cargoHash = "sha256-eVdcYJnJVduRk3zK9VQ1rE6AwjaXAG1h1g/fVHr4mqQ=";
nativeBuildInputs = [
pkg-config # for openssl-sys
llvmPackages.lld # build.rs specifies LLD as linker
];
buildInputs = [
openssl
];
preCheck = ''
# tests dlopen libcrypto.so.3
export LD_LIBRARY_PATH=${lib.makeLibraryPath [ openssl ]}
'';
# rustls-libssl normally wants to be swapped in for libssl, and reuses
# libcrypto. Here, we accomplish something similar by symlinking most of
# OpenSSL, replacing only libssl.
outputs = [
"out"
"dev"
];
installPhase = ''
mkdir -p $out/lib $dev/lib/pkgconfig
mv target/${target}/release/libssl${libExt} $out/lib/libssl${libExt}.3
ln -s libssl${libExt}.3 $out/lib/libssl${libExt}
ln -s ${openssl.out}/lib/libcrypto${libExt}.3 $out/lib/
ln -s libcrypto${libExt}.3 $out/lib/libcrypto${libExt}
if [[ -e ${openssl.out}/lib/engines-3 ]]; then
ln -s ${openssl.out}/lib/engines-3 $out/lib/
fi
if [[ -e ${openssl.out}/lib/ossl-modules ]]; then
ln -s ${openssl.out}/lib/ossl-modules $out/lib/
fi
ln -s ${openssl.dev}/include $dev/
cp ${openssl.dev}/lib/pkgconfig/*.pc $dev/lib/pkgconfig/
sed -i \
-e "s|${openssl.out}|$out|g" \
-e "s|${openssl.dev}|$dev|g" \
$dev/lib/pkgconfig/*.pc
'';
passthru.tests = nixosTests.rustls-libssl;
meta = {
description = "Partial reimplementation of the OpenSSL 3 libssl ABI using rustls";
homepage = "https://github.com/rustls/rustls-openssl-compat";
changelog = "https://github.com/rustls/rustls-openssl-compat/releases";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
stephank
cpu
];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "rustmission";
version = "0.5.1";
src = fetchFromGitHub {
owner = "intuis";
repo = "rustmission";
rev = "v${version}";
hash = "sha256-vQ6MBbzmOBgD1kcF62NmQys737QEN9isvFN7L7mP8mk=";
};
cargoHash = "sha256-GwSf/o90RO6LURIcm/kYA8oXmnCJ1OkM+eHkyZduOt0=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
# There is no tests
doCheck = false;
meta = {
description = "TUI for the Transmission daemon";
homepage = "https://github.com/intuis/rustmission";
changelog = "https://github.com/intuis/rustmission/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
mainProgram = "rustmission";
maintainers = with lib.maintainers; [ anas ];
platforms = with lib.platforms; unix ++ windows;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/thirdparty/ffmpeg-decoder-rs/Cargo.toml b/thirdparty/ffmpeg-decoder-rs/Cargo.toml
index 9db9ac9..4546253 100644
--- a/thirdparty/ffmpeg-decoder-rs/Cargo.toml
+++ b/thirdparty/ffmpeg-decoder-rs/Cargo.toml
@@ -20,7 +20,7 @@ default = []
rodio_source = ['rodio']
[dependencies]
-ffmpeg-sys-next = { git="https://github.com/KetaDotCC/rust-ffmpeg-sys.git", branch="master", default-features=false, features=["avcodec", "avformat", "swresample", "static"] }
+ffmpeg-sys-next = { git="https://github.com/KetaDotCC/rust-ffmpeg-sys.git", branch="master", default-features=false, features=["avcodec", "avformat", "swresample"] }
thiserror = "1.0"
log = "0.4"

View File

@@ -0,0 +1,51 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
alsa-lib,
ffmpeg_6,
}:
rustPlatform.buildRustPackage {
pname = "rustplayer";
version = "1.1.2-unstable-2024-07-14";
src = fetchFromGitHub {
owner = "Kingtous";
repo = "RustPlayer";
rev = "29a16f01912bc3e92008c7ae2f9569c8d7250bd3";
hash = "sha256-+36dLp54rfNK0lSSTG5+J6y51NUtBhtwfhD7L23J5aY=";
};
# This patch is from the source
patches = [
./dynamic-lib.patch
];
cargoHash = "sha256-cfr5q44SzJ5iYm8cu/3+RkoPaoUklmOV/UbSdZZbu38=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
alsa-lib
openssl
ffmpeg_6
];
checkFlags = [
# network required
"--skip=fetch_and_play"
];
meta = with lib; {
homepage = "https://github.com/Kingtous/RustPlayer";
description = "Local audio player and network m3u8 radio player using a terminal interface";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
rustPlatform,
fetchFromGitHub,
python3,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rustpython";
version = "0.4.0";
src = fetchFromGitHub {
owner = "RustPython";
repo = "RustPython";
tag = version;
hash = "sha256-BYYqvPJu/eFJ9lt07A0p7pd8pGFccUe/okFqGEObhY4=";
};
cargoHash = "sha256-LuxET01n5drYmPXXhCl0Cs9yoCQKwWah8FWfmKmLdsg=";
# freeze the stdlib into the rustpython binary
cargoBuildFlags = [ "--features=freeze-stdlib" ];
nativeCheckInputs = [ python3 ];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Python 3 interpreter in written Rust";
homepage = "https://rustpython.github.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ prusnak ];
mainProgram = "rustpython";
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
nmap,
perl,
python3,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "rustscan";
version = "2.4.1";
src = fetchFromGitHub {
owner = "RustScan";
repo = "RustScan";
tag = version;
hash = "sha256-+qPSeDpOeCq+KwZb5ANXx6z+pYbgdT1hVgcrSzxyGp0=";
};
cargoHash = "sha256-cUuInYCT2jzen9gswfFGtKum6w2X/SiKA2ccdmxk38A=";
postPatch = ''
substituteInPlace src/scripts/mod.rs \
--replace-fail 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
patchShebangs fixtures/.rustscan_scripts/*
'';
nativeCheckInputs = [
perl
python3
];
checkFlags = [
# These tests require network access
"--skip=parse_correct_host_addresses"
"--skip=parse_hosts_file_and_incorrect_hosts"
"--skip=resolver_args_google_dns"
"--skip=resolver_default_cloudflare"
];
meta = {
description = "Faster Nmap Scanning with Rust";
homepage = "https://github.com/RustScan/RustScan";
changelog = "https://github.com/RustScan/RustScan/releases/tag/${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "rustscan";
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
pkg-config,
openssl,
rdkafka,
}:
let
pname = "rustus";
version = "1.1.3";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "s3rius";
repo = "rustus";
tag = version;
hash = "sha256-ALnb6ICg+TZRuHayhozwJ5+imabgjBYX4W42ydhkzv0=";
};
cargoHash = "sha256-df92+gp/DtdHwPxJF89zKHjmVWzfrjnD8wAlrPRyyxk=";
env.OPENSSL_NO_VENDOR = 1;
# needed to dynamically link rdkafka
CARGO_FEATURE_DYNAMIC_LINKING = 1;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
rdkafka
];
passthru.updateScript = nix-update-script { };
checkFlags = [
# tries to make a network access
"--skip=data_storage::impls::s3_storage::test::test_successfull_create_upload"
"--skip=data_storage::impls::s3_storage::test::test_successfull_delete"
"--skip=data_storage::impls::s3_storage::test::test_successfull_mime"
"--skip=data_storage::impls::s3_storage::test::test_successfull_upload"
"--skip=info_storage::impls::redis_storage::tests::deletion_success"
"--skip=info_storage::impls::redis_storage::tests::success"
"--skip=notifiers::impls::amqp_notifier::tests::success"
"--skip=notifiers::impls::http_notifier::tests::forwarded_header"
"--skip=notifiers::impls::http_notifier::tests::success_request"
"--skip=notifiers::impls::http_notifier::tests::timeout_request"
"--skip=notifiers::impls::http_notifier::tests::unknown_url"
"--skip=notifiers::impls::kafka_notifier::test::simple_success_on_prefix"
"--skip=notifiers::impls::kafka_notifier::test::simple_success_on_topic"
];
meta = {
description = "TUS protocol implementation in Rust";
mainProgram = "rustus";
homepage = "https://s3rius.github.io/rustus/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ happysalada ];
platforms = lib.platforms.all;
};
}

1104
pkgs/by-name/ru/rusty-bash/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rusty-bash";
version = "1.2.2";
src = fetchFromGitHub {
owner = "shellgei";
repo = "rusty_bash";
tag = "v${finalAttrs.version}";
hash = "sha256-WBV0wF7SKhOKAo+F1IImpPIgLvo9GYkqWrb2GluUtdA=";
};
postPatch = ''
cp ${./Cargo.lock} ./Cargo.lock
'';
cargoLock.lockFile = ./Cargo.lock;
passthru.shellPath = "/bin/sush";
meta = {
description = "Bash written with Rust, a.k.a. sushi shell";
homepage = "https://github.com/shellgei/rusty_bash";
license = lib.licenses.bsd3;
mainProgram = "sush";
maintainers = with lib.maintainers; [ aleksana ];
};
})

View File

@@ -0,0 +1,30 @@
{
fetchFromGitLab,
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "rusty-diceware";
version = "0.5.8";
src = fetchFromGitLab {
owner = "yuvallanger";
repo = "rusty-diceware";
rev = "diceware-v${version}";
hash = "sha256-GDWvHHl4EztTaR0jI4XL1I9qE2KSL+q9C8IvLWQF4Ys=";
};
cargoHash = "sha256-f+jvrokt5kuHYKKfluu4OvI7dzp9rFPlTo4KC4jKb0o=";
doCheck = true;
meta = {
description = "Commandline diceware, with or without dice, written in Rustlang";
homepage = "https://gitlab.com/yuvallanger/rusty-diceware";
changelog = "https://gitlab.com/yuvallanger/rusty-diceware/-/blob/v${version}/CHANGELOG.md?ref_type=heads";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ cherrykitten ];
mainProgram = "diceware";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromSourcehut,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rusty-man";
version = "0.5.0";
src = fetchFromSourcehut {
owner = "~ireas";
repo = "rusty-man";
rev = "v${finalAttrs.version}";
hash = "sha256-djprzmogT1OEf0/+twdxzx30YaMNzFjXkZd4IDsH8oo=";
};
cargoHash = "sha256-ZIRwp5AJugMDxg3DyFIH5VlD0m4Si2tJdspKE5QEB4M=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line viewer for documentation generated by rustdoc";
mainProgram = "rusty-man";
homepage = "https://git.sr.ht/~ireas/rusty-man";
changelog = "https://git.sr.ht/~ireas/rusty-man/tree/v${finalAttrs.version}/item/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
defelo
];
};
})

View File

@@ -0,0 +1,101 @@
{
lib,
rustPlatform,
fetchFromGitHub,
makeDesktopItem,
copyDesktopItems,
pkg-config,
cmake,
fontconfig,
glib,
gtk3,
freetype,
openssl,
xorg,
libGL,
libxkbcommon,
wayland,
withGui ? false, # build GUI version
}:
rustPlatform.buildRustPackage rec {
pname = "rusty-psn";
version = "0.5.9";
src = fetchFromGitHub {
owner = "RainbowCookie32";
repo = "rusty-psn";
tag = "v${version}";
hash = "sha256-Al0cT4WaOX7gxOkD5ciRntbGLCCDFSjj83E4n8nXp6I=";
};
cargoHash = "sha256-FaKUQk/Q2hE0lZ11QSKA2P2BLlBNih47zzuwpMsblhw=";
# Tests require network access
doCheck = false;
nativeBuildInputs = [
pkg-config
]
++ lib.optionals withGui [
copyDesktopItems
cmake
];
buildInputs = [
openssl
]
++ lib.optionals withGui [
fontconfig
glib
gtk3
freetype
openssl
xorg.libxcb
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libxcb
libGL
libxkbcommon
wayland
];
buildNoDefaultFeatures = true;
buildFeatures = [ (if withGui then "egui" else "cli") ];
postFixup = ''
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/bin/rusty-psn
''
+ lib.optionalString withGui ''
mv $out/bin/rusty-psn $out/bin/rusty-psn-gui
'';
desktopItem = lib.optionalString withGui (makeDesktopItem {
name = "rusty-psn";
desktopName = "rusty-psn";
exec = "rusty-psn-gui";
comment = "A simple tool to grab updates for PS3 games, directly from Sony's servers using their updates API.";
categories = [
"Network"
];
keywords = [
"psn"
"ps3"
"sony"
"playstation"
"update"
];
});
desktopItems = lib.optionals withGui [ desktopItem ];
meta = {
description = "Simple tool to grab updates for PS3 games, directly from Sony's servers using their updates API";
homepage = "https://github.com/RainbowCookie32/rusty-psn/";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ AngryAnt ];
mainProgram = if withGui then "rusty-psn-gui" else "rusty-psn";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "rustycli";
version = "0.1.1";
src = fetchCrate {
inherit pname version;
hash = "sha256-4Txw6Cmwwgu7K8VIVoX9GR76VUqAEw6uYptmczbjqg0=";
};
cargoHash = "sha256-QjkUiPwjG25NsvAXM3jqQVtJzYiXhzVqFaDN1b7DXDE=";
# some examples fail to compile
cargoTestFlags = [ "--tests" ];
meta = {
description = "Access the rust playground right in terminal";
mainProgram = "rustycli";
homepage = "https://github.com/pwnwriter/rustycli";
changelog = "https://github.com/pwnwriter/rustycli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rustypaste-cli";
version = "0.9.4";
src = fetchFromGitHub {
owner = "orhun";
repo = "rustypaste-cli";
rev = "v${version}";
hash = "sha256-tv5nAs5g7NWVakKUyw5PVxHJYQniV9OYm7yDXhooWU4=";
};
cargoHash = "sha256-Z8rybofRp4hzTbn3iT0X50fcJCn2tT3HTYTLLWTJBek=";
meta = with lib; {
description = "CLI tool for rustypaste";
homepage = "https://github.com/orhun/rustypaste-cli";
changelog = "https://github.com/orhun/rustypaste-cli/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "rpaste";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rustypaste";
version = "0.16.1";
src = fetchFromGitHub {
owner = "orhun";
repo = "rustypaste";
rev = "v${version}";
sha256 = "sha256-Jfi2Q6551g58dfOqtHtWxkbxwYV71f7MIuLB8RbaR94=";
};
cargoHash = "sha256-10tBbn4XtdUNhfzb+KpwFGZAc7YVIEQRaqNLzJC1GGI=";
dontUseCargoParallelTests = true;
checkFlags = [
# requires internet access
"--skip=paste::tests::test_paste_data"
"--skip=server::tests::test_upload_remote_file"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Minimal file upload/pastebin service";
homepage = "https://github.com/orhun/rustypaste";
changelog = "https://github.com/orhun/rustypaste/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
seqizz
];
mainProgram = "rustypaste";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "rustywind";
version = "0.24.3";
src = fetchFromGitHub {
owner = "avencera";
repo = "rustywind";
rev = "v${version}";
hash = "sha256-qbOlU7kqVbB/sQg4b78CohOwQbraulZ8dRxeT+39rFk=";
};
cargoHash = "sha256-eXTdPtcsWhsABZU6kRzZ6eF1VaabouZwLAFI9KpAx98=";
meta = with lib; {
description = "CLI for organizing Tailwind CSS classes";
mainProgram = "rustywind";
homepage = "https://github.com/avencera/rustywind";
changelog = "https://github.com/avencera/rustywind/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}

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