trying to use flakes to build the lisp system
This commit is contained in:
		
							parent
							
								
									917f67c539
								
							
						
					
					
						commit
						4b406db27f
					
				
					 3 changed files with 48 additions and 34 deletions
				
			
		
							
								
								
									
										59
									
								
								default.nix
									
										
									
									
									
								
							
							
						
						
									
										59
									
								
								default.nix
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -15,7 +15,7 @@
 | 
			
		|||
  sbclPackages,
 | 
			
		||||
  makeWrapper,
 | 
			
		||||
  openssl,
 | 
			
		||||
  build-asdf-system,
 | 
			
		||||
  # build-asdf-system,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ let
 | 
			
		|||
    pkgs.openssl.dev
 | 
			
		||||
  ]);
 | 
			
		||||
in
 | 
			
		||||
build-asdf-system {
 | 
			
		||||
stdenv.mkDerivation {
 | 
			
		||||
  name = "tfcconnection";
 | 
			
		||||
  pname = "tfcconnection";
 | 
			
		||||
  version = "0.0.1";
 | 
			
		||||
| 
						 | 
				
			
			@ -59,15 +59,15 @@ build-asdf-system {
 | 
			
		|||
    # openssl.dev
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  # buildInputs = [
 | 
			
		||||
  #   # rustPlatform
 | 
			
		||||
  #   # clippy
 | 
			
		||||
  #   # rustfmt
 | 
			
		||||
  #   # openssl
 | 
			
		||||
  #   # openssl.out
 | 
			
		||||
  #   # openssl.dev
 | 
			
		||||
  #   sbcl'
 | 
			
		||||
  # ];
 | 
			
		||||
  buildInputs = [
 | 
			
		||||
    # rustPlatform
 | 
			
		||||
    # clippy
 | 
			
		||||
    # rustfmt
 | 
			
		||||
    # openssl
 | 
			
		||||
    # openssl.out
 | 
			
		||||
    # openssl.dev
 | 
			
		||||
    sbcl'
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  nativeLibs = [
 | 
			
		||||
    openssl
 | 
			
		||||
| 
						 | 
				
			
			@ -75,33 +75,30 @@ build-asdf-system {
 | 
			
		|||
    openssl.dev
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  lispLibs = with sbclPackages; [
 | 
			
		||||
    hunchentoot
 | 
			
		||||
    dexador
 | 
			
		||||
    jzon
 | 
			
		||||
    serapeum
 | 
			
		||||
    deploy
 | 
			
		||||
    spinneret
 | 
			
		||||
    lass
 | 
			
		||||
    cl-smtp
 | 
			
		||||
    log4cl
 | 
			
		||||
  ];
 | 
			
		||||
  # lispLibs = with sbclPackages; [
 | 
			
		||||
  #   hunchentoot
 | 
			
		||||
  #   dexador
 | 
			
		||||
  #   jzon
 | 
			
		||||
  #   serapeum
 | 
			
		||||
  #   deploy
 | 
			
		||||
  #   spinneret
 | 
			
		||||
  #   lass
 | 
			
		||||
  #   cl-smtp
 | 
			
		||||
  #   log4cl
 | 
			
		||||
  # ];
 | 
			
		||||
 | 
			
		||||
  # ${cargo}/bin/cargo build
 | 
			
		||||
  # buildPhase = ''
 | 
			
		||||
  # export HOME=$(pwd)
 | 
			
		||||
  # ${sbcl'}/bin/sbcl --load build.lisp
 | 
			
		||||
  # '';
 | 
			
		||||
  buildPhase = ''
 | 
			
		||||
  export HOME=$(pwd)
 | 
			
		||||
  ${sbcl'}/bin/sbcl --load build.lisp
 | 
			
		||||
  '';
 | 
			
		||||
 | 
			
		||||
  systems = "tfcserver";
 | 
			
		||||
  # systems = "tfcserver";
 | 
			
		||||
 | 
			
		||||
  buildScript = ./build.lisp;
 | 
			
		||||
  # buildScript = ./build.lisp;
 | 
			
		||||
 | 
			
		||||
  # cp target/debug/tfcapi $out/bin
 | 
			
		||||
  installPhase = ''
 | 
			
		||||
  mkdir -pv $out
 | 
			
		||||
  cp -r * $out
 | 
			
		||||
  rm -fv $out/tfcserver
 | 
			
		||||
  mkdir -p $out/bin
 | 
			
		||||
  cp -v tfcserver $out/bin
 | 
			
		||||
  wrapProgram $out/bin/tfcserver \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										16
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										16
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							| 
						 | 
				
			
			@ -1,5 +1,20 @@
 | 
			
		|||
{
 | 
			
		||||
  "nodes": {
 | 
			
		||||
    "cl-nix-lite": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1709357207,
 | 
			
		||||
        "narHash": "sha256-YZgXj6oL2Y/zDkSkGcoacpQPRLiYM8KeEB68CUs2irc=",
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "cl-nix-lite",
 | 
			
		||||
        "rev": "f55d263b30a601b1b4dd61b7c8787e97510f4018",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "owner": "hraban",
 | 
			
		||||
        "repo": "cl-nix-lite",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "flake-utils": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "systems": "systems"
 | 
			
		||||
| 
						 | 
				
			
			@ -36,6 +51,7 @@
 | 
			
		|||
    },
 | 
			
		||||
    "root": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "cl-nix-lite": "cl-nix-lite",
 | 
			
		||||
        "flake-utils": "flake-utils",
 | 
			
		||||
        "nixpkgs": "nixpkgs"
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,18 +4,19 @@
 | 
			
		|||
  inputs = {
 | 
			
		||||
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
 | 
			
		||||
    flake-utils.url = "github:numtide/flake-utils";
 | 
			
		||||
    cl-nix-lite.url = "github:hraban/cl-nix-lite";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  outputs = { self, nixpkgs, flake-utils }:
 | 
			
		||||
  outputs = { self, nixpkgs, flake-utils, cl-nix-lite }:
 | 
			
		||||
    flake-utils.lib.eachDefaultSystem
 | 
			
		||||
      (system:
 | 
			
		||||
        let
 | 
			
		||||
          pkgs = nixpkgs.legacyPackages.${system};
 | 
			
		||||
          pkgs = nixpkgs.legacyPackages.${system}.extend cl-nix-lite.overlays.default;
 | 
			
		||||
          src = ./.;
 | 
			
		||||
        in 
 | 
			
		||||
        {
 | 
			
		||||
          devShell = import ./shell.nix { inherit pkgs; };
 | 
			
		||||
          defaultPackage = import ./default.nix { };
 | 
			
		||||
          defaultPackage = pkgs.callPackage ./default.nix { };
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue