diff --git a/flake.lock b/flake.lock index 3e87197..9191749 100644 --- a/flake.lock +++ b/flake.lock @@ -1,20 +1,5 @@ { "nodes": { - "nix-filter": { - "locked": { - "lastModified": 1730207686, - "narHash": "sha256-SCHiL+1f7q9TAnxpasriP6fMarWE5H43t25F5/9e28I=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "776e68c1d014c3adde193a18db9d738458cd2ba4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1730958623, @@ -33,7 +18,6 @@ }, "root": { "inputs": { - "nix-filter": "nix-filter", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index cd5423d..4e676ed 100644 --- a/flake.nix +++ b/flake.nix @@ -1,16 +1,12 @@ { description = "Check the forecast for today's Nix builds"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nix-filter.url = "github:numtide/nix-filter"; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; outputs = { self, nixpkgs, - nix-filter, }: let inherit (nixpkgs) lib; @@ -142,7 +138,7 @@ ); overlays.default = final: _: { - nix-forecast = final.callPackage ./nix/package.nix { inherit nix-filter self; }; + nix-forecast = final.callPackage ./nix/package.nix { }; }; }; } diff --git a/nix/package.nix b/nix/package.nix index e0f7b77..cc60573 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -5,26 +5,28 @@ nix, rustPlatform, versionCheckHook, - - nix-filter, - self, }: +let + fs = lib.fileset; +in rustPlatform.buildRustPackage rec { pname = "nix-forecast"; inherit (passthru.cargoTOML.package) version; - src = nix-filter { - root = self; - include = [ - "Cargo.toml" - "Cargo.lock" - "build.rs" - "src/" - ]; + src = fs.toSource { + root = ../.; + fileset = fs.intersection (fs.gitTracked ../.) ( + fs.unions [ + ../Cargo.lock + ../Cargo.toml + ../build.rs + ../src + ] + ); }; - cargoLock.lockFile = self + "/Cargo.lock"; + cargoLock.lockFile = ../Cargo.lock; nativeBuildInputs = [ installShellFiles @@ -48,7 +50,7 @@ rustPlatform.buildRustPackage rec { }; passthru = { - cargoTOML = lib.importTOML (self + "/Cargo.toml"); + cargoTOML = lib.importTOML ../Cargo.toml; }; meta = {