noweb: fix installation, use placeholders
The problem was that nix passes lists as space-separated strings not as
arrays of strings, so `"${foo[@]}"` doesn't work as intended because
it's not an array. Instead we pass it in a bash array.
Also, using builtins.placeholder instead of passing "$(out)" to bash, as
that's not what we want to do (the `$(...)` is the process expansion in
bash)
			
			
This commit is contained in:
		
							parent
							
								
									52c5c8a81f
								
							
						
					
					
						commit
						d68dfbb545
					
				@ -27,16 +27,19 @@ let noweb = stdenv.mkDerivation rec {
 | 
			
		||||
    "CC=clang"
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  installFlags = [
 | 
			
		||||
    "BIN=$(out)/bin"
 | 
			
		||||
    "ELISP=$(out)/share/emacs/site-lisp"
 | 
			
		||||
    "LIB=$(out)/lib/noweb"
 | 
			
		||||
    "MAN=$(out)/share/man"
 | 
			
		||||
    "TEXINPUTS=$(tex)/tex/latex/noweb"
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  preInstall = ''
 | 
			
		||||
    mkdir -p "$tex/tex/latex/noweb"
 | 
			
		||||
    installFlagsArray+=(                                   \
 | 
			
		||||
        "BIN=${placeholder "out"}/bin"                     \
 | 
			
		||||
        "ELISP=${placeholder "out"}/share/emacs/site-lisp" \
 | 
			
		||||
        "LIB=${placeholder "out"}/lib/noweb"               \
 | 
			
		||||
        "MAN=${placeholder "out"}/share/man"               \
 | 
			
		||||
        "TEXINPUTS=${placeholder "tex"}/tex/latex/noweb"   \
 | 
			
		||||
    )
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
  installTargets = [ "install-code" "install-tex" "install-elisp" ];
 | 
			
		||||
@ -57,7 +60,7 @@ let noweb = stdenv.mkDerivation rec {
 | 
			
		||||
 | 
			
		||||
    # HACK: This is ugly, but functional.
 | 
			
		||||
    PATH=$out/bin:$PATH make -BC xdoc
 | 
			
		||||
    make "''${installFlags[@]} install-man"
 | 
			
		||||
    make "''${installFlagsArray[@]}" install-man
 | 
			
		||||
 | 
			
		||||
    ln -s "$tex" "$out/share/texmf"
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user