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 🤷)

This reverts commit a49a58bc45.

Signed-off-by: Seth Flynn <getchoo@tuta.io>
(cherry picked from commit 99852c972c6e9fc6a8caca727946a71a85c1672f)
This commit is contained in:
Seth Flynn 2025-03-30 16:41:19 -04:00
parent 5c8ef3a003
commit b5fc23952e
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86
3 changed files with 14 additions and 51 deletions

39
flake.lock generated
View File

@ -1,21 +1,5 @@
{ {
"nodes": { "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": { "libnbtplusplus": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -32,28 +16,13 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1729256560, "lastModified": 1743095683,
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -65,9 +34,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"libnbtplusplus": "libnbtplusplus", "libnbtplusplus": "libnbtplusplus",
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@ -16,8 +16,6 @@
flake = false; flake = false;
}; };
nix-filter.url = "github:numtide/nix-filter";
/* /*
Inputs below this are optional and can be removed Inputs below this are optional and can be removed
@ -44,7 +42,6 @@
self, self,
nixpkgs, nixpkgs,
libnbtplusplus, libnbtplusplus,
nix-filter,
... ...
}: }:
let let
@ -89,7 +86,6 @@
prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix { prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix {
inherit inherit
libnbtplusplus libnbtplusplus
nix-filter
self self
; ;
}; };

View File

@ -11,7 +11,6 @@
kdePackages, kdePackages,
libnbtplusplus, libnbtplusplus,
ninja, ninja,
nix-filter,
self, self,
stripJavaArchivesHook, stripJavaArchivesHook,
tomlplusplus, tomlplusplus,
@ -29,17 +28,18 @@ stdenv.mkDerivation {
pname = "prismlauncher-unwrapped"; pname = "prismlauncher-unwrapped";
version = self.shortRev or self.dirtyShortRev or "unknown"; version = self.shortRev or self.dirtyShortRev or "unknown";
src = nix-filter.lib { src = lib.fileset.toSource {
root = self; root = ../.;
include = [ fileset = lib.fileset.unions [
"buildconfig"
"cmake"
"launcher"
"libraries"
"program_info"
"tests"
../COPYING.md
../CMakeLists.txt ../CMakeLists.txt
../COPYING.md
../buildconfig
../cmake
../launcher
../libraries
../program_info
../tests
]; ];
}; };