diff --git a/tools/flake.lock b/tools/flake.lock new file mode 100644 index 000000000000..552b01ade3a7 --- /dev/null +++ b/tools/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1743080597, + "narHash": "sha256-UQwJgAe80hyILxk8sNSH2DCGDpHTYjtzld8uZv0nUes=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2332f3658f3f9c0b7c5c8357329c0737d5757331", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/tools/flake.nix b/tools/flake.nix new file mode 100644 index 000000000000..e6f33efa10c3 --- /dev/null +++ b/tools/flake.nix @@ -0,0 +1,86 @@ +{ + inputs = { + utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; + }; + outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + qt6Env = with pkgs.qt6; env "qt-custom-${qtbase.version}" + [ + qt5compat + qtshadertools + qtsvg + qtdeclarative + ]; + in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + # Building Mixxx + qt6Env + cmake + chromaprint + glib + libebur128 + fftw + flac + lame + libogg + libvorbis + portaudio + portmidi + protobuf + rubberband + libsndfile + soundtouch + taglib + upower + openssl + microsoft-gsl + kdePackages.qtkeychain + hidapi + wavpack + libid3tag + libusb1 + libmad + libopus + opusfile + libshout + lilv + libxkbcommon + sqlite + gtest + clang-tools + mp4v2 + vulkan-loader + xorg.libX11 + ffmpeg + libmodplug + vamp-plugin-sdk + ccache + libGLU + pcre + libselinux + utillinux + libdjinterop + libkeyfinder + cups + lv2 + + # Git pre-commits + pre-commit + nodejs + rustup + stdenv.cc.cc + ]; + shellHook = '' + pre-commit install + pre-commit install -t pre-push + # Needed for clang-format pre-commit because it downloads and executes its own clang-format elf-binary + export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib/:$LD_LIBRARY_PATH" + ''; + }; + } + ); +}