mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
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.
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{ lib, stdenv, fetchurl , alsa-lib, }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "zita-alsa-pcmi";
|
|
version = "0.6.1";
|
|
src = fetchurl {
|
|
url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
|
sha256 = "sha256-iil6zj16R0Ex7T+jIQacExM3eFtWojfW8WjIXueW1Ww=";
|
|
};
|
|
|
|
buildInputs = [ alsa-lib ];
|
|
|
|
buildPhase = ''
|
|
cd source
|
|
make PREFIX="$out"
|
|
|
|
# create lib link for building apps
|
|
ln -s libzita-alsa-pcmi.so.$version libzita-alsa-pcmi.so
|
|
|
|
# apps
|
|
cd ../apps
|
|
CXXFLAGS+=" -I../source" \
|
|
LDFLAGS+=" -L../source" \
|
|
make PREFIX="$out"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir "$out"
|
|
mkdir "$out/lib"
|
|
mkdir "$out/include"
|
|
mkdir "$out/bin"
|
|
|
|
cd ../source
|
|
|
|
# source
|
|
install -Dm755 libzita-alsa-pcmi.so.$version \
|
|
"$out/lib/libzita-alsa-pcmi.so.$version"
|
|
|
|
# link
|
|
ln -s libzita-alsa-pcmi.so.$version \
|
|
"$out/lib/libzita-alsa-pcmi.so"
|
|
ln -s libzita-alsa-pcmi.so.$version \
|
|
"$out/lib/libzita-alsa-pcmi.so.0"
|
|
|
|
# header
|
|
install -Dm644 zita-alsa-pcmi.h \
|
|
"$out/include/zita-alsa-pcmi.h"
|
|
|
|
# apps
|
|
install -Dm755 ../apps/alsa_delay \
|
|
"$out/bin/alsa_delay"
|
|
install -Dm755 ../apps/alsa_loopback \
|
|
"$out/bin/alsa_loopback"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Successor of clalsadrv, provides easy access to ALSA PCM devices";
|
|
version = version;
|
|
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = [ lib.maintainers.magnetophon ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|