This was supposed to be a new patchset of the previous commit, but due to ??? the change became submittable in between patchsets and I submitted it. Change-Id: I92aca64a9f3eee5b7ede6e9fa37d3b12d3f5d1f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3729 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			778 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			778 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
# dfmt is a code formatter for D
 | 
						|
{ pkgs, lib, ... }:
 | 
						|
 | 
						|
pkgs.stdenv.mkDerivation rec {
 | 
						|
  pname = "dfmt";
 | 
						|
  version = "0.13.4";
 | 
						|
 | 
						|
  src = pkgs.fetchFromGitHub {
 | 
						|
    owner = "dlang-community";
 | 
						|
    repo = "dfmt";
 | 
						|
    rev = "v${version}";
 | 
						|
    sha256 = "02a8qvrmnl1c15y6irxlhqpr0hjj5s8qk0jc20ivj0fl6p4v9shj";
 | 
						|
    fetchSubmodules = true;
 | 
						|
  };
 | 
						|
 | 
						|
  nativeBuildInputs = with pkgs; [
 | 
						|
    dmd
 | 
						|
 | 
						|
    # fake git that will be used to fetch the version string
 | 
						|
    (pkgs.writeShellScriptBin "git" "echo 'v${version}'")
 | 
						|
  ];
 | 
						|
 | 
						|
  DFLAGS = "-release";
 | 
						|
 | 
						|
  installPhase = ''
 | 
						|
    mkdir -p $out/bin
 | 
						|
    cp bin/dfmt $out/bin/
 | 
						|
    strip -s $out/bin/dfmt
 | 
						|
  '';
 | 
						|
 | 
						|
  meta = {
 | 
						|
    description = "D code formatter";
 | 
						|
    homepage = "https://github.com/dlang-community/dfmt";
 | 
						|
    license = lib.licenses.boost;
 | 
						|
  };
 | 
						|
}
 |