nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #24520 from asppsa/octave-hg

Add Octave HG version, use with purePackages.octave

authored by

Michael Raskin and committed by
GitHub
ba7a1b65 4a9da1c5

+157 -15
+7 -1
pkgs/development/interpreters/octave/default.nix
··· 41 41 ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ]) 42 42 ; 43 43 44 + # makeinfo is required by Octave at runtime to display help 45 + prePatch = '' 46 + substituteInPlace libinterp/corefcn/help.cc \ 47 + --replace 'Vmakeinfo_program = "makeinfo"' \ 48 + 'Vmakeinfo_program = "${texinfo}/bin/makeinfo"' 49 + '' 44 50 # REMOVE ON VERSION BUMP 45 51 # Needed for Octave-4.2.1 on darwin. See https://savannah.gnu.org/bugs/?50234 46 - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' 52 + + stdenv.lib.optionalString stdenv.isDarwin '' 47 53 sed 's/inline file_stat::~file_stat () { }/file_stat::~file_stat () { }/' -i ./liboctave/system/file-stat.cc 48 54 ''; 49 55
+75
pkgs/development/interpreters/octave/hg.nix
··· 1 + args@{ stdenv, openblas, ghostscript ? null, texinfo 2 + 3 + , # These are arguments that shouldn't be passed to the 4 + # octave package. 5 + texlive, tex ? texlive.combined.scheme-small 6 + , epstool, pstoedit, transfig 7 + , lib, fetchhg, callPackage 8 + , autoconf, automake, libtool 9 + , bison, librsvg, icoutils, gperf 10 + 11 + , # These are options that can be passed in addition to the ones 12 + # octave usually takes. 13 + # - rev is the HG revision. Use "tip" for the bleeding edge. 14 + # - docs can be set to false to skip building documentation. 15 + rev ? "23269", docs ? true 16 + 17 + , # All remaining arguments will be passed to the octave package. 18 + ... 19 + }: 20 + 21 + with stdenv.lib; 22 + let 23 + octaveArgs = removeAttrs args 24 + [ "texlive" "tex" 25 + "epstool" "pstoedit" "transfig" 26 + "lib" "fetchhg" "callPackage" 27 + "autoconf" "automake" "libtool" 28 + "bison" "librsvg" "icoutils" "gperf" 29 + "rev" "docs" 30 + ]; 31 + octave = callPackage ./default.nix octaveArgs; 32 + 33 + # List of hashes for known HG revisions. 34 + sha256s = { 35 + "23269" = "87f560e873ad1454fdbcdd8aca65f9f0b1e605bdc00aebbdc4f9d862ca72ff1d"; 36 + }; 37 + 38 + in lib.overrideDerivation octave (attrs: rec { 39 + version = "4.3.0pre${rev}"; 40 + name = "octave-${version}"; 41 + 42 + src = fetchhg { 43 + url = http://www.octave.org/hg/octave; 44 + inherit rev; 45 + 46 + sha256 = 47 + if builtins.hasAttr rev sha256s 48 + then builtins.getAttr rev sha256s 49 + else null; 50 + 51 + fetchSubrepos = true; 52 + }; 53 + 54 + # Octave's test for including this flag seems to be broken in 4.3. 55 + F77_INTEGER_8_FLAG = optional openblas.blas64 "-fdefault-integer-8"; 56 + 57 + # This enables texinfo to find the files it needs. 58 + TEXINPUTS = ".:build-aux:${texinfo}/texmf-dist/tex/generic/epsf:"; 59 + 60 + disableDocs = !docs || ghostscript == null; 61 + 62 + nativeBuildInputs = attrs.nativeBuildInputs 63 + ++ [ autoconf automake libtool bison librsvg icoutils gperf ] 64 + ++ optionals (!disableDocs) [ tex epstool pstoedit transfig ]; 65 + 66 + # Run bootstrap before any other patches, as other patches may refer 67 + # to files that are generated by the bootstrap. 68 + prePatch = '' 69 + patchShebangs bootstrap 70 + ./bootstrap 71 + '' + attrs.prePatch; 72 + 73 + configureFlags = attrs.configureFlags ++ 74 + optional disableDocs "--disable-docs"; 75 + })
+3 -1
pkgs/development/pure-modules/octave/default.nix
··· 19 19 description = "An Octave module for the Pure programming language"; 20 20 homepage = http://puredocs.bitbucket.org/pure-octave.html; 21 21 license = stdenv.lib.licenses.gpl3Plus; 22 - platforms = stdenv.lib.platforms.linux; 22 + # This is set to none for now because it does not work with the 23 + # current stable version of Octave. 24 + platforms = stdenv.lib.platforms.none; 23 25 maintainers = with stdenv.lib.maintainers; [ asppsa ]; 24 26 }; 25 27 }
+25
pkgs/tools/graphics/epstool/default.nix
··· 1 + { stdenv, fetchurl }: 2 + 3 + stdenv.mkDerivation rec { 4 + version = "3.08"; 5 + name = "epstool-${version}"; 6 + 7 + src = fetchurl { 8 + url = "http://ftp.de.debian.org/debian/pool/main/e/epstool/epstool_${version}+repack.orig.tar.gz"; 9 + sha256 = "1pfgqbipwk36clhma2k365jkpvyy75ahswn8jczzys382jalpwgk"; 10 + }; 11 + 12 + installPhase = '' 13 + make EPSTOOL_ROOT=$out install 14 + ''; 15 + 16 + patches = [ ./gcc43.patch ]; 17 + 18 + meta = with stdenv.lib; { 19 + description = "A utility to create or extract preview images in EPS files, fix bounding boxes and convert to bitmaps"; 20 + homepage = http://pages.cs.wisc.edu/~ghost/gsview/epstool.htm; 21 + license = licenses.gpl2; 22 + maintainers = [ maintainers.asppsa ]; 23 + platforms = platforms.linux; 24 + }; 25 + }
+20
pkgs/tools/graphics/epstool/gcc43.patch
··· 1 + --- epstool-3.08.orig/src/epstool.c 2005-06-10 04:41:00.000000000 -0500 2 + +++ epstool-3.08/src/epstool.c 2009-02-16 20:55:43.186140029 -0600 3 + @@ -2824,7 +2824,7 @@ 4 + code = -1; 5 + } 6 + if ((code==0) && stdout_name && (hChildStdoutWr == -1)) { 7 + - handle = open(stdout_name, O_WRONLY | O_CREAT); 8 + + handle = open(stdout_name, O_WRONLY | O_CREAT, 0644); 9 + hChildStdoutWr = dup2(handle, 1); 10 + if (handle != -1) 11 + close(handle); 12 + @@ -2832,7 +2832,7 @@ 13 + code = -1; 14 + } 15 + if ((code==0) && stderr_name && (hChildStderrWr == -1)) { 16 + - handle = open(stderr_name, O_WRONLY | O_CREAT); 17 + + handle = open(stderr_name, O_WRONLY | O_CREAT, 0644); 18 + hChildStderrWr = dup2(handle, 2); 19 + if (handle != -1) 20 + close(handle);
+25 -11
pkgs/top-level/all-packages.nix
··· 1674 1674 1675 1675 eplot = callPackage ../tools/graphics/eplot { }; 1676 1676 1677 + epstool = callPackage ../tools/graphics/epstool { }; 1678 + 1677 1679 ethtool = callPackage ../tools/misc/ethtool { }; 1678 1680 1679 1681 ettercap = callPackage ../applications/networking/sniffers/ettercap { }; ··· 5943 5941 git = gitMinimal; 5944 5942 }; 5945 5943 5946 - octave = callPackage ../development/interpreters/octave { 5947 - qt = null; 5948 - ghostscript = null; 5949 - graphicsmagick = null; 5950 - llvm = null; 5951 - hdf5 = null; 5952 - glpk = null; 5953 - suitesparse = null; 5954 - jdk = null; 5955 - openblas = if stdenv.isDarwin then openblasCompat else openblas; 5956 - }; 5944 + inherit ( 5945 + let 5946 + defaultOctaveOptions = { 5947 + qt = null; 5948 + ghostscript = null; 5949 + graphicsmagick = null; 5950 + llvm = null; 5951 + hdf5 = null; 5952 + glpk = null; 5953 + suitesparse = null; 5954 + jdk = null; 5955 + openblas = if stdenv.isDarwin then openblasCompat else openblas; 5956 + }; 5957 + 5958 + hgOctaveOptions = 5959 + (removeAttrs defaultOctaveOptions ["ghostscript"]) // { 5960 + overridePlatforms = stdenv.lib.platforms.none; 5961 + }; 5962 + in { 5963 + octave = callPackage ../development/interpreters/octave defaultOctaveOptions; 5964 + octaveHg = lowPrio (callPackage ../development/interpreters/octave/hg.nix hgOctaveOptions); 5965 + }) octave octaveHg; 5966 + 5957 5967 octaveFull = (lowPrio (callPackage ../development/interpreters/octave { 5958 5968 qt = qt4; 5959 5969 overridePlatforms = ["x86_64-linux" "x86_64-darwin"];
+2 -2
pkgs/top-level/pure-packages.nix
··· 1 - { callPackage }: 1 + { callPackage, octaveHg }: 2 2 3 3 rec { 4 4 audio = callPackage ../development/pure-modules/audio { }; ··· 19 19 lv2 = callPackage ../development/pure-modules/lv2 { }; 20 20 midi = callPackage ../development/pure-modules/midi { }; 21 21 mpfr = callPackage ../development/pure-modules/mpfr { }; 22 - octave = callPackage ../development/pure-modules/octave { }; 22 + octave = callPackage ../development/pure-modules/octave { octave = octaveHg; }; 23 23 odbc = callPackage ../development/pure-modules/odbc { }; 24 24 pandoc = callPackage ../development/pure-modules/pandoc { }; 25 25 rational = callPackage ../development/pure-modules/rational { };