Skip to content

Commit dc7c18e

Browse files
committed
Fixed flake to include assets
1 parent 9ae151b commit dc7c18e

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

flake.nix

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,38 @@
2222
craneLib = crane.mkLib pkgs;
2323
libPath = with pkgs; lib.makeLibraryPath [ wayland vulkan-loader ];
2424

25-
commonArgs = {
26-
src = craneLib.cleanCargoSource ./.;
25+
commonArgs = with pkgs; {
26+
src = lib.fileset.toSource {
27+
root = ./.;
28+
fileset = lib.fileset.unions [
29+
(craneLib.fileset.commonCargoSources ./.)
30+
(lib.fileset.maybeMissing ./assets)
31+
];
32+
};
2733
strictDeps = true;
2834

2935
buildInputs = with pkgs; [ makeWrapper libxkbcommon ];
3036
};
3137

32-
waystart = craneLib.buildPackage (
33-
commonArgs
34-
// {
35-
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
38+
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
39+
pname = "waystart-deps";
40+
});
41+
42+
waystartClippy = craneLib.cargoClippy (commonArgs // {
43+
inherit cargoArtifacts;
44+
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
45+
});
46+
47+
waystart = craneLib.buildPackage (commonArgs // {
48+
inherit cargoArtifacts;
3649
postInstall = ''
3750
wrapProgram "$out/bin/waystart" --prefix LD_LIBRARY_PATH : "${libPath}"
3851
'';
3952
}
4053
);
4154
in
4255
{
43-
checks = { inherit waystart; };
56+
checks = { inherit waystart waystartClippy; };
4457
packages.default = waystart;
4558
apps.default = flake-utils.lib.mkApp {
4659
drv = waystart;

0 commit comments

Comments
 (0)