initial git dump

This commit is contained in:
Jonas Rabenstein 2026-02-16 02:51:10 +01:00
commit 781e25470b
47 changed files with 2361 additions and 0 deletions

59
flake.nix Normal file
View file

@ -0,0 +1,59 @@
{
outputs = { nixpkgs, ... }: let
spond = { rustPlatform, rustfmt, clippy, pkg-config, openssl, ... }: rustPlatform.buildRustPackage {
pname = "spond";
version = "0.0.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = [
openssl.dev
];
};
allpkgs = system: pkgs: pkgs.extend (_: _: nixpkgs.lib.attrsets.filterAttrs (name: _: name != "default") (packages system pkgs));
packages = system: pkgs': let
pkgs = allpkgs system pkgs';
in {
default = pkgs.spond;
spond = pkgs.callPackage spond {};
};
devShells = system: pkgs': let
pkgs = allpkgs system pkgs';
in builtins.mapAttrs (devShell pkgs) (packages system pkgs');
devShell = pkgs: name: pkg: pkgs.mkShell {
buildInputs = with pkgs; [
cargo
cargo-machete
cargo-workspaces
cargo-unused-features
cargo-udeps
cargo-audit
cargo-diet
cargo-duplicates
cargo-flamegraph
clippy
(python3.withPackages (py: [ py.pyyaml ]))
rustc
rustfmt
] ++ pkg.buildInputs;
nativeBuildInputs = pkg.nativeBuildInputs;
shellHook = ''
printf 'Dev shell for %s ready!\n' '${pkg.name}'
'';
};
in {
packages = builtins.mapAttrs packages nixpkgs.legacyPackages;
devShells = builtins.mapAttrs devShells nixpkgs.legacyPackages;
};
}