Merge remote-tracking branch 'origin/master' into 0.3.0

This commit is contained in:
Wyatt J. Miller 2024-08-25 10:06:46 -05:00
commit 982452cb5b
4 changed files with 130 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

61
flake.lock Normal file
View File

@ -0,0 +1,61 @@
{
"nodes": {
"flake-schemas": {
"locked": {
"lastModified": 1721999734,
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
"revCount": 75,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1722372011,
"narHash": "sha256-B2xRiC3NEJy/82ugtareBkRqEkPGpMyjaLxaR8LBxNs=",
"rev": "cf05eeada35e122770c5c14add958790fcfcbef5",
"revCount": 633614,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2405.633614%2Brev-cf05eeada35e122770c5c14add958790fcfcbef5/01910e77-e048-77f4-b2d4-a69cacb697db/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
}
},
"root": {
"inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1722548948,
"narHash": "sha256-ddR/6wbOzRXijcOAEgeaIlbskky51eJdZhYPwoErs3s=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0b973d3e54e497e518515c05a6e99ec6c03be2ce",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

61
flake.nix Normal file
View File

@ -0,0 +1,61 @@
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.10)
{
# A helpful description of your flake
description = "A Gitea command line application";
# Flake inputs
inputs = {
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# Flake outputs that other flakes can use
outputs = { self, flake-schemas, nixpkgs, rust-overlay }:
let
# Nixpkgs overlays
overlays = [
rust-overlay.overlays.default
(final: prev: {
rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src"]; };
})
];
# Helpers for producing system-specific outputs
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit overlays system; };
});
in {
# Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas;
# Development environments
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
# Pinned packages available in the environment
packages = with pkgs; [
rustToolchain
rust-analyzer
curl
git
jq
wget
nixpkgs-fmt
openssl
];
# Environment variables
env = {
RUST_BACKTRACE = "1";
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
};
};
});
};
}

7
rust-analyzer.json Normal file
View File

@ -0,0 +1,7 @@
{
"rust-analyzer": {
"files": {
"excludeDirs": [".direnv"]
}
}
}