Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-09-13 17:14:25 +10:00
2 changed files with 74 additions and 32 deletions

40
backend/flake.lock generated
View File

@@ -22,6 +22,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"naersk": { "naersk": {
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
@@ -59,11 +77,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1756542300, "lastModified": 1757487488,
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", "narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d7600c775f877cd87b4f5a831c28aa94137377aa", "rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -75,6 +93,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"naersk": "naersk", "naersk": "naersk",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }
@@ -95,6 +114,21 @@
"repo": "rust-analyzer", "repo": "rust-analyzer",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -1,30 +1,37 @@
{ {
description = "lead-rust"; description = "lead";
inputs = { inputs = {
naersk.url = "github:nix-community/naersk"; naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { outputs = {
self, self,
naersk, naersk,
nixpkgs, nixpkgs,
}: let flake-utils,
system = "x86_64-linux"; ...
pkgs = import nixpkgs {inherit system;}; }:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
naerskLib = pkgs.callPackage naersk {}; naerskLib = pkgs.callPackage naersk {};
buildInputs = [pkgs.openssl]; buildInputs = [pkgs.openssl];
nativeBuildInputs = [pkgs.pkg-config]; nativeBuildInputs = [pkgs.pkg-config];
in { lead = naerskLib.buildPackage {
packages.${system}.default = naerskLib.buildPackage {
src = ./.; src = ./.;
buildInputs = buildInputs; buildInputs = buildInputs;
nativeBuildInputs = nativeBuildInputs; nativeBuildInputs = nativeBuildInputs;
}; };
in {
packages.default = lead;
devShells.${system}.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
inputsFrom = [self.packages.${system}.default]; inputsFrom = [lead];
packages = with pkgs; [ packages = with pkgs; [
rustc rustc
@@ -40,5 +47,6 @@
[ -z "$ZSH_VERSION" ] && exec ${pkgs.zsh}/bin/zsh -l [ -z "$ZSH_VERSION" ] && exec ${pkgs.zsh}/bin/zsh -l
''; '';
}; };
}; }
);
} }