Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LilyPond: Fix configure error - incorrectly detected fontforge version #59937

Merged
merged 1 commit into from Apr 23, 2019

Conversation

Projects
None yet
4 participants
@tex
Copy link
Contributor

commented Apr 20, 2019

Motivation for this change

Fix broken build. It fails on Hydra too.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@tex tex changed the title Fix configure error - incorrectly detected fontforge version LilyPond: Fix configure error - incorrectly detected fontforge version Apr 20, 2019

@dtzWill

This comment has been minimized.

Copy link
Contributor

commented Apr 21, 2019

I think this can be simplified further, here's what I came up with:

diff --git a/pkgs/misc/lilypond/default.nix b/pkgs/misc/lilypond/default.nix
index f312cce19d7..36d2d3864be 100644
--- a/pkgs/misc/lilypond/default.nix
+++ b/pkgs/misc/lilypond/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, ghostscript, texinfo, imagemagick, texi2html, guile
-, python2, gettext, flex, perl, bison, pkgconfig, dblatex
+, python2, gettext, flex, perl, bison, pkgconfig, autoreconfHook, dblatex
 , fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
 , fetchsvn, makeWrapper, t1utils
 , texlive, tex ? texlive.combine {
@@ -26,11 +26,6 @@ stdenv.mkDerivation rec{
   preConfigure=''
     sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
 
-    # At some point our fontforge had path 2n…-fontforge-2015… and it
-    # confused the version detection…
-    sed -re 's%("[$]exe" --version .*)([|\\] *$)%\1 | sed -re "s@/nix/store/[a-z0-9]{32}-@@" \2%' \
-      -i configure
-
     export HOME=$TMPDIR/home
   '';
 
@@ -48,10 +43,12 @@ stdenv.mkDerivation rec{
 
   buildInputs =
     [ ghostscript texinfo imagemagick texi2html guile dblatex tex zip netpbm
-      python2 gettext flex perl bison pkgconfig fontconfig freetype pango
-      fontforge help2man groff makeWrapper t1utils
+      python2 gettext flex perl bison fontconfig freetype pango
+      fontforge help2man groff t1utils
     ];
+  nativeBuildInputs = [ makeWrapper pkgconfig autoreconfHook ];
 
+  autoreconfPhase = "NOCONFIGURE=1 ./autogen.sh";
   #enableParallelBuilding = true; # fatal error: parser.hh: No such file or directory
 
   meta = with stdenv.lib; {

No need to patch in the version anywhere :). Haven't tried the parallel building, but am glad that it works now :).

@tex

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2019

@dtzWill Thanks for help, I tried autoreconfHook before, but didn't know about NOCONFIGURE=1 which led to problems that I workarounded with the direct use of automake...
The oriignal issue is with the pre-generated configure script - it gets fontforge version correctly, it prints what on screen looks like never version that lowest required but then comparsion goes south probably and error is reported incorrectly. Oh, nice world of build systems and especially autoconf/automake ;-) in this particular case.

@Infinisil

This comment has been minimized.

Copy link
Contributor

commented Apr 22, 2019

Can you squash the commits?

@tex tex force-pushed the tex:lilypond branch from 1d7d2b9 to 2f59db4 Apr 23, 2019

@tex

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

Done.

@Infinisil Infinisil merged commit 9a8d764 into NixOS:master Apr 23, 2019

13 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@Infinisil

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

Ah I didn't notice, add LilyPond: as a prefix to your commit message next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.