switching the nix build to build the rust api

This commit is contained in:
Chris Cochrun 2024-01-08 11:17:10 -06:00
parent 0a04063298
commit baefa36f11
5 changed files with 73 additions and 102 deletions

2
Cargo.lock generated
View file

@ -1850,7 +1850,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "tfcconnection" name = "tfcapi"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"actix-multipart", "actix-multipart",

View file

@ -1,5 +1,5 @@
[package] [package]
name = "tfcconnection" name = "tfcapi"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View file

@ -1,7 +1,7 @@
all: build-server all: build-server
build-server: build-server:
sbcl --load build.lisp cargo build
serve: serve:
hugo server --noHTTPCache --disableFastRender hugo server --noHTTPCache --disableFastRender

View file

@ -2108,10 +2108,6 @@ select {
width: 0.75rem; width: 0.75rem;
} }
.w-64 {
width: 16rem;
}
.min-w-0 { .min-w-0 {
min-width: 0px; min-width: 0px;
} }
@ -2186,10 +2182,6 @@ select {
flex: 0 1 auto; flex: 0 1 auto;
} }
.shrink {
flex-shrink: 1;
}
.grow { .grow {
flex-grow: 1; flex-grow: 1;
} }
@ -2198,18 +2190,6 @@ select {
flex-basis: 100%; flex-basis: 100%;
} }
.basis-1\/2 {
flex-basis: 50%;
}
.basis-1\/3 {
flex-basis: 33.333333%;
}
.basis-2\/3 {
flex-basis: 66.666667%;
}
.basis-1\/4 { .basis-1\/4 {
flex-basis: 25%; flex-basis: 25%;
} }
@ -2218,6 +2198,14 @@ select {
flex-basis: 75%; flex-basis: 75%;
} }
.basis-1\/2 {
flex-basis: 50%;
}
.basis-1\/3 {
flex-basis: 33.333333%;
}
.-translate-y-8 { .-translate-y-8 {
--tw-translate-y: -2rem; --tw-translate-y: -2rem;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@ -2298,10 +2286,6 @@ select {
gap: 3rem; gap: 3rem;
} }
.gap-8 {
gap: 2rem;
}
.gap-4 { .gap-4 {
gap: 1rem; gap: 1rem;
} }
@ -2949,6 +2933,11 @@ select {
color: rgba(var(--color-neutral), var(--tw-text-opacity)) !important; color: rgba(var(--color-neutral), var(--tw-text-opacity)) !important;
} }
.text-secondary-500 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-500), var(--tw-text-opacity));
}
.text-neutral-700 { .text-neutral-700 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); color: rgba(var(--color-neutral-700), var(--tw-text-opacity));
@ -2998,31 +2987,6 @@ select {
color: transparent; color: transparent;
} }
.text-secondary-300 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-300), var(--tw-text-opacity));
}
.text-secondary-100 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-100), var(--tw-text-opacity));
}
.text-secondary-200 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-200), var(--tw-text-opacity));
}
.text-secondary-700 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-700), var(--tw-text-opacity));
}
.text-secondary-500 {
--tw-text-opacity: 1;
color: rgba(var(--color-secondary-500), var(--tw-text-opacity));
}
.\!no-underline { .\!no-underline {
text-decoration-line: none !important; text-decoration-line: none !important;
} }
@ -5469,10 +5433,6 @@ pre {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.md\:grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.md\:grid-cols-3 { .md\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
} }
@ -5590,10 +5550,6 @@ pre {
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
} }
.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lg\:grid-cols-2 { .lg\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }

View file

@ -3,73 +3,88 @@
lib, lib,
hugo, hugo,
go, go,
sbcl, cargo,
sbclPackages, rustc,
clippy,
rust-analyzer,
rustfmt,
pkg-config,
# sbcl,
# sbclPackages,
makeWrapper, makeWrapper,
openssl openssl,
rustPlatform
}: }:
let # let
sbcl' = sbcl.withPackages (ps: with ps; [ # sbcl' = sbcl.withPackages (ps: with ps; [
hunchentoot # hunchentoot
dexador # dexador
jzon # jzon
serapeum # serapeum
deploy # deploy
spinneret # spinneret
lass # lass
cl-smtp # cl-smtp
# pkgs.openssl # # pkgs.openssl
# pkgs.openssl.out # # pkgs.openssl.out
# pkgs.openssl.dev # # pkgs.openssl.dev
]); # ]);
in # in
sbcl.buildASDFSystem { rustPlatform.buildRustPackage rec {
name = "tfcconnection"; name = "tfcconnection";
pname = "tfcconnection"; pname = "tfcconnection";
version = "0.0.1"; version = "0.0.1";
src = ./.; src = ./.;
# cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts=";
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper makeWrapper
pkg-config
rustc
cargo
]; ];
buildInputs = [ buildInputs = [
hugo # rustPlatform
go # clippy
sbcl' # rustfmt
openssl openssl
openssl.out # openssl.out
openssl.dev # openssl.dev
]; ];
nativeLibs = [ # nativeLibs = [
openssl # openssl
openssl.out # openssl.out
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
]; # ];
buildPhase = '' buildPhase = ''
export HOME=$(pwd) export HOME=$(pwd)
${sbcl'}/bin/sbcl --load build.lisp ${cargo}/bin/cargo build
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp tfcserver $out/bin cp target/debug/tfcapi $out/bin
wrapProgram $out/bin/tfcserver \ wrapProgram $out/bin/tfcapi \
--prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \ --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \
''; '';