major refactor and reorg
This commit is contained in:
parent
e91cca9aeb
commit
f99d2c3145
7 changed files with 15 additions and 201 deletions
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
outputs = {nixpkgs, home-manager, self, ... } @ inputs:
|
outputs = {nixpkgs, home-manager, self, ... } @ inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings;
|
inherit (nixpkgs.lib) genAttrs replaceStrings;
|
||||||
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
|
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
|
||||||
|
|
||||||
forAllSystems =
|
forAllSystems =
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
(with nix-config.packages.x86_64-linux; [
|
(with nix-config.packages.x86_64-linux; [
|
||||||
bitwig-beta
|
# bitwig-beta
|
||||||
mioctl
|
mioctl.mioctl
|
||||||
tal.bassline
|
tal.bassline
|
||||||
tal.j8
|
tal.j8
|
||||||
tal.u-no-lx
|
tal.u-no-lx
|
||||||
amplocker
|
amplocker.amplocker
|
||||||
chair-audio.snare
|
chair-audio.snare
|
||||||
chair-audio.cymb
|
chair-audio.cymb
|
||||||
the-usual-suspects.vavra
|
the-usual-suspects.vavra
|
||||||
|
|
9
overlays/bitwig-studio.nix
Normal file
9
overlays/bitwig-studio.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
final: prev: {
|
||||||
|
bitwig-studio-unwrapped = prev.bitwig-studio-unwrapped.overrideAttrs (old: {
|
||||||
|
src = prev.fetchurl {
|
||||||
|
name = "bitwig-studio-5.3-beta-7.deb";
|
||||||
|
url = "https://downloads-secure.bitwig.com/5.3%20Beta%207/bitwig-studio-5.3-beta-7.deb?__token__=st=1738511951.0~exp=1738512551.0~hmac=06d510d143491f9bf2444aec8b2876ea606d9208e2753dcf15710fb3c2ceb0d3&source_url=/dl/Bitwig%20Studio/5.3%20Beta%207/installer_linux/";
|
||||||
|
sha256 = "sha256-CqDDz/N3Cm4BqkOI6PYACkyXZkqIRV7A3G5q7ekrMaE=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
|
{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "Amp Locker";
|
pname = "amplocker";
|
||||||
version = "latest";
|
version = "latest";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://audioassaultdownloads.s3.amazonaws.com/AmpLocker/AmpLocker109/AmpLockerLinux.zip";
|
url = "https://audioassaultdownloads.s3.amazonaws.com/AmpLocker/AmpLocker109/AmpLockerLinux.zip";
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
{
|
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
|
||||||
alsa-lib,
|
|
||||||
atk,
|
|
||||||
cairo,
|
|
||||||
dpkg,
|
|
||||||
ffmpeg,
|
|
||||||
freetype,
|
|
||||||
gdk-pixbuf,
|
|
||||||
glib,
|
|
||||||
gtk3,
|
|
||||||
harfbuzz,
|
|
||||||
lib,
|
|
||||||
libglvnd,
|
|
||||||
libjack2,
|
|
||||||
libjpeg,
|
|
||||||
libnghttp2,
|
|
||||||
libxkbcommon,
|
|
||||||
makeWrapper,
|
|
||||||
pango,
|
|
||||||
pipewire,
|
|
||||||
wireplumber,
|
|
||||||
pulseaudio,
|
|
||||||
vulkan-loader,
|
|
||||||
wrapGAppsHook3,
|
|
||||||
xcb-imdkit,
|
|
||||||
xdg-utils,
|
|
||||||
xorg,
|
|
||||||
zlib,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "bitwig-studio-unwrapped";
|
|
||||||
version = "5.3-beta-7";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "bitwig-studio-${version}.deb";
|
|
||||||
url = "https://downloads-secure.bitwig.com/5.3%20Beta%207/bitwig-studio-5.3-beta-7.deb?__token__=st=1738511951.0~exp=1738512551.0~hmac=06d510d143491f9bf2444aec8b2876ea606d9208e2753dcf15710fb3c2ceb0d3&source_url=/dl/Bitwig%20Studio/5.3%20Beta%207/installer_linux/";
|
|
||||||
sha256 = "sha256-CqDDz/N3Cm4BqkOI6PYACkyXZkqIRV7A3G5q7ekrMaE=";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
dpkg
|
|
||||||
makeWrapper
|
|
||||||
wrapGAppsHook3
|
|
||||||
];
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
|
||||||
|
|
||||||
buildInputs = with xorg; [
|
|
||||||
alsa-lib
|
|
||||||
atk
|
|
||||||
cairo
|
|
||||||
freetype
|
|
||||||
gdk-pixbuf
|
|
||||||
glib
|
|
||||||
gtk3
|
|
||||||
harfbuzz
|
|
||||||
libglvnd
|
|
||||||
libjack2
|
|
||||||
# libjpeg8 is required for converting jpeg's to colour palettes
|
|
||||||
libjpeg
|
|
||||||
libnghttp2
|
|
||||||
libxcb
|
|
||||||
libXcursor
|
|
||||||
libX11
|
|
||||||
libXtst
|
|
||||||
libxkbcommon
|
|
||||||
pango
|
|
||||||
pipewire
|
|
||||||
wireplumber
|
|
||||||
pulseaudio
|
|
||||||
(lib.getLib stdenv.cc.cc)
|
|
||||||
vulkan-loader
|
|
||||||
xcb-imdkit
|
|
||||||
xcbutil
|
|
||||||
xcbutilwm
|
|
||||||
zlib
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp -r opt/bitwig-studio $out/libexec
|
|
||||||
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
|
|
||||||
cp -r usr/share $out/share
|
|
||||||
|
|
||||||
# Bitwig includes a copy of libxcb-imdkit.
|
|
||||||
# Removing it will force it to use our version.
|
|
||||||
rm $out/libexec/lib/bitwig-studio/libxcb-imdkit.so.1
|
|
||||||
|
|
||||||
substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
|
|
||||||
$out/share/applications/com.bitwig.BitwigStudio.desktop \
|
|
||||||
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
# patchelf fails to set rpath on BitwigStudioEngine, so we use
|
|
||||||
# the LD_LIBRARY_PATH way
|
|
||||||
|
|
||||||
find $out -type f -executable \
|
|
||||||
-not -name '*.so.*' \
|
|
||||||
-not -name '*.so' \
|
|
||||||
-not -name '*.jar' \
|
|
||||||
-not -name 'jspawnhelper' \
|
|
||||||
-not -path '*/resources/*' | \
|
|
||||||
while IFS= read -r f ; do
|
|
||||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
|
||||||
# make xdg-open overrideable at runtime
|
|
||||||
wrapProgram $f \
|
|
||||||
"''${gappsWrapperArgs[@]}" \
|
|
||||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
|
||||||
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
|
||||||
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
|
|
||||||
done
|
|
||||||
|
|
||||||
find $out -type f -executable -name 'jspawnhelper' | \
|
|
||||||
while IFS= read -r f ; do
|
|
||||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Digital audio workstation";
|
|
||||||
longDescription = ''
|
|
||||||
Bitwig Studio is a multi-platform music-creation system for
|
|
||||||
production, performance and DJing, with a focus on flexible
|
|
||||||
editing tools and a super-fast workflow.
|
|
||||||
'';
|
|
||||||
homepage = "https://www.bitwig.com/";
|
|
||||||
license = licenses.unfree;
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
maintainers = with maintainers; [
|
|
||||||
bfortz
|
|
||||||
michalrus
|
|
||||||
mrVanDalo
|
|
||||||
];
|
|
||||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
stdenv,
|
|
||||||
bubblewrap,
|
|
||||||
mktemp,
|
|
||||||
writeShellScript,
|
|
||||||
bitwig-studio-unwrapped,
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
inherit (bitwig-studio-unwrapped) version;
|
|
||||||
|
|
||||||
pname = "bitwig-studio";
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
dontConfigure = true;
|
|
||||||
dontBuild = true;
|
|
||||||
dontPatchELF = true;
|
|
||||||
dontStrip = true;
|
|
||||||
|
|
||||||
installPhase =
|
|
||||||
let
|
|
||||||
wrapper = writeShellScript "bitwig-studio" ''
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Creating temporary directory"
|
|
||||||
TMPDIR=$(${mktemp}/bin/mktemp --directory)
|
|
||||||
echo "Temporary directory: $TMPDIR"
|
|
||||||
echo "Copying default Vamp Plugin settings"
|
|
||||||
cp -r ${bitwig-studio-unwrapped}/libexec/resources/VampTransforms $TMPDIR
|
|
||||||
echo "Changing permissions to be writable"
|
|
||||||
chmod -R u+w $TMPDIR/VampTransforms
|
|
||||||
|
|
||||||
echo "Starting Bitwig Studio in Bubblewrap Environment"
|
|
||||||
${bubblewrap}/bin/bwrap \
|
|
||||||
--bind / / \
|
|
||||||
--bind $TMPDIR/VampTransforms ${bitwig-studio-unwrapped}/libexec/resources/VampTransforms \
|
|
||||||
--dev-bind /dev /dev \
|
|
||||||
${bitwig-studio-unwrapped}/bin/bitwig-studio \
|
|
||||||
|| true
|
|
||||||
|
|
||||||
echo "Bitwig exited, removing temporary directory"
|
|
||||||
rm -rf $TMPDIR
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp ${wrapper} $out/bin/bitwig-studio
|
|
||||||
cp -r ${bitwig-studio-unwrapped}/share $out
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
|
{ stdenv, pkgs, fetchurl, lib, unzip, makeWrapper, ... }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mioctl";
|
pname = "mioctl";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue