this repo has no description

init talk

authored by

Orual and committed by nonbinary.computer 55c738bf

+146
+6
Cargo.toml
··· 1 + [package] 2 + name = "jacquard-talk" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies]
+31
flake.nix
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 4 + flake-parts.url = "github:hercules-ci/flake-parts"; 5 + flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; 6 + systems.url = "github:nix-systems/default"; 7 + rust-flake.url = "github:juspay/rust-flake"; 8 + rust-flake.inputs.nixpkgs.follows = "nixpkgs"; 9 + #process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; 10 + #cargo-doc-live.url = "github:srid/cargo-doc-live"; 11 + 12 + # For cross-compilation 13 + crane.url = "github:ipetkov/crane"; 14 + rust-overlay.url = "github:oxalica/rust-overlay"; 15 + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; 16 + 17 + git-hooks.url = "github:cachix/git-hooks.nix"; 18 + git-hooks.flake = false; 19 + }; 20 + 21 + outputs = inputs: 22 + inputs.flake-parts.lib.mkFlake {inherit inputs;} { 23 + systems = import inputs.systems; 24 + 25 + # See ./nix/modules/*.nix for the modules that are imported here. 26 + imports = with builtins; 27 + map 28 + (fn: ./nix/modules/${fn}) 29 + (attrNames (readDir ./nix/modules)); 30 + }; 31 + }
+34
nix/modules/devshell.nix
··· 1 + {inputs, ...}: { 2 + perSystem = { 3 + config, 4 + self', 5 + pkgs, 6 + lib, 7 + ... 8 + }: { 9 + devShells.default = pkgs.mkShell { 10 + name = "jacquard-shell"; 11 + inputsFrom = [ 12 + self'.devShells.rust 13 + config.pre-commit.devShell # See ./nix/modules/pre-commit.nix 14 + ]; 15 + packages = with pkgs; [ 16 + just 17 + nixd # Nix language server 18 + bacon 19 + rust-analyzer 20 + cargo-machete 21 + cargo-semver-checks 22 + cargo-binstall 23 + cargo-dist 24 + cargo-nextest 25 + zip 26 + atproto-goat 27 + ]; 28 + }; 29 + apps = { 30 + default.program = "${self'.packages.jacquard-lexgen}/bin/lex-fetch"; 31 + lexgen.program = "${self'.packages.jacquard-lexgen}/bin/lex-fetch"; 32 + }; 33 + }; 34 + }
+14
nix/modules/pre-commit.nix
··· 1 + { inputs, ... }: 2 + { 3 + imports = [ 4 + (inputs.git-hooks + /flake-module.nix) 5 + ]; 6 + perSystem = { config, self', pkgs, lib, ... }: { 7 + pre-commit.settings = { 8 + hooks = { 9 + nixpkgs-fmt.enable = true; 10 + rustfmt.enable = true; 11 + }; 12 + }; 13 + }; 14 + }
+58
nix/modules/rust.nix
··· 1 + {inputs, ...}: { 2 + imports = [ 3 + inputs.rust-flake.flakeModules.default 4 + inputs.rust-flake.flakeModules.nixpkgs 5 + # inputs.process-compose-flake.flakeModule 6 + # inputs.cargo-doc-live.flakeModule 7 + ]; 8 + perSystem = { 9 + config, 10 + self', 11 + pkgs, 12 + lib, 13 + ... 14 + }: let 15 + inherit (pkgs.stdenv) isDarwin; 16 + inherit (pkgs.darwin) apple_sdk; 17 + 18 + # Common configuration for all crates 19 + globalCrateConfig = { 20 + crane.clippy.enable = false; 21 + }; 22 + 23 + # Common build inputs for all crates 24 + commonBuildInputs = with pkgs; 25 + [ 26 + ] 27 + ++ lib.optionals 28 + isDarwin ( 29 + with apple_sdk.frameworks; [ 30 + IOKit 31 + Security 32 + SystemConfiguration 33 + ] 34 + ); 35 + in { 36 + rust-project = { 37 + # Source filtering to avoid unnecessary rebuilds 38 + src = lib.cleanSourceWith { 39 + src = inputs.self; 40 + filter = config.rust-project.crane-lib.filterCargoSources; 41 + }; 42 + crates = { 43 + "jacquard-talk" = { 44 + imports = [globalCrateConfig]; 45 + autoWire = ["crate" "clippy"]; 46 + path = ./../../src; 47 + crane = { 48 + args = { 49 + buildInputs = commonBuildInputs; 50 + }; 51 + }; 52 + }; 53 + 54 + }; 55 + }; 56 + packages.default = self'.packages.jacquard-talk; 57 + }; 58 + }
+3
src/main.rs
··· 1 + fn main() { 2 + println!("Hello, world!"); 3 + }