From baefa36f11b41b3cafe76bc32dfe6be8c85ca6c1 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 8 Jan 2024 11:17:10 -0600 Subject: [PATCH] switching the nix build to build the rust api --- Cargo.lock | 2 +- Cargo.toml | 2 +- Makefile | 2 +- assets/css/compiled/main.css | 70 +++++-------------------- default.nix | 99 +++++++++++++++++++++--------------- 5 files changed, 73 insertions(+), 102 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 569ca04..54b4660 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1850,7 +1850,7 @@ dependencies = [ ] [[package]] -name = "tfcconnection" +name = "tfcapi" version = "0.1.0" dependencies = [ "actix-multipart", diff --git a/Cargo.toml b/Cargo.toml index 2f25970..6c47d9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tfcconnection" +name = "tfcapi" version = "0.1.0" edition = "2021" diff --git a/Makefile b/Makefile index 17111b2..31d30f4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: build-server build-server: - sbcl --load build.lisp + cargo build serve: hugo server --noHTTPCache --disableFastRender diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index e9986cc..47af327 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2108,10 +2108,6 @@ select { width: 0.75rem; } -.w-64 { - width: 16rem; -} - .min-w-0 { min-width: 0px; } @@ -2186,10 +2182,6 @@ select { flex: 0 1 auto; } -.shrink { - flex-shrink: 1; -} - .grow { flex-grow: 1; } @@ -2198,18 +2190,6 @@ select { 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 { flex-basis: 25%; } @@ -2218,6 +2198,14 @@ select { flex-basis: 75%; } +.basis-1\/2 { + flex-basis: 50%; +} + +.basis-1\/3 { + flex-basis: 33.333333%; +} + .-translate-y-8 { --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)); @@ -2298,10 +2286,6 @@ select { gap: 3rem; } -.gap-8 { - gap: 2rem; -} - .gap-4 { gap: 1rem; } @@ -2949,6 +2933,11 @@ select { 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 { --tw-text-opacity: 1; color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); @@ -2998,31 +2987,6 @@ select { 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 { text-decoration-line: none !important; } @@ -5469,10 +5433,6 @@ pre { grid-template-columns: repeat(2, minmax(0, 1fr)); } - .md\:grid-cols-1 { - grid-template-columns: repeat(1, minmax(0, 1fr)); - } - .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @@ -5590,10 +5550,6 @@ pre { grid-template-columns: repeat(4, minmax(0, 1fr)); } - .lg\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } diff --git a/default.nix b/default.nix index 035103d..b68f410 100644 --- a/default.nix +++ b/default.nix @@ -3,73 +3,88 @@ lib, hugo, go, - sbcl, - sbclPackages, + cargo, + rustc, + clippy, + rust-analyzer, + rustfmt, + pkg-config, + # sbcl, + # sbclPackages, makeWrapper, - openssl + openssl, + rustPlatform }: -let - sbcl' = sbcl.withPackages (ps: with ps; [ - hunchentoot - dexador - jzon - serapeum - deploy - spinneret - lass - cl-smtp - # pkgs.openssl - # pkgs.openssl.out - # pkgs.openssl.dev - ]); -in -sbcl.buildASDFSystem { +# let +# sbcl' = sbcl.withPackages (ps: with ps; [ +# hunchentoot +# dexador +# jzon +# serapeum +# deploy +# spinneret +# lass +# cl-smtp +# # pkgs.openssl +# # pkgs.openssl.out +# # pkgs.openssl.dev +# ]); +# in +rustPlatform.buildRustPackage rec { name = "tfcconnection"; pname = "tfcconnection"; version = "0.0.1"; src = ./.; + # cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts="; + cargoLock = { + lockFile = ./Cargo.lock; + }; + nativeBuildInputs = [ makeWrapper + pkg-config + rustc + cargo ]; buildInputs = [ - hugo - go - sbcl' + # rustPlatform + # clippy + # rustfmt openssl - openssl.out - openssl.dev + # openssl.out + # openssl.dev ]; - nativeLibs = [ - openssl - openssl.out - openssl.dev - ]; + # nativeLibs = [ + # openssl + # openssl.out + # openssl.dev + # ]; - lispLibs = with sbclPackages; [ - hunchentoot - dexador - jzon - serapeum - deploy - spinneret - lass - cl-smtp - ]; + # lispLibs = with sbclPackages; [ + # hunchentoot + # dexador + # jzon + # serapeum + # deploy + # spinneret + # lass + # cl-smtp + # ]; buildPhase = '' export HOME=$(pwd) - ${sbcl'}/bin/sbcl --load build.lisp + ${cargo}/bin/cargo build ''; installPhase = '' mkdir -p $out/bin - cp tfcserver $out/bin - wrapProgram $out/bin/tfcserver \ + cp target/debug/tfcapi $out/bin + wrapProgram $out/bin/tfcapi \ --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \ '';