about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/octave/build-env.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/octave/build-env.nix')
-rw-r--r--nixpkgs/pkgs/development/interpreters/octave/build-env.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/octave/build-env.nix b/nixpkgs/pkgs/development/interpreters/octave/build-env.nix
index 433026f0a7e9..59575f95fc4b 100644
--- a/nixpkgs/pkgs/development/interpreters/octave/build-env.nix
+++ b/nixpkgs/pkgs/development/interpreters/octave/build-env.nix
@@ -40,11 +40,15 @@ in buildEnv {
          cd $out
       fi
 
-      # Remove symlinks to the input tarballs, they aren't needed.
-      rm $out/*.tar.gz
+      # Remove symlinks to the input tarballs, they aren't needed, use -f so it
+      # will not fail if no .tar.gz symlinks are there - for example if
+      # sommething which is not a tarball used as a package
+      rm -f $out/*.tar.gz
 
       createOctavePackagesPath $out ${octave}
 
+      # Create the file even if the loop afterwards has no packages to run over
+      touch $out/.octave_packages
       for path in ${lib.concatStringsSep " " packages}; do
           if [ -e $path/*.tar.gz ]; then
              $out/bin/octave-cli --eval "pkg local_list $out/.octave_packages; \