From b8c112aef656982f204e669ac195b94b57a85e21 Mon Sep 17 00:00:00 2001 From: Thomas Nixon Date: Mon, 20 Nov 2023 15:36:27 +0000 Subject: [PATCH] nix: visr src as flake input --- flake.nix | 9 +++++++-- nix/visr.nix | 7 ++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 0bbcb81..2cf6f48 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,12 @@ flake = false; }; - outputs = { self, nixpkgs, flake-utils, ear_src, libear_src }: + inputs.visr_src = { + url = "https://github.com/ebu/bear/releases/download/v0.0.1-pre/visr-0.13.0-pre-5e13f020.zip"; + flake = false; + }; + + outputs = { self, nixpkgs, flake-utils, ear_src, libear_src, visr_src }: flake-utils.lib.eachDefaultSystem (system: let @@ -60,7 +65,7 @@ ear = pkgs.callPackage ./nix/ear.nix { inherit python; src = ear_src; }; libear = pkgs.callPackage ./nix/libear.nix { inherit xsimd; src = libear_src; }; - visr = pkgs.callPackage ./nix/visr.nix { inherit python; }; + visr = pkgs.callPackage ./nix/visr.nix { inherit python; src = visr_src; }; visr_python = python.pkgs.toPythonModule visr; visr_bear = pkgs.callPackage ./nix/visr_bear.nix { inherit python data_files libear visr_python; src = visr_bear_src; }; diff --git a/nix/visr.nix b/nix/visr.nix index ee690f6..d336517 100644 --- a/nix/visr.nix +++ b/nix/visr.nix @@ -1,10 +1,7 @@ -{ stdenv, cmake, python, boost, fetchzip }: +{ stdenv, cmake, python, boost, fetchzip, src }: stdenv.mkDerivation rec { name = "VISR"; - src = fetchzip { - url = "https://github.com/ebu/bear/releases/download/v0.0.1-pre/visr-0.13.0-pre-5e13f020.zip"; - sha256 = "1jgrzjlh5kqbq06vz6pnn6yvml1bqjk33rblqfqja7v02b0pzv07"; - }; + inherit src; nativeBuildInputs = [ cmake boost python.buildEnv ]; cmakeFlags = [ "-DBUILD_AUDIOINTERFACES_PORTAUDIO=FALSE"