refactor(nix): nix-filter -> lib.fileset

with our own use of `map`, this is basically a drop-in replacement for
nix-filter, but already in nixpkgs!

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2024-01-17 22:46:29 -05:00
parent 7bce88e83e
commit 8312713dc2
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
4 changed files with 13 additions and 35 deletions

View file

@ -26,24 +26,8 @@
overlays.default = final: prev: let
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
filteredSelf = inputs.nix-filter.lib.filter {
root = ../.;
include = [
"buildconfig"
"cmake"
"launcher"
"libraries"
"program_info"
"tests"
../COPYING.md
../CMakeLists.txt
];
};
# common args for prismlauncher evaluations
unwrappedArgs = {
self = filteredSelf;
inherit (inputs) libnbtplusplus;
inherit ((final.darwin or prev.darwin).apple_sdk.frameworks) Cocoa;
inherit version;

View file

@ -16,7 +16,6 @@
gamemode,
msaClientID ? null,
gamemodeSupport ? stdenv.isLinux,
self,
version,
libnbtplusplus,
}:
@ -25,7 +24,19 @@ assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is on
pname = "prismlauncher-unwrapped";
inherit version;
src = lib.cleanSource self;
src = lib.fileset.toSource {
root = ../../.;
fileset = lib.fileset.unions (map (fileName: ../../${fileName}) [
"buildconfig"
"cmake"
"launcher"
"libraries"
"program_info"
"tests"
"COPYING.md"
"CMakeLists.txt"
]);
};
nativeBuildInputs = [extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook];
buildInputs =