Skip to content

Commit 27c1ece

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

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

flake.nix

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
nixpkgs,
1414
crane,
1515
flake-utils,
16+
lib,
1617
...
1718
}:
1819
flake-utils.lib.eachDefaultSystem (
@@ -23,24 +24,37 @@
2324
libPath = with pkgs; lib.makeLibraryPath [ wayland vulkan-loader ];
2425

2526
commonArgs = {
26-
src = craneLib.cleanCargoSource ./.;
27+
src = lib.fileset.toSource {
28+
root = ./.;
29+
fileset = lib.fileset.unions [
30+
(craneLib.fileset.commonCargoSources ./.)
31+
(lib.fileset.maybeMissing ./assets)
32+
];
33+
};
2734
strictDeps = true;
2835

2936
buildInputs = with pkgs; [ makeWrapper libxkbcommon ];
3037
};
3138

32-
waystart = craneLib.buildPackage (
33-
commonArgs
34-
// {
35-
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
39+
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
40+
pname = "waystart-deps";
41+
});
42+
43+
waystartClippy = craneLib.cargoClippy (commonArgs // {
44+
inherit cargoArtifacts;
45+
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
46+
});
47+
48+
waystart = craneLib.buildPackage (commonArgs // {
49+
inherit cargoArtifacts;
3650
postInstall = ''
3751
wrapProgram "$out/bin/waystart" --prefix LD_LIBRARY_PATH : "${libPath}"
3852
'';
3953
}
4054
);
4155
in
4256
{
43-
checks = { inherit waystart; };
57+
checks = { inherit waystart waystartClippy; };
4458
packages.default = waystart;
4559
apps.default = flake-utils.lib.mkApp {
4660
drv = waystart;

0 commit comments

Comments
 (0)