-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
namida: init at 0.5.0 #346285
base: master
Are you sure you want to change the base?
namida: init at 0.5.0 #346285
Conversation
6a44df2
to
0e2f174
Compare
pkgs/by-name/na/namida/package.nix
Outdated
# Package uses git history to include versioning in binary | ||
src = fetchgit { | ||
url = "https://github.com/meew0/namida.git"; | ||
rev = "782ab6baf679f830c4242bf071d8e85743fe77f7"; | ||
hash = "sha256-SVFlh603D7mFoN+N4M6v3TXRQWNOV5jMPefmz+qOMQU="; | ||
leaveDotGit = true; | ||
branchName = "namida"; | ||
}; | ||
nativeBuildInputs = [ git ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should likely be addressed upstream so we can use fetchFromGitHub
instead. The package is also non-deterministic since its outputs differ based on time of compilation, which needs to be addressed before it can be added to nixpkgs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have written a patch which checks whether the package is within a Nix build environment at build time. If so, it does not check git for a revision or generate a build time. Instead these values come from env
in the package.nix
file. I will be submitting a pull request upstream. This solves both the non-determinism and the need for leaveDotGit
and fetchgit
.
pkgs/by-name/na/namida/package.nix
Outdated
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "namida"; | ||
version = "0.5"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namida -V
reports its version as namida 0.5.0
, version
should be the full version. Commit messages & PR title should also be changed.
version = "0.5"; | |
version = "0.5.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
pkgs/by-name/na/namida/package.nix
Outdated
patches = [ ./client_get_mem_size_of.patch ]; | ||
|
||
meta = { | ||
description = "Fast file transfer over high-latency connections via UDP"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Fast file transfer over high-latency connections via UDP"; | |
description = "Client/server for fast file transfer over high-latency connections via UDP"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
pkgs/by-name/na/namida/package.nix
Outdated
own updated tools anyway. | ||
''; | ||
homepage = "https://github.com/meew0/namida"; | ||
changelog = "https://github.com/meew0/namida/commits/namida/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit history is not a changelog.
changelog = "https://github.com/meew0/namida/commits/namida/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
pkgs/by-name/na/namida/package.nix
Outdated
license = lib.licenses.free; | ||
sourceProvenance = with lib.sourceTypes; [ fromSource ]; | ||
maintainers = with lib.maintainers; [ jebriggsy ]; | ||
platforms = with lib.platforms; [ "x86_64-linux" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine on aarch64 as well.
platforms = with lib.platforms; [ "x86_64-linux" ]; | |
platforms = lib.platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
0e2f174
to
e99b195
Compare
172831a
to
8363ab4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick about the set build date, otherwise that should be all. I've also noticed that the upstream is a pretty niche project (4 stars on github, not a lot of activity) so I'm not sure it's wanted in nixpkgs, but that's up to a committer to decide.
pkgs/by-name/na/namida/package.nix
Outdated
# Set the git revision and build datetime declaritively | ||
env = { | ||
GIT_HASH = src.rev; | ||
NAMIDA_COMPILE_DT = "2024-10-13 12:00:00"; # Date this package was committed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to make this a generic value like the unix epoch.
NAMIDA_COMPILE_DT = "2024-10-13 12:00:00"; # Date this package was committed | |
NAMIDA_COMPILE_DT = "1970-01-01 00:00:00"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamp fixed.
Niche
It is a bit niche, but I think it may be a bit more fair to look at the interest in the Tsunami protocol in general. It is used a bit more in internal data center networks and other situations where TCP can be congested or otherwise constrained (satellite based networks for example).
Neither use case is likely to generate much activity in public repositories.
8363ab4
to
c326342
Compare
namida is a tool for fast file downloads over high-latency and/or unreliable networks. It uses UDP for bulk data transmission, together with a minimal TCP control stream to mediate retransmission of lost data.
c326342
to
a88b7da
Compare
namida
namida is a tool for fast file downloads over high-latency and/or unreliable networks. It uses UDP for bulk data transmission, together with a minimal TCP control stream to mediate retransmission of lost data.
namida is based upon Tsunami, a 2000s-era protocol and software suite for UDP-based file transmission. While Tsunami is still usable today, it has essentially not been updated since 2009, and has several problems that make it annoying to use nowadays. So, namida was created by first converting Tsunami's source code to Rust using C2Rust, manually converting the generated unsafe code to safe, more idiomatic Rust, and then making various improvements.
In the process some parts of Tsunami were removed. In particular, after 2006 Tsunami was primarily maintained by Finnish VLBI scientists (primarily Jan Wagner at Metsähovi Radio Observatory), who added support for VLBI-specific real-time networking hardware. The project does not have access to this hardware so the features were deprecated
Features
--rate
command to limit the transfer rate to a suitable value)New features compared to Tsunami:
Usage
Run a namida server providing all files in the local directory:
Run a namida server providing only some specific files:
List the files a server has available:
Get a specific file from a server:
Get all files from a server:
Many more options are available for the individual subcommands. Run
namida help [command]
to get more information.Licensing information
namida is available under the same license as Tsunami (both the original Tsunami from Indiana University, and Jan Wagner's updated version), which is a permissive BSD-style license with the additional restriction that derivative programs may not be called “Tsunami” without permission from Indiana University. See
LICENSE.txt
on the project repository for the full license text.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.