Skip to content

Commit

Permalink
octave-packages: switch to using makeScope for all octave packages
Browse files Browse the repository at this point in the history
This allows packages to declare other octave package dependencies in
their respective definitions, and when added here, they are implicitly
passed.

In response to:
NixOS#108562 (comment)
  • Loading branch information
KarlJoad committed Jan 7, 2021
1 parent 61d36df commit a959773
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions pkgs/top-level/octave-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -88,4 +84,4 @@ in rec {
]));
};

}
})

0 comments on commit a959773

Please sign in to comment.