New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vcvrack: init at 0.5.1 #33132
Closed
Closed
vcvrack: init at 0.5.1 #33132
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ stdenv, fetchFromGitHub, fetchgit, makeWrapper, gcc, fetchpatch, | ||
curl, glew, glfw, gnome2, jansson, libsamplerate, libzip, | ||
pkgconfig, rtaudio, rtmidi3, | ||
... }: | ||
|
||
with stdenv.lib; | ||
|
||
let | ||
plugins = { | ||
# fetch official Plugins | ||
# ---------------------- | ||
Fundamental = fetchgit { | ||
url = "https://github.com/VCVRack/Fundamental.git"; | ||
rev = "v0.5.1"; | ||
sha256 = "0dawi83463fiml03d1d40r638rnzgxlvc4d1744gdal2rmhrycva"; | ||
}; | ||
Befco = fetchgit { | ||
url = "https://github.com/VCVRack/Befaco.git"; | ||
rev = "v0.5.0"; | ||
sha256 = "0v62ffahybff1ipz85zg30sih56wkfdkbbhs9qz10s6k0nr7i63r"; | ||
}; | ||
ESeries = fetchgit { | ||
url = "https://github.com/VCVRack/Eseries.git"; | ||
rev = "v0.5.0"; | ||
sha256 = "1kwvbsi5vjljlgs6annh7qkxzakjyhmx05qrfhqk9llxs8r8f0d7"; | ||
}; | ||
AudibleInstruments = fetchgit { | ||
url = "https://github.com/VCVRack/AudibleInstruments.git"; | ||
rev = "v0.5.0"; | ||
sha256 = "0paj9iryx3xd46ilipsyiq6516zhzpgciijqyjl1nrji4g7v7l5f"; | ||
}; | ||
|
||
# fetch additional Plugins | ||
# ------------------------ | ||
# todo : make these `nixos.vcvrackPlugins.<plugin-name>` | ||
AmalgamatedHarmonics = fetchgit { | ||
url = "https://github.com/jhoar/AmalgamatedHarmonics.git"; | ||
rev = "v0.5.8"; | ||
sha256 = "1k9641p2lmy549iaj2gmj9wsj5h611h1n7255bq3z6bmm4pdv89r"; | ||
}; | ||
AS = fetchgit { | ||
url = "https://github.com/AScustomWorks/AS.git"; | ||
rev = "0.5.6"; | ||
sha256 = "0jp0ba264a4c4gydams3k4964mh3y47gmbpnhcapcdkq7q09ryv5"; | ||
}; | ||
BogaudioModules = fetchgit { | ||
url = "https://github.com/bogaudio/BogaudioModules.git"; | ||
rev = "v0.5.3"; | ||
sha256 = "10apg23wyzsk1y41241jcpkj1047h9ygfk45fcrf44sj310yw0ji"; | ||
}; | ||
Dekstop = fetchgit { | ||
url = "https://github.com/dekstop/vcvrackplugins_dekstop"; | ||
rev = "v0.5.0"; | ||
sha256 = "1kqywcgf7vacg0f471v9xlvrsdqr64m6ivq13j0x3ka6j6nziyjq"; | ||
}; | ||
HetrickCV = fetchgit { | ||
url = "https://github.com/mhetrick/hetrickcv.git"; | ||
rev = "0.5.4"; | ||
sha256 = "0f047y4rfzfyzpcsz58d9kjb2dg4xi59dzzs35i0phz1vkgxvm0d"; | ||
}; | ||
NauModular = fetchgit { | ||
url = "https://github.com/naus3a/NauModular.git"; | ||
rev = "0.5.2"; | ||
sha256 = "0mh2yyranzy8fzi9kcw6z534s788gzxzyrng38cwyw02jkkk05m9"; | ||
}; | ||
RJModules = fetchgit { | ||
url = "https://github.com/Miserlou/RJModules.git"; | ||
rev = "0.5.0"; | ||
sha256 = "1w9w578fyfkxrzz9s8xap3696id8ibhj2bzap8zdg0k7vw609jrl"; | ||
}; | ||
StellareLink = fetchgit { | ||
url = "https://github.com/stellare-modular/vcv-link.git"; | ||
rev = "0.5.1"; | ||
sha256 = "1b7rrdhfqrwrffxaswdqrykq7k8sxsbxr62pi3ggfphqrgkijspr"; | ||
}; | ||
}; | ||
|
||
in | ||
stdenv.mkDerivation rec { | ||
name = "vcvrack-${version}"; | ||
version = "0.5.1"; | ||
|
||
# need to use fetchgit here to pull submodules as well | ||
src = fetchgit { | ||
url = "https://github.com/VCVRack/Rack.git"; | ||
rev = "v${version}"; | ||
sha256 = "0zy1splbir50iz12vlpxbpix1qx6lrjmqyb4fy7nz03sz8dij59a"; | ||
}; | ||
|
||
|
||
buildInputs = [ | ||
curl | ||
glew | ||
glfw | ||
gnome2.gtk.dev | ||
jansson | ||
libsamplerate | ||
libzip | ||
makeWrapper | ||
pkgconfig | ||
rtaudio | ||
rtmidi3 | ||
]; | ||
|
||
|
||
# include the plugins | ||
prePatch = '' | ||
${builtins.toString (flip mapAttrsToList plugins (k: v: '' | ||
echo ${k} | ||
mkdir -p plugins/${k} | ||
cp -a ${v}/* plugins/${k} | ||
''))} | ||
''; | ||
|
||
patches = [ | ||
(fetchpatch { | ||
name = "Fix-Xmonad.patch"; | ||
sha256 = "00qakp95xjrsv6vapmkvwyavg2y6mbdvqzq4zprgnfzm1jfh9bry"; | ||
url = "https://github.com/sorki/Rack/commit/e1a81a44e400c23b5239d941e9cc4943009ea714.patch"; | ||
}) | ||
]; | ||
|
||
postPatch = '' | ||
# patch RtAudio include | ||
substituteInPlace src/core/AudioInterface.cpp \ | ||
--replace RtAudio.h rtaudio/RtAudio.h | ||
|
||
# otherwise we will not find the fonts and pulgins | ||
sed src/asset.cpp -i -e "46s@.*@dir = \"$out/share/vcvrack\"\;@" | ||
sed src/asset.cpp -i -e "49s@.*@dir = \"$out/share/vcvrack\"\;@" | ||
''; | ||
|
||
buildPhase = '' | ||
# call make plugins separately to not override the VERSION parameter | ||
make allplugins | ||
# VERSION parameter is important to build a release version, | ||
# which contains the plugin manager. | ||
make VERSION=${version} | ||
''; | ||
|
||
# there is no `make install` so we override this phase | ||
installPhase = '' | ||
mkdir -p $out/{bin,share/vcvrack} | ||
cp Rack $out/share/vcvrack | ||
ln -s $out/share/vcvrack/Rack $out/bin/Rack | ||
ln -s $out/share/vcvrack/Rack $out/bin/VCVRack | ||
|
||
cp -r res $out/share/vcvrack/ | ||
cp -r plugins $out/share/vcvrack/ # todo : only copy libs | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Open-source virtual modular synthesizer"; | ||
longDescription = '' | ||
Rack is the engine for the VCV open-source virtual Eurorack DAW. | ||
''; | ||
homepage = https://vcvrack.com/; | ||
license = with licenses; [ bsd3 mit ]; | ||
maintainers = [ maintainers.mrVanDalo ]; | ||
platforms = platforms.linux; | ||
} ; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ stdenv, fetchFromGitHub, rtmidi2 }: | ||
|
||
rtmidi2.overrideAttrs (oldAttrs: rec { | ||
name = "rtmidi-${version}"; | ||
version = "3.0.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "thestk"; | ||
repo = "rtmidi"; | ||
rev = "v${version}"; | ||
sha256 = "1z4sj85vvnmvg4pjjs963ghi69srb63jp5xpck46dcb9wgypdviy"; | ||
}; | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put the plugins into a separate
plugin.nix
file. I turned this file then into a function from plugins to derivation:vcvrack/default.nix
:all-packages.nix
:This allows people to add their own plugins by calling
vcvrackWithPlugins
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I would like to be able to pick plugins like for vim or something.
Bad thing is that some of the plugins need the Rack repo as well.
I don't think a vcvrack without modules makes any sense. I think the vcvrack (withoutPlugins) should at least deliver the default repos.
I would like to deliver all the other modules as separate plugins. Something like
what do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this makes sense.
How would vcvrack find the installed plugins? So far I have not found an easy way to compile plugins separate from vcvrack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not accomplish that task (of course).
But I thought of links. (of course we can't change the vcvrack, but maybe we use
/etc/
or something)something like
${pkgs.vcvrack}/usr/share/vcvrack/plugins -> /etc/vcvrack/plugins
andthan every plugin (e.g. AS plugin) creates
/etc/vcvrack/AS -> ${pkgs.vcvrackPlugins.AS}/usr/share/vcvrack/plugins/AS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you want to do with a vcvrack without any plugins ? You can only look at the background image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svenkeidel Would it be Ok, if we merge this pull-request with as few further changes, because @yegortimoshenko would have to spend time on reviewing it. And when it's merged you create a pull-request ? We could also talk on irc (i'm palo in the #nixos channel)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a misunderstanding 😄, I was agreeing with you that vcvrack without any plugins does not make any sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the plugin problem. I don't know if vcvrack finding plugins over the global filesystem is the most Nix way of doing things. I think that for packages that can be extended with plugins it is acceptable to take these as an input argument, see for example emacsWithPackages. This gives the users more flexibility to instantiate this package multiple times with different sets of plugins. This flexibility probably will not be needed in case of vcvrack, however, I think it is good practice.
Based this plea, I would like to refine my proposal from above to support a standard set of plugins:
vcvrack/default.nix:
all-packages.nix:
@mrVanDalo, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svenkeidel : Yeah that sounds also good. But I still would like to "just" get this pr done (also because it is so old) and solve your issues in another pull-request right after this thing got merged.