Compare commits

..

1 Commits

Author SHA1 Message Date
ErrorNoInternet 15c9513499 refactor: replace setters with fields 2026-05-02 00:16:40 -04:00
3 changed files with 50 additions and 72 deletions
+9 -5
View File
@@ -1,15 +1,19 @@
{
craneLib,
lib,
pkgs,
rust,
self,
}:
craneLib.buildPackage {
pkgs.rustPlatform.buildRustPackage {
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; [
clang
rust
mold
pkg-config
];
Generated
+21 -55
View File
@@ -1,51 +1,15 @@
{
"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": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1777988971,
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
"lastModified": 1777678872,
"narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
"rev": "5250617bffd85403b14dbf43c3870e7f255d2c16",
"type": "github"
},
"original": {
@@ -56,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github"
},
"original": {
@@ -87,26 +51,28 @@
},
"root": {
"inputs": {
"crane": "crane",
"fenix": "fenix",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-analyzer-src": {
"flake": false,
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1778246258,
"narHash": "sha256-RUZuOfzouSaK/VjcOCU/P5Nb3EhpM8qGnIcHWIIo4Sw=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "73ca1d4ef136e2367627d698f00db94882b49440",
"lastModified": 1777605393,
"narHash": "sha256-Hjp0VOOHgHcTrX23iVvnfAudPcuCmfkfpQNFwv2v/ks=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ff88db34cfa486fc4964a6991cab1678d82eee8c",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
+20 -12
View File
@@ -1,22 +1,21 @@
{
inputs = {
crane.url = "github:ipetkov/crane";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
crane,
fenix,
flake-parts,
nixpkgs,
rust-overlay,
self,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
@@ -33,9 +32,19 @@
...
}:
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
{
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
devShells.default = pkgs.mkShell {
name = "errornowatcher";
@@ -43,13 +52,12 @@
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ pkgs.taplo ];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
RUST_BACKTRACE = 1;
};
packages = rec {
default = errornowatcher;
errornowatcher = pkgs.callPackage ./. { inherit craneLib; };
errornowatcher = pkgs.callPackage ./. { inherit rust self; };
};
};
};