nixpkgs/pkgs/by-name/li/libks/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

57 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, libuuid
, openssl
, libossp_uuid
, freeswitch
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "libks";
version = "2.0.6";
src = fetchFromGitHub {
owner = "signalwire";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zKL+ukAdKiCC4wh55hnZpebFraIdKWDFsRfhVzhUNj0=";
};
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/openwrt/telephony/5ced7ea4fc9bd746273d564bf3c102f253d2182e/libs/libks/patches/01-find-libm.patch";
sha256 = "1hyrsdxg69d08qzvf3mbrx2363lw52jcybw8i3ynzqcl228gcg8a";
})
];
dontUseCmakeBuildDir = true;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [ openssl ]
++ lib.optional stdenv.hostPlatform.isLinux libuuid
++ lib.optional stdenv.hostPlatform.isDarwin libossp_uuid;
passthru = {
tests.freeswitch = freeswitch;
updateScript = nix-update-script { };
};
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Foundational support for signalwire C products";
homepage = "https://github.com/signalwire/libks";
maintainers = with lib.maintainers; [ misuzu ];
platforms = platforms.unix;
license = licenses.mit;
};
}