feat: package u2c, the fast copyparty uploader

This commit is contained in:
Teesh 2026-02-03 17:59:32 +02:00
parent a4b1ae3ffb
commit a4979fe35b
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{ self, ... }:
{
flake.modules.nixos.desktop = { pkgs, ... }: let
system = pkgs.stdenv.hostPlatform.system;
in {
environment.systemPackages = [ self.packages.${system}.u2c ];
};
}

29
modules/packages/u2c.nix Normal file
View file

@ -0,0 +1,29 @@
{ ... }:
{
perSystem = { pkgs, ... }: {
packages.u2c = pkgs.stdenv.mkDerivation {
name = "u2c";
version = "2.19";
src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/9001/copyparty/6694998985e98326ca4ca0a0724cfd4901be2430/bin/u2c.py";
hash = "sha256-IyYBB6yIIQB1FAFLs6xOw5+A09W+JKRj4FF/CwiFru0=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/u2c
chmod +x $out/bin/u2c
'';
buildInputs = [ pkgs.python3 ];
meta = {
description = "A fast uploader for Copyparty";
homepage = "https://github.com/9001/copyparty";
};
};
};
}