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:
parent
7bce88e83e
commit
8312713dc2
16
flake.lock
generated
16
flake.lock
generated
@ -91,21 +91,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-filter": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705332318,
|
|
||||||
"narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"rev": "3449dc925982ad46246cfc36469baf66e1b64f17",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705697961,
|
"lastModified": 1705697961,
|
||||||
@ -155,7 +140,6 @@
|
|||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"libnbtplusplus": "libnbtplusplus",
|
"libnbtplusplus": "libnbtplusplus",
|
||||||
"nix-filter": "nix-filter",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
url = "github:hercules-ci/flake-parts";
|
url = "github:hercules-ci/flake-parts";
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-filter.url = "github:numtide/nix-filter";
|
|
||||||
pre-commit-hooks = {
|
pre-commit-hooks = {
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
url = "github:cachix/pre-commit-hooks.nix";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
@ -26,24 +26,8 @@
|
|||||||
overlays.default = final: prev: let
|
overlays.default = final: prev: let
|
||||||
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
|
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
|
# common args for prismlauncher evaluations
|
||||||
unwrappedArgs = {
|
unwrappedArgs = {
|
||||||
self = filteredSelf;
|
|
||||||
|
|
||||||
inherit (inputs) libnbtplusplus;
|
inherit (inputs) libnbtplusplus;
|
||||||
inherit ((final.darwin or prev.darwin).apple_sdk.frameworks) Cocoa;
|
inherit ((final.darwin or prev.darwin).apple_sdk.frameworks) Cocoa;
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
gamemode,
|
gamemode,
|
||||||
msaClientID ? null,
|
msaClientID ? null,
|
||||||
gamemodeSupport ? stdenv.isLinux,
|
gamemodeSupport ? stdenv.isLinux,
|
||||||
self,
|
|
||||||
version,
|
version,
|
||||||
libnbtplusplus,
|
libnbtplusplus,
|
||||||
}:
|
}:
|
||||||
@ -25,7 +24,19 @@ assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is on
|
|||||||
pname = "prismlauncher-unwrapped";
|
pname = "prismlauncher-unwrapped";
|
||||||
inherit version;
|
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];
|
nativeBuildInputs = [extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook];
|
||||||
buildInputs =
|
buildInputs =
|
||||||
|
Loading…
Reference in New Issue
Block a user