From b5fc23952ea99d7f3eac62714e4937cf9da31074 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Sun, 30 Mar 2025 16:41:19 -0400 Subject: [PATCH] Reapply "refactor(nix): nix-filter -> lib.fileset" After extensive (5 minutes) of testing, it seems we don't actually come across any Nix bugs with lib.fileset! (aside from those inherit to it...but :shrug:) This reverts commit a49a58bc4571f87f42f45bb9eeb1a957d5d12331. Signed-off-by: Seth Flynn (cherry picked from commit 99852c972c6e9fc6a8caca727946a71a85c1672f) --- flake.lock | 39 +++------------------------------------ flake.nix | 4 ---- nix/unwrapped.nix | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index a82e6f65f..d8c7c5248 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "libnbtplusplus": { "flake": false, "locked": { @@ -32,28 +16,13 @@ "type": "github" } }, - "nix-filter": { - "locked": { - "lastModified": 1710156097, - "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "3342559a24e85fc164b295c3444e8a139924675b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1729256560, - "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", + "lastModified": 1743095683, + "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", "type": "github" }, "original": { @@ -65,9 +34,7 @@ }, "root": { "inputs": { - "flake-compat": "flake-compat", "libnbtplusplus": "libnbtplusplus", - "nix-filter": "nix-filter", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 54add656d..f8954af23 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,6 @@ flake = false; }; - nix-filter.url = "github:numtide/nix-filter"; - /* Inputs below this are optional and can be removed @@ -44,7 +42,6 @@ self, nixpkgs, libnbtplusplus, - nix-filter, ... }: let @@ -89,7 +86,6 @@ prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix { inherit libnbtplusplus - nix-filter self ; }; diff --git a/nix/unwrapped.nix b/nix/unwrapped.nix index 1b14886ef..f47051287 100644 --- a/nix/unwrapped.nix +++ b/nix/unwrapped.nix @@ -11,7 +11,6 @@ kdePackages, libnbtplusplus, ninja, - nix-filter, self, stripJavaArchivesHook, tomlplusplus, @@ -29,17 +28,18 @@ stdenv.mkDerivation { pname = "prismlauncher-unwrapped"; version = self.shortRev or self.dirtyShortRev or "unknown"; - src = nix-filter.lib { - root = self; - include = [ - "buildconfig" - "cmake" - "launcher" - "libraries" - "program_info" - "tests" - ../COPYING.md + src = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.unions [ ../CMakeLists.txt + ../COPYING.md + + ../buildconfig + ../cmake + ../launcher + ../libraries + ../program_info + ../tests ]; };