From a9597730631bb5f8b0086a273811a930cbb7b6a0 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Thu, 7 Jan 2021 11:21:59 -0600 Subject: [PATCH] octave-packages: switch to using makeScope for all octave packages This allows packages to declare other octave package dependencies in their respective definitions, and when added here, they are implicitly passed. In response to: https://github.com/NixOS/nixpkgs/pull/108562#discussion_r552655272 --- pkgs/top-level/octave-packages.nix | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pkgs/top-level/octave-packages.nix b/pkgs/top-level/octave-packages.nix index 1de228f61c075..d1415deded826 100644 --- a/pkgs/top-level/octave-packages.nix +++ b/pkgs/top-level/octave-packages.nix @@ -20,25 +20,21 @@ , nettle }: -let +with lib; - isOctaveFull = octave.enableQt; - isOctaveJIT = octave.enableJIT; +makeScope newScope (self: + let + callPackage = self.callPackage; - buildOctaveLibrary = callPackage ../development/interpreters/octave/mk-octave-derivation.nix { - inherit pkgs lib stdenv; - namePrefix = "${octave.pname}-${octave.version}"; - inherit octave; - }; + buildOctaveLibrary = callPackage ../development/interpreters/octave/mk-octave-derivation.nix { + inherit pkgs lib stdenv; + namePrefix = "${octave.pname}-${octave.version}"; + inherit octave; + }; - callPackage = pkgs.newScope { - inherit (pkgs) lib stdenv; - inherit buildOctaveLibrary; - inherit fetchurl; - inherit gnuplot texinfo; - }; + in { -in rec { + inherit callPackage buildOctaveLibrary; control = callPackage ../development/octave-modules/control { gfortran = gfortran; @@ -88,4 +84,4 @@ in rec { ])); }; -} + })