Compare commits

..

7 Commits

5 changed files with 380 additions and 675 deletions
+4 -13
View File
@@ -1,13 +1,4 @@
.luarc.json
target
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
/.direnv
/.luarc.json
/result*
/target
Generated
+303 -611
View File
File diff suppressed because it is too large Load Diff
+5 -9
View File
@@ -1,19 +1,15 @@
{
lib,
craneLib,
pkgs,
rust,
self,
}:
pkgs.rustPlatform.buildRustPackage {
craneLib.buildPackage {
pname = "errornowatcher";
version = self.shortRev or self.dirtyShortRev;
version = "0.2.0";
cargoLock.lockFile = ./Cargo.lock;
src = lib.cleanSource ./.;
src = craneLib.cleanCargoSource ./.;
nativeBuildInputs = with pkgs; [
rust
clang
mold
pkg-config
];
Generated
+55 -21
View File
@@ -1,15 +1,51 @@
{
"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": 1777678872,
"narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=",
"lastModified": 1777988971,
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "5250617bffd85403b14dbf43c3870e7f255d2c16",
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
"type": "github"
},
"original": {
@@ -20,11 +56,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github"
},
"original": {
@@ -51,28 +87,26 @@
},
"root": {
"inputs": {
"crane": "crane",
"fenix": "fenix",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
"nixpkgs": "nixpkgs"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1777605393,
"narHash": "sha256-Hjp0VOOHgHcTrX23iVvnfAudPcuCmfkfpQNFwv2v/ks=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ff88db34cfa486fc4964a6991cab1678d82eee8c",
"lastModified": 1778246258,
"narHash": "sha256-RUZuOfzouSaK/VjcOCU/P5Nb3EhpM8qGnIcHWIIo4Sw=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "73ca1d4ef136e2367627d698f00db94882b49440",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
}
+13 -21
View File
@@ -1,21 +1,22 @@
{
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; } {
@@ -32,32 +33,23 @@
...
}:
let
rust = pkgs.rust-bin.nightly.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer-preview"
];
};
craneLib = (crane.mkLib pkgs).overrideToolchain fenix.packages.${system}.complete.toolchain;
in
{
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
devShells.default = pkgs.mkShell {
devShells.default = craneLib.devShell {
name = "errornowatcher";
inputsFrom = [ self'.packages.default ];
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 rust self; };
errornowatcher = pkgs.callPackage ./. { inherit craneLib; };
};
};
};