nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation {
9 pname = "tinyalsa";
10 version = "unstable-2022-06-05";
11
12 src = fetchFromGitHub {
13 owner = "tinyalsa";
14 repo = "tinyalsa";
15 rev = "3d70d227e7dfd1be6f8f420a5aae164a2b4126e0";
16 hash = "sha256-RHeF3VShy+LYFtJK+AEU7swIr5/rnpg2fdllnH9cFCk=";
17 };
18
19 nativeBuildInputs = [
20 cmake
21 ];
22
23 cmakeFlags = [
24 "-DTINYALSA_USES_PLUGINS=ON"
25 ];
26
27 env.NIX_CFLAGS_COMPILE = toString [
28 "-Wno-error=sign-compare"
29 ];
30
31 postPatch = ''
32 substituteInPlace CMakeLists.txt \
33 --replace-fail "cmake_minimum_required(VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
34 '';
35
36 meta = {
37 homepage = "https://github.com/tinyalsa/tinyalsa";
38 description = "Tiny library to interface with ALSA in the Linux kernel";
39 license = lib.licenses.mit;
40 maintainers = [ ];
41 platforms = with lib.platforms; linux;
42 };
43}