trying to use flakes to build the lisp system

This commit is contained in:
Chris Cochrun 2024-03-28 14:08:04 -05:00
parent 917f67c539
commit 4b406db27f
3 changed files with 48 additions and 34 deletions

View file

@ -15,7 +15,7 @@
sbclPackages, sbclPackages,
makeWrapper, makeWrapper,
openssl, openssl,
build-asdf-system, # build-asdf-system,
pkgs, pkgs,
... ...
}: }:
@ -36,7 +36,7 @@ let
pkgs.openssl.dev pkgs.openssl.dev
]); ]);
in in
build-asdf-system { stdenv.mkDerivation {
name = "tfcconnection"; name = "tfcconnection";
pname = "tfcconnection"; pname = "tfcconnection";
version = "0.0.1"; version = "0.0.1";
@ -59,15 +59,15 @@ build-asdf-system {
# openssl.dev # openssl.dev
]; ];
# buildInputs = [ buildInputs = [
# # rustPlatform # rustPlatform
# # clippy # clippy
# # rustfmt # rustfmt
# # openssl # openssl
# # openssl.out # openssl.out
# # openssl.dev # openssl.dev
# sbcl' sbcl'
# ]; ];
nativeLibs = [ nativeLibs = [
openssl openssl
@ -75,33 +75,30 @@ build-asdf-system {
openssl.dev openssl.dev
]; ];
lispLibs = with sbclPackages; [ # lispLibs = with sbclPackages; [
hunchentoot # hunchentoot
dexador # dexador
jzon # jzon
serapeum # serapeum
deploy # deploy
spinneret # spinneret
lass # lass
cl-smtp # cl-smtp
log4cl # log4cl
]; # ];
# ${cargo}/bin/cargo build # ${cargo}/bin/cargo build
# buildPhase = '' buildPhase = ''
# export HOME=$(pwd) export HOME=$(pwd)
# ${sbcl'}/bin/sbcl --load build.lisp ${sbcl'}/bin/sbcl --load build.lisp
# ''; '';
systems = "tfcserver"; # systems = "tfcserver";
buildScript = ./build.lisp; # buildScript = ./build.lisp;
# cp target/debug/tfcapi $out/bin # cp target/debug/tfcapi $out/bin
installPhase = '' installPhase = ''
mkdir -pv $out
cp -r * $out
rm -fv $out/tfcserver
mkdir -p $out/bin mkdir -p $out/bin
cp -v tfcserver $out/bin cp -v tfcserver $out/bin
wrapProgram $out/bin/tfcserver \ wrapProgram $out/bin/tfcserver \

View file

@ -1,5 +1,20 @@
{ {
"nodes": { "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -36,6 +51,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"cl-nix-lite": "cl-nix-lite",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }

View file

@ -4,18 +4,19 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; 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 flake-utils.lib.eachDefaultSystem
(system: (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system}.extend cl-nix-lite.overlays.default;
src = ./.; src = ./.;
in in
{ {
devShell = import ./shell.nix { inherit pkgs; }; devShell = import ./shell.nix { inherit pkgs; };
defaultPackage = import ./default.nix { }; defaultPackage = pkgs.callPackage ./default.nix { };
} }
); );
} }