Merge pull request #123984 from doronbehar/pkg/octave/withPackages

octave.buildEnv: Handle better no packages situation

authored by Doron Behar and committed by GitHub 71acbeda 3118dc79

+6 -2
+6 -2
pkgs/development/interpreters/octave/build-env.nix
··· 40 40 cd $out 41 41 fi 42 42 43 - # Remove symlinks to the input tarballs, they aren't needed. 44 - rm $out/*.tar.gz 43 + # Remove symlinks to the input tarballs, they aren't needed, use -f so it 44 + # will not fail if no .tar.gz symlinks are there - for example if 45 + # sommething which is not a tarball used as a package 46 + rm -f $out/*.tar.gz 45 47 46 48 createOctavePackagesPath $out ${octave} 47 49 50 + # Create the file even if the loop afterwards has no packages to run over 51 + touch $out/.octave_packages 48 52 for path in ${lib.concatStringsSep " " packages}; do 49 53 if [ -e $path/*.tar.gz ]; then 50 54 $out/bin/octave-cli --eval "pkg local_list $out/.octave_packages; \