init
This commit is contained in:
commit
e2df088ca4
3 changed files with 70 additions and 0 deletions
2
README.md
Normal file
2
README.md
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
Lovingly stolen & adapted from [ovitus/CDP8](https://github.com/ovitus/CDP8.nix).
|
||||||
|
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757068644,
|
||||||
|
"narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
41
flake.nix
Normal file
41
flake.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue