adding lsp stuff and moving bitwig to local package

This commit is contained in:
Matt Nish-Lapidus 2025-02-22 23:35:22 -05:00
parent 8067765fec
commit 8e58c5c986
11 changed files with 233 additions and 103 deletions

31
.dir-locals.el Normal file
View file

@ -0,0 +1,31 @@
;;; dir-locals.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2025 Matt Nish-Lapidus
;;
;; Author: Matt Nish-Lapidus <matt@emenel.ca>
;; Maintainer: Matt Nish-Lapidus <matt@emenel.ca>
;; Created: February 22, 2025
;; Modified: February 22, 2025
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex text tools unix vc wp
;; Homepage: https://github.com/emenel/dir-locals
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; Description
;;
;;; Code:
((nix-mode
. ((eglot-workspace-configuration
. (:nixd
(:formatting (:command ["alejandra"]))
(:nixpkgs (:expr "import (builtins.getFlake \"/home/emenel/source/nixos-config/\").inputs.nixpkgs { }"))
(:options (:nixos (:expr "(builtins.getFlake \"/home/emenel/source/nixos-config/\").nixosConfigurations.eddie.options"))))))))
(provide 'dir-locals)
;;; dir-locals.el ends here

125
flake.lock generated
View file

@ -10,11 +10,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1740179067,
"narHash": "sha256-LK1kY074RAttISPbeHIuR0mu2ZoA1drPNOPqir1rFtc=",
"lastModified": 1740224586,
"narHash": "sha256-HFDE+kODQc3eYDaJGbinxyBwPr/02LJvd9Gyewbuxtc=",
"owner": "mrshmllow",
"repo": "affinity-nix",
"rev": "3934b165df19a91362e8ac530401aa2bd52e2441",
"rev": "554688f791e0263b0f9428734cadd71dd9ce0f9f",
"type": "github"
},
"original": {
@ -23,27 +23,6 @@
"type": "github"
}
},
"audio": {
"inputs": {
"nix-buildproxy": "nix-buildproxy",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1739976297,
"narHash": "sha256-mhb3TocVhkT6tq5xhLOcYsCv+tSBhc4vRJLZI6BeFJs=",
"ref": "refs/heads/master",
"rev": "81cf964ba04f851151bdd747c59901a1f4cbc1ce",
"revCount": 108,
"type": "git",
"url": "https://gt.emenel.ca/emenel/audio.nix.git"
},
"original": {
"type": "git",
"url": "https://gt.emenel.ca/emenel/audio.nix.git"
}
},
"elemental-wine-source": {
"flake": false,
"locked": {
@ -65,15 +44,15 @@
},
"emacs-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1740189964,
"narHash": "sha256-80FEyl0zRoBA3fnuJA1MtsZb3hI3WRFE5OFAYr6tLTA=",
"lastModified": 1740243501,
"narHash": "sha256-F4p3c/8DglyNCYNyF6bRIzTyW4i4TzWDSN6ONxkCRoI=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "33b945739322cb13a351114563ffad9c4f67968c",
"rev": "f6f9a60d81a5c651e6d0f59153e38f30a6d30063",
"type": "github"
},
"original": {
@ -238,7 +217,7 @@
"inputs": {
"flake-compat": "flake-compat_4",
"gitignore": "gitignore_2",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
@ -323,11 +302,11 @@
]
},
"locked": {
"lastModified": 1740188029,
"narHash": "sha256-pnPs+XSpR633G/q0gj+SDyL4RaDfiKlom86zEBPtq+M=",
"lastModified": 1740265252,
"narHash": "sha256-+LFsCsIUF/pJWL9S21m5NLcK5bgwRB4MwfV0Iu7tggY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "765cb91e9d5ab06ed8c92c25fc0e51d6c11d43cb",
"rev": "fb568d75cf6c81f30d49eeb73787e9b56454ba16",
"type": "github"
},
"original": {
@ -485,11 +464,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1740096645,
"narHash": "sha256-rxWV2zQ5PSPWf1lmBpREBhOkvgiIhey6Tfgkg0NIMN8=",
"lastModified": 1740265014,
"narHash": "sha256-U+8HOPgfrNkFEadoyB9GXSPPFW/Uytvb3TxyqW3JOw4=",
"owner": "hyprwm",
"repo": "hyprlock",
"rev": "f6e4c1374ebff43a9a2492f6fcb8594bba69edd0",
"rev": "e588351d1df57b125fda8d92f5b36a435545bb95",
"type": "github"
},
"original": {
@ -712,11 +691,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1740124252,
"narHash": "sha256-s/wpy4RFcfsn5vPLC9LhMgoxdd7ReWRssWdxUgBym8s=",
"lastModified": 1740262899,
"narHash": "sha256-iVN73FYXdNHul0spp1XdvEoYre0lZiGKYx+Vv3YeIuE=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "f989ca59d48550c3fd7021917647775969c26d54",
"rev": "a5690658f971bf4746077e850b230c325108094a",
"type": "github"
},
"original": {
@ -745,11 +724,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1740117926,
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
"lastModified": 1740251548,
"narHash": "sha256-53kgDwNYEPIZadX5SEk7+OoTXycHm1QUF7x2XCoo9+U=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
"rev": "bca65452882e1e616045e21a0a9a4a0b7024239b",
"type": "github"
},
"original": {
@ -762,7 +741,7 @@
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1725758175,
@ -778,25 +757,6 @@
"type": "github"
}
},
"nix-buildproxy": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1708455753,
"narHash": "sha256-qP79WfPiTl92KrZkmvacba9Xas4WwSFln5DjkP2Q/Lg=",
"owner": "polygon",
"repo": "nix-buildproxy",
"rev": "77d486cb4b0458cb4c4a296c3140f7a6c36ab3e6",
"type": "github"
},
"original": {
"owner": "polygon",
"ref": "v0.1.0",
"repo": "nix-buildproxy",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1731533336,
@ -928,11 +888,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1739923778,
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
"lastModified": 1740162160,
"narHash": "sha256-SSYxFhqCOb3aiPb6MmN68yEzBIltfom8IgRz7phHscM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
"rev": "11415c7ae8539d6292f2928317ee7a8410b28bb9",
"type": "github"
},
"original": {
@ -960,11 +920,11 @@
},
"nixpkgs-stable_4": {
"locked": {
"lastModified": 1739923778,
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
"lastModified": 1740162160,
"narHash": "sha256-SSYxFhqCOb3aiPb6MmN68yEzBIltfom8IgRz7phHscM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
"rev": "11415c7ae8539d6292f2928317ee7a8410b28bb9",
"type": "github"
},
"original": {
@ -975,22 +935,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708118438,
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1739866667,
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
@ -1006,7 +950,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
@ -1022,7 +966,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1719082008,
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
@ -1038,7 +982,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1739866667,
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
@ -1127,7 +1071,6 @@
"root": {
"inputs": {
"affinity-nix": "affinity-nix",
"audio": "audio",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"hypridle": "hypridle",
@ -1139,7 +1082,7 @@
"nix-flatpak": "nix-flatpak",
"nix-rice": "nix-rice",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_4",
"sops-nix": "sops-nix",
"wezterm": "wezterm",
@ -1373,11 +1316,11 @@
},
"locked": {
"dir": "nix",
"lastModified": 1739478829,
"narHash": "sha256-zUAt4Ak3NHD3KNJ10ibJoP9zqQF5hdPIeP5mlFyU81o=",
"lastModified": 1740259252,
"narHash": "sha256-Aoqs7WupQProspwQFLQ4ZfweGgCAA+kBiwy2F9yhkNI=",
"owner": "wez",
"repo": "wezterm",
"rev": "ee0c04e735fb94cb5119681f704fb7fa6731e713",
"rev": "f7db9554f532e12d3cb68b6877d1323e9a3fd6ca",
"type": "github"
},
"original": {

View file

@ -46,10 +46,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
audio = {
url = "git+https://gt.emenel.ca/emenel/audio.nix.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# audio = {
# url = "git+https://gt.emenel.ca/emenel/audio.nix.git";
# inputs.nixpkgs.follows = "nixpkgs";
# };
wezterm = {
url = "github:wez/wezterm?dir=nix";

View file

@ -26,7 +26,7 @@
overlays = builtins.attrValues nix-config.overlays ++ [
inputs.niri.overlays.niri
inputs.emacs-overlay.overlays.default
inputs.audio.overlays.default
# inputs.audio.overlays.default
inputs.nix-rice.overlays.default
(final: prev: {
@ -37,6 +37,14 @@
vulkanSupport = true;
});
})
(final: prev: {
bitwig-studio5-3 =
nix-config.packages.x86_64-linux.bitwig-studio.bitwig-bubblewrap.override {
bitwig-studio =
nix-config.packages.x86_64-linux.bitwig-studio.bitwig-studio5-3-unwrapped;
};
})
];
};
@ -55,6 +63,7 @@
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
};
# Set your time zone.

View file

@ -7,6 +7,7 @@ let
epkgs.sly
epkgs.sly-quicklisp
epkgs.geiser-racket
epkgs.cider
epkgs.editorconfig
epkgs.shfmt
# epkgs.nixpkgs-fmt

View file

@ -17,7 +17,8 @@
])
(with pkgs; [
bitwig-studio5-latest
bitwig-studio5-3
(nix-config.pkgs-stable.yabridge.override {
wine = wineWowPackages.stagingFull;
@ -43,7 +44,7 @@
chow-phaser
chow-centaur
chow-tape-model
chow-multitool
# chow-multitool
easyeffects
vcv-rack
cardinal
@ -52,7 +53,6 @@
vital
helio-workstation
stochas
])
];
@ -60,7 +60,7 @@
bitwig-labwc = {
name = "Bitwig (labwc)";
exec = "${pkgs.labwc}/bin/labwc -S bitwig-studio";
categories = [ "Application" "Audio" "Music" ];
categories = ["Application" "Audio" "Music"];
};
};
@ -88,5 +88,4 @@
};
home.file.".vst3/yabridge/yabridge.toml".source = ../../homes/emenel/dotfiles/dot_vst3/yabridge.toml;
}

View file

@ -83,6 +83,9 @@
haskell-language-server
cmake-language-server
stylelint-lsp
marksman
ruff-lsp
haskell-language-server
black
jsbeautifier

View file

@ -0,0 +1,4 @@
self: super: {
}

View file

@ -0,0 +1,33 @@
{ stdenv, bindfs, bubblewrap, mktemp, writeShellScript, bitwig-studio }:
stdenv.mkDerivation {
inherit (bitwig-studio) pname version;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = let
wrapper = writeShellScript "bitwig-studio" ''
echo "Creating temporary directory"
TMPDIR=$(${mktemp}/bin/mktemp --directory)
echo "Temporary directory: $TMPDIR"
echo "Copying default Vamp Plugin settings"
cp -r ${bitwig-studio}/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 --dev-bind / / --bind $TMPDIR/VampTransforms ${bitwig-studio}/libexec/resources/VampTransforms ${bitwig-studio}/bin/bitwig-studio
echo "Bitwig exited, removing temporary directory"
rm -rf $TMPDIR
'';
in ''
mkdir -p $out/bin
cp ${wrapper} $out/bin/bitwig-studio
ln -s ${bitwig-studio}/bin/bitwig-studio $out/bin/bitwig-studio-unwrapped
cp -r ${bitwig-studio}/share $out
'';
}

View file

@ -0,0 +1,107 @@
{ stdenv, fetchurl, alsa-lib, atk, cairo, dpkg, ffmpeg, freetype, gdk-pixbuf
, glib, gtk3, harfbuzz, lib, libglvnd, libjack2, libjpeg, libxkbcommon
, makeWrapper, pango, pipewire, pulseaudio, wrapGAppsHook, xdg-utils, xorg, zlib, libudev-zero
, webkitgtk, curl, fftwFloat, jack2, vulkan-loader }:
stdenv.mkDerivation rec {
pname = "bitwig-studio5-3-unwrapped";
version = "5.3";
src = fetchurl {
url = "https://downloads-secure.bitwig.com/5.3.1/bitwig-studio-5.3.1.deb?__token__=st=1740197111.0~exp=1740197711.0~hmac=2e5de6388d4f0df89ed9cbbfa8735ff21c6792a818f061eccd8bbe54438a61cf&source_url=/dl/Bitwig%20Studio/5.3.1/installer_linux/";
sha256 = "sha256-mxodFCu4SDzofnoZZZ7TPDUIrRc3UJt8TuEBwDOo2wQ=";
};
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
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
libxcb
libXcursor
libX11
libXtst
libxkbcommon
pango
pipewire
pulseaudio
stdenv.cc.cc.lib
vulkan-loader
xcbutil
xcbutilwm
zlib
libudev-zero
];
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
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 = "A 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 ];
};
}

View file

@ -4,8 +4,8 @@ stdenv.mkDerivation rec {
pname = "nodal-red";
version = "latest";
src = fetchurl {
url = "https://dsp56300.com/builds/nodalred2x/beta/DSP56300Emu-1.4.2-Linux_x86_64-NodalRed2x-CLAP.zip";
sha256 = "sha256-7F+vdZTdvUIeERk7WFw7h1w00JPxwA5e4Z/LIEAhS84=";
url = "https://dsp56300.com/builds/nodalred2x/beta/DSP56300Emu-1.4.4-Linux_x86_64-NodalRed2x-CLAP.zip";
sha256 = "sha256-5xxb3okVd45wbzIcgv5XXobECVIhqLBJT31GxR8OIT8=";
};
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
buildInputs = with pkgs; [