forked from fediversity/fediversity
		
	
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			662 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			662 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  lib,
 | 
						|
  pkgs,
 | 
						|
  httpBackend,
 | 
						|
  tfPackage,
 | 
						|
  tfDirs,
 | 
						|
  sources ? import ../../npins,
 | 
						|
}:
 | 
						|
pkgs.stdenv.mkDerivation {
 | 
						|
  name = "tf-repo";
 | 
						|
  src =
 | 
						|
    with lib.fileset;
 | 
						|
    toSource {
 | 
						|
      root = ../../.;
 | 
						|
      # don't copy ignored files
 | 
						|
      fileset = gitTracked ../../.;
 | 
						|
    };
 | 
						|
  buildInputs = [
 | 
						|
    tfPackage
 | 
						|
    (pkgs.callPackage ./tf-setup.nix { inherit sources httpBackend; })
 | 
						|
  ];
 | 
						|
  buildPhase = ''
 | 
						|
    runHook preBuild
 | 
						|
    for category in ${builtins.toString tfDirs}; do
 | 
						|
      pushd "$category"
 | 
						|
      source setup
 | 
						|
      popd
 | 
						|
    done
 | 
						|
    runHook postBuild
 | 
						|
  '';
 | 
						|
  installPhase = ''
 | 
						|
    runHook preInstall
 | 
						|
    cp -r . $out
 | 
						|
    runHook postInstall
 | 
						|
  '';
 | 
						|
}
 |