This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
		
			
				
	
	
		
			80 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { depot, pkgs, ... }:
 | |
| 
 | |
| let
 | |
|   inherit (pkgs) sbcl runCommand writeText;
 | |
|   inherit (depot.nix.buildLisp) bundled;
 | |
| 
 | |
|   src = pkgs.fetchFromGitHub {
 | |
|     owner = "edicl";
 | |
|     repo = "cl-unicode";
 | |
|     rev = "8073fc5634c9d4802888ac03abf11dfe383e16fa";
 | |
|     sha256 = "0ykx2s9lqfl74p1px0ik3l2izd1fc9jd1b4ra68s5x34rvjy0hza";
 | |
|   };
 | |
| 
 | |
|   cl-unicode-base = depot.nix.buildLisp.library {
 | |
|     name = "cl-unicode-base";
 | |
|     deps = with depot.third_party.lisp; [
 | |
|       cl-ppcre
 | |
|     ];
 | |
| 
 | |
|     srcs = map (f: src + ("/" + f)) [
 | |
|       "packages.lisp"
 | |
|       "specials.lisp"
 | |
|       "util.lisp"
 | |
|     ];
 | |
|   };
 | |
| 
 | |
|   cl-unicode-build = depot.nix.buildLisp.program {
 | |
|     name = "cl-unicode-build";
 | |
|     deps = with depot.third_party.lisp; [
 | |
|       cl-unicode-base
 | |
|       flexi-streams
 | |
|       {
 | |
|         ecl = bundled "asdf";
 | |
|         default = bundled "uiop";
 | |
|       }
 | |
|     ];
 | |
| 
 | |
|     srcs = (map (f: src + ("/build/" + f)) [
 | |
|       "util.lisp"
 | |
|       "char-info.lisp"
 | |
|       "read.lisp"
 | |
|     ]) ++ [
 | |
|       (runCommand "dump.lisp" { } ''
 | |
|         substitute ${src}/build/dump.lisp $out \
 | |
|           --replace ':defaults *this-file*' ":defaults (uiop:getcwd)"
 | |
|       '')
 | |
| 
 | |
|       (writeText "export-create-source-files.lisp" ''
 | |
|         (in-package :cl-unicode)
 | |
|         (export 'create-source-files)
 | |
|       '')
 | |
|     ];
 | |
| 
 | |
|     main = "cl-unicode:create-source-files";
 | |
|   };
 | |
| 
 | |
| 
 | |
|   generated = runCommand "cl-unicode-generated" { } ''
 | |
|     mkdir -p $out/build
 | |
|     mkdir -p $out/test
 | |
|     cd $out/build
 | |
|     pwd
 | |
|     ${cl-unicode-build}/bin/cl-unicode-build
 | |
|   '';
 | |
| 
 | |
| in
 | |
| depot.nix.buildLisp.library {
 | |
|   name = "cl-unicode";
 | |
|   deps = [ cl-unicode-base ];
 | |
|   srcs = [
 | |
|     "${src}/conditions.lisp"
 | |
|     "${generated}/lists.lisp"
 | |
|     "${generated}/hash-tables.lisp"
 | |
|     "${src}/api.lisp"
 | |
|     "${generated}/methods.lisp"
 | |
|     "${src}/test-functions.lisp"
 | |
|     "${src}/derived.lisp"
 | |
|     "${src}/alias.lisp"
 | |
|   ];
 | |
| }
 |