nix: use cleanSource (#518)

This commit is contained in:
Fernando Ayats 2022-08-12 13:12:24 -07:00 committed by GitHub
parent db35a1c6d0
commit c136078239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,16 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "hyprland" + lib.optionalString debug "-debug"; pname = "hyprland" + lib.optionalString debug "-debug";
inherit version; inherit version;
src = ../.;
src = lib.cleanSourceWith {
filter = name: type: let
baseName = baseNameOf (toString name);
in
! (
lib.hasSuffix ".nix" baseName
);
src = lib.cleanSource ../.;
};
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
@ -59,7 +68,7 @@ stdenv.mkDerivation {
mesonFlags = builtins.concatLists [ mesonFlags = builtins.concatLists [
(lib.optional (!enableXWayland) "-DNO_XWAYLAND=true") (lib.optional (!enableXWayland) "-DNO_XWAYLAND=true")
(lib.optional (legacyRenderer) "-DLEGACY_RENDERER:STRING=true") (lib.optional legacyRenderer "-DLEGACY_RENDERER:STRING=true")
]; ];
patches = [ patches = [