haskell.lib.haskellSrc2nix: add extraCabal2nixOptions
This commit is contained in:
		
							parent
							
								
									6fcf691545
								
							
						
					
					
						commit
						a90294afe4
					
				@ -107,7 +107,7 @@ let
 | 
			
		||||
    inherit packages;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  haskellSrc2nix = { name, src, sha256 ? null }:
 | 
			
		||||
  haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
 | 
			
		||||
    let
 | 
			
		||||
      sha256Arg = if isNull sha256 then "--sha256=" else ''--sha256="${sha256}"'';
 | 
			
		||||
    in pkgs.buildPackages.stdenv.mkDerivation {
 | 
			
		||||
@ -120,7 +120,7 @@ let
 | 
			
		||||
      installPhase = ''
 | 
			
		||||
        export HOME="$TMP"
 | 
			
		||||
        mkdir -p "$out"
 | 
			
		||||
        cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
 | 
			
		||||
        cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
 | 
			
		||||
      '';
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user