nix: add u2c

This commit is contained in:
Tom van Dijk 2025-07-28 13:08:06 +02:00
parent 7256189243
commit 71b052a98a
No known key found for this signature in database
GPG key ID: 7A984C8207ADBA51
2 changed files with 30 additions and 2 deletions

View file

@ -0,0 +1,24 @@
{
stdenvNoCC,
copyparty,
python312,
makeBinaryWrapper,
}:
stdenvNoCC.mkDerivation {
pname = "u2c";
inherit (copyparty) version meta;
src = ../../../..;
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
install -Dm444 bin/u2c.py -t $out/share/copyparty
mkdir $out/bin
makeWrapper ${python312.interpreter} $out/bin/u2c \
--add-flag $out/share/copyparty/u2c.py
runHook postInstall
'';
}

View file

@ -12,10 +12,14 @@
}:
{
nixosModules.default = ./contrib/nixos/modules/copyparty.nix;
overlays.default = self: super: {
overlays.default = self: super: rec {
copyparty = self.python3.pkgs.callPackage ./contrib/package/nix/copyparty {
ffmpeg = self.ffmpeg-full;
};
u2c = super.callPackage ./contrib/package/nix/u2c {
inherit copyparty;
};
};
}
// flake-utils.lib.eachDefaultSystem (
@ -31,7 +35,7 @@
in
{
packages = {
inherit (pkgs) copyparty;
inherit (pkgs) copyparty u2c;
default = self.packages.${system}.copyparty;
};