diff --git a/flake.lock b/flake.lock index a82c030..0e892c2 100644 --- a/flake.lock +++ b/flake.lock @@ -49,10 +49,27 @@ "type": "github" } }, + "nixpkgs-qt4": { + "locked": { + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-qt4": "nixpkgs-qt4" } } }, diff --git a/flake.nix b/flake.nix index 5aade21..dead7bb 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-qt4.url = "github:NixOS/nixpkgs/nixos-22.11"; }; outputs = @@ -22,6 +23,9 @@ system, ... }: + let + pkgs-qt4 = inputs.nixpkgs-qt4.legacyPackages.${system}; + in { overlayAttrs = { inherit (config.packages) VSTSpeek; @@ -33,9 +37,13 @@ url = "https://blog.wavosaur.com/download/linux/VstSpeek3-x64.so.tar.gz"; hash = "sha256-xWSprHBU/7zz/KdH8nF6elwQRE29DEO9uDC4qie4n6g="; }; - nativeBuildInputs = [ pkgs.autoPatchelfHook ]; + nativeBuildInputs = [ + pkgs.autoPatchelfHook + pkgs.patchelf + ]; buildInputs = with pkgs; [ stdenv.cc.cc.lib # libstdc++ + pkgs-qt4.qt4 ]; dontUnpack = true; dontBuild = true; @@ -43,6 +51,7 @@ installPhase = '' mkdir -p $out/lib/vst tar -xzf $src -C $out/lib/vst/ + patchelf --add-rpath ${pkgs-qt4.qt4}/lib $out/lib/vst/VstSpeek3.so ''; }; packages.default = self'.packages.VSTSpeek;