about summary refs log tree commit diff
path: root/pkgs/development/interpreters/octave
diff options
context:
space:
mode:
authorKarl Hallsby <karl@hallsby.com>2022-12-22 13:29:17 -0600
committerDoron Behar <doron.behar@gmail.com>2023-03-15 15:58:01 +0200
commit17ea94881f78ff37d0123bc67ee82471d6d014ca (patch)
tree7c3b488b38d852ebfbe52439dcb1e322d367f084 /pkgs/development/interpreters/octave
parentd746510795eca99e8c66fc6b124480ef9f336eb7 (diff)
octavePackages: add automatic updating script based on Python's
This script is heavily based on the script used to update all python
libraries at
pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py

The Octave Packages' website uses YAML as their basis, so we must
reformat to use YAML instead of JSON.
Diffstat (limited to 'pkgs/development/interpreters/octave')
-rw-r--r--pkgs/development/interpreters/octave/build-octave-package.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/octave/build-octave-package.nix b/pkgs/development/interpreters/octave/build-octave-package.nix
index 065992f91271a..30f9bc3b5e1ce 100644
--- a/pkgs/development/interpreters/octave/build-octave-package.nix
+++ b/pkgs/development/interpreters/octave/build-octave-package.nix
@@ -62,13 +62,21 @@ let
   ]
   ++ nativeBuildInputs;
 
+  passthru' = {
+    updateScript = [
+      ../../../../maintainers/scripts/update-octave-packages
+      (builtins.unsafeGetAttrPos "pname" octave.pkgs.${attrs.pname}).file
+    ];
+  }
+  // passthru;
+
   # This step is required because when
   # a = { test = [ "a" "b" ]; }; b = { test = [ "c" "d" ]; };
   # (a // b).test = [ "c" "d" ];
   # This used to mean that if a package defined extra nativeBuildInputs, it
   # would override the ones for building an Octave package (the hook and Octave
   # itself, causing everything to fail.
-  attrs' = builtins.removeAttrs attrs [ "nativeBuildInputs" ];
+  attrs' = builtins.removeAttrs attrs [ "nativeBuildInputs" "passthru" ];
 
 in stdenv.mkDerivation ({
   packageName = "${fullLibName}";
@@ -121,5 +129,7 @@ in stdenv.mkDerivation ({
   # together with Octave.
   dontInstall = true;
 
+  passthru = passthru';
+
   inherit meta;
 } // attrs')