Compare commits

..

1 Commits

Author SHA1 Message Date
ErrorNoInternet 15c9513499 refactor: replace setters with fields 2026-05-02 00:16:40 -04:00
5 changed files with 676 additions and 381 deletions
+13 -4
View File
@@ -1,4 +1,13 @@
/.direnv .luarc.json
/.luarc.json target
/result*
/target # Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
Generated
+612 -304
View File
File diff suppressed because it is too large Load Diff
+9 -5
View File
@@ -1,15 +1,19 @@
{ {
craneLib, lib,
pkgs, pkgs,
rust,
self,
}: }:
craneLib.buildPackage { pkgs.rustPlatform.buildRustPackage {
pname = "errornowatcher"; pname = "errornowatcher";
version = "0.2.0"; version = self.shortRev or self.dirtyShortRev;
src = craneLib.cleanCargoSource ./.; cargoLock.lockFile = ./Cargo.lock;
src = lib.cleanSource ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
clang rust
mold mold
pkg-config pkg-config
]; ];
Generated
+21 -55
View File
@@ -1,51 +1,15 @@
{ {
"nodes": { "nodes": {
"crane": {
"locked": {
"lastModified": 1778106249,
"narHash": "sha256-cM/AuKy5tMhwOOQIbha8ZRRMHVfNf7cv2aljIw+qoCg=",
"owner": "ipetkov",
"repo": "crane",
"rev": "6d015ea29630b7ad2402841386da2cb617a470a7",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1778314245,
"narHash": "sha256-a8p3JMunVzj0o86V9CNTyEFw7z4105QWl+bEz6Du8Jw=",
"owner": "nix-community",
"repo": "fenix",
"rev": "f54d645218048a7abe226983a922cdaca63cd845",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1777988971, "lastModified": 1777678872,
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", "narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", "rev": "5250617bffd85403b14dbf43c3870e7f255d2c16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -56,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1777954456, "lastModified": 1777268161,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -87,26 +51,28 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane",
"fenix": "fenix",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
} }
}, },
"rust-analyzer-src": { "rust-overlay": {
"flake": false, "inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1778246258, "lastModified": 1777605393,
"narHash": "sha256-RUZuOfzouSaK/VjcOCU/P5Nb3EhpM8qGnIcHWIIo4Sw=", "narHash": "sha256-Hjp0VOOHgHcTrX23iVvnfAudPcuCmfkfpQNFwv2v/ks=",
"owner": "rust-lang", "owner": "oxalica",
"repo": "rust-analyzer", "repo": "rust-overlay",
"rev": "73ca1d4ef136e2367627d698f00db94882b49440", "rev": "ff88db34cfa486fc4964a6991cab1678d82eee8c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "rust-lang", "owner": "oxalica",
"ref": "nightly", "repo": "rust-overlay",
"repo": "rust-analyzer",
"type": "github" "type": "github"
} }
} }
+21 -13
View File
@@ -1,22 +1,21 @@
{ {
inputs = { inputs = {
crane.url = "github:ipetkov/crane";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ {
crane,
fenix,
flake-parts, flake-parts,
nixpkgs,
rust-overlay,
self,
... ...
}@inputs: }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
@@ -33,23 +32,32 @@
... ...
}: }:
let let
craneLib = (crane.mkLib pkgs).overrideToolchain fenix.packages.${system}.complete.toolchain; rust = pkgs.rust-bin.nightly.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer-preview"
];
};
in in
{ {
devShells.default = craneLib.devShell { _module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
devShells.default = pkgs.mkShell {
name = "errornowatcher"; name = "errornowatcher";
inputsFrom = [ self'.packages.default ]; inputsFrom = [ self'.packages.default ];
nativeBuildInputs = [ pkgs.pkg-config ]; nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ pkgs.taplo ]; buildInputs = [ pkgs.taplo ];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
RUST_BACKTRACE = 1; RUST_BACKTRACE = 1;
}; };
packages = rec { packages = rec {
default = errornowatcher; default = errornowatcher;
errornowatcher = pkgs.callPackage ./. { inherit craneLib; }; errornowatcher = pkgs.callPackage ./. { inherit rust self; };
}; };
}; };
}; };