nix: build nova-plugin via crane to cache deps separately from crate src
This commit is contained in:
parent
2a691aa66f
commit
bf5cb913fc
4 changed files with 88 additions and 44 deletions
11
flake.nix
11
flake.nix
|
|
@ -13,6 +13,8 @@
|
|||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
crane.url = "github:ipetkov/crane";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -21,6 +23,7 @@
|
|||
nixpkgs,
|
||||
quickshell,
|
||||
treefmt-nix,
|
||||
crane,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -57,6 +60,7 @@
|
|||
fn rec {
|
||||
rawPkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = rawPkgs.extend qtbaseOverlay;
|
||||
craneLib = crane.mkLib pkgs;
|
||||
treefmt-eval = treefmt-nix.lib.evalModule rawPkgs treefmt-config;
|
||||
}
|
||||
);
|
||||
|
|
@ -65,7 +69,7 @@
|
|||
formatter = forAllSystems ({ treefmt-eval, ... }: treefmt-eval.config.build.wrapper);
|
||||
|
||||
packages = forAllSystems (
|
||||
{ pkgs, rawPkgs, ... }:
|
||||
{ pkgs, rawPkgs, craneLib, ... }:
|
||||
let
|
||||
# Rebuild quickshell against patched Qt via its overlay
|
||||
qs = (pkgs.extend quickshell.overlays.default).quickshell.override {
|
||||
|
|
@ -74,7 +78,7 @@
|
|||
};
|
||||
nova-stats = pkgs.callPackage ./nix/stats-daemon.nix { };
|
||||
nova-shaders = pkgs.callPackage ./nix/shaders.nix { };
|
||||
nova-plugin = pkgs.callPackage ./nix/plugin.nix { };
|
||||
nova-plugin = pkgs.callPackage ./nix/plugin.nix { inherit craneLib; };
|
||||
in
|
||||
rec {
|
||||
inherit nova-stats nova-shaders nova-plugin;
|
||||
|
|
@ -122,12 +126,13 @@
|
|||
withX11 = false;
|
||||
withI3 = false;
|
||||
};
|
||||
craneLibRaw = crane.mkLib rawPkgs;
|
||||
in
|
||||
rawPkgs.callPackage ./nix/package.nix {
|
||||
quickshell = qsUnpatched;
|
||||
nova-stats = rawPkgs.callPackage ./nix/stats-daemon.nix { };
|
||||
nova-shaders = rawPkgs.callPackage ./nix/shaders.nix { };
|
||||
nova-plugin = rawPkgs.callPackage ./nix/plugin.nix { };
|
||||
nova-plugin = rawPkgs.callPackage ./nix/plugin.nix { craneLib = craneLibRaw; };
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue