aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock16
-rw-r--r--flake.nix1
-rw-r--r--nix/distribution.nix18
3 files changed, 34 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock
index b1486ea6..df6039cf 100644
--- a/flake.lock
+++ b/flake.lock
@@ -89,6 +89,21 @@
"type": "github"
}
},
+ "nix-filter": {
+ "locked": {
+ "lastModified": 1693833173,
+ "narHash": "sha256-hlMABKrGbEiJD5dwUSfnw1CQ3bG7KKwDV+Nx3bEZd7U=",
+ "owner": "numtide",
+ "repo": "nix-filter",
+ "rev": "ac030bd9ba98e318e1f4c4328d60766ade8ebe8b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "nix-filter",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1693626178,
@@ -156,6 +171,7 @@
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"libnbtplusplus": "libnbtplusplus",
+ "nix-filter": "nix-filter",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
diff --git a/flake.nix b/flake.nix
index a58d66fb..afb0ec63 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
+ nix-filter.url = "github:numtide/nix-filter";
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
diff --git a/nix/distribution.nix b/nix/distribution.nix
index c8fa01c5..ca9999dc 100644
--- a/nix/distribution.nix
+++ b/nix/distribution.nix
@@ -26,11 +26,27 @@
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 self version;
+ inherit version;
};
in {
prismlauncher-qt5-unwrapped = prev.libsForQt5.callPackage ./pkg unwrappedArgs;