diff --git a/pkgs/by-name/op/opus/package.nix b/pkgs/by-name/op/opus/package.nix new file mode 100644 index 000000000000..fdfe0cf2640a --- /dev/null +++ b/pkgs/by-name/op/opus/package.nix @@ -0,0 +1,40 @@ +{ + lib, + stdenv, + cmake, + fetchFromGitHub, + meson, + ninja, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "opus"; + version = "1.5.2"; + + src = fetchFromGitHub { + owner = "xiph"; + repo = "opus"; + tag = "v${finalAttrs.version}"; + hash = "sha256-M1G7ypcfs7nJmXgkyoG96jT/CkgN5BOzy+DGO4LVCvA="; + }; + + __structuredAttrs = true; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + meson + ninja + ]; + + meta = { + description = "Modern audio compression for the internet"; + homepage = "https://github.com/xiph/opus"; + changelog = "https://github.com/xiph/opus/blob/${finalAttrs.src.rev}/NEWS"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "opus"; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/se/sendspin-go/package.nix b/pkgs/by-name/se/sendspin-go/package.nix new file mode 100644 index 000000000000..2f0ef02fbb91 --- /dev/null +++ b/pkgs/by-name/se/sendspin-go/package.nix @@ -0,0 +1,56 @@ +{ + lib, + alsa-lib, + buildGoModule, + fetchFromGitHub, + ffmpeg, + libogg, + opus, + opusfile, + pkg-config, +}: + +buildGoModule (finalAttrs: { + pname = "sendspin-go"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "Sendspin"; + repo = "sendspin-go"; + tag = "v${finalAttrs.version}"; + hash = "sha256-37qTAjEgA6m9aYSt47z2jhnJwvI2Gk86bdPX+5m8hLw="; + }; + + __structuredAttrs = true; + + vendorHash = "sha256-l1fHIkyZ513wroyB4Lsn76r+WzijG2ahKVid5ujkTyA="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ + alsa-lib + libogg + opus + opusfile + ffmpeg + ]; + + env.CGO_LDFLAGS = "-lm"; + + ldflags = [ "-s" ]; + + preCheck = '' + # Tests require network features that are not available in the sandbox + substituteInPlace pkg/discovery/mdns_test.go \ + --replace-fail "TestGetLocalIPs" "Skip_TestGetLocalIPs" + ''; + + meta = { + description = "Sendspin server and client"; + homepage = "https://github.com/Sendspin/sendspin-go"; + changelog = "https://github.com/Sendspin/sendspin-go/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "sendspin-go"; + }; +})