41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
outputs = {
|
|
nixpkgs,
|
|
self,
|
|
}: {
|
|
defaultPackage.x86_64-linux = with import nixpkgs {system = "x86_64-linux";}; let
|
|
cdp8 =
|
|
fetchFromGitHub
|
|
{
|
|
owner = "ComposersDesktop";
|
|
repo = "CDP8";
|
|
rev = "main";
|
|
hash = "sha256-GG5RHgO5mwc24Rgq3lH+gan053vyZGPb1Gp8pOU5dG0=";
|
|
};
|
|
in
|
|
stdenv.mkDerivation
|
|
{
|
|
name = "CDP 8.0.1";
|
|
buildInputs = [clang cmake];
|
|
buildCommand = ''
|
|
tar fx ${cdp8}/libaaio/libaaio-0.3.2.tar.bz2
|
|
libaaio-0.3.2/configure --prefix $out
|
|
make install
|
|
mkdir $out/src
|
|
cp -r ${cdp8}/* $out/src
|
|
chmod -R +w $out
|
|
ln -s $out/include/* $out/src/dev/include
|
|
sed -i '/option(USE_LOCAL_PORTAUDIO/c\option(USE_LOCAL_PORTAUDIO OFF)' $out/src/CMakeLists.txt
|
|
sed -i 's/#*//' $out/src/dev/externals/CMakeLists.txt
|
|
mkdir $out/src/build
|
|
cd $out/src/build
|
|
cmake -DAAIOLIB=$out/lib/libaaio.so -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
|
|
make
|
|
mkdir $out/bin
|
|
mv $out/src/NewRelease/* $out/bin
|
|
rm -r $out/include $out/lib $out/man $out/src
|
|
'';
|
|
};
|
|
};
|
|
}
|