Compare commits

...

2 commits

Author SHA1 Message Date
28573ba11f
refactor(package): share more stuff
All checks were successful
/ build (push) Successful in 1s
/ check-integration-tests (push) Successful in 11s
/ report-size (push) Successful in 3s
This should hopefully speed up the nix evals
2025-07-13 19:04:35 +02:00
975068992f
chore(deps): update https://git.salame.cl/jalil/nix-flake-outputs-size digest to e5d1a07
All checks were successful
/ build (push) Successful in 1s
/ check-integration-tests (push) Successful in 10s
/ report-size (push) Successful in 3s
2025-07-13 19:00:30 +02:00
3 changed files with 14 additions and 13 deletions

View file

@ -25,7 +25,7 @@ jobs:
- uses: https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: nix --version
- name: Generate size report
uses: "https://git.salame.cl/jalil/nix-flake-outputs-size@6b0b78e4962d7aae6243b4601ba8257be99e3a70" # main
uses: "https://git.salame.cl/jalil/nix-flake-outputs-size@e5d1a0751adb4963c0a4982503806ae5f19f52da" # main
with:
comment-on-pr: ${{ github.ref_name != 'main' }}
generate-artifact: ${{ github.ref_name == 'main' }}

View file

@ -1,15 +1,16 @@
let
inherit (builtins.getFlake (builtins.toString ./.)) inputs;
in
{
pkgs ?
(builtins.getFlake (builtins.toString ./.)).inputs.nixpkgs.legacyPackages.${builtins.currentSystem},
pkgs ? inputs.nixpkgs.legacyPackages.${builtins.currentSystem},
lib ? pkgs.lib,
crane ? (builtins.getFlake (builtins.toString ./.)).inputs.crane,
pkgSrc ? ./.,
crane ? inputs.crane,
craneLib ? crane.mkLib pkgs,
cargoArtifacts ? null,
src ? craneLib.cleanCargoSource ./.,
mold ? pkgs.mold,
}:
let
craneLib = crane.mkLib pkgs;
src = craneLib.cleanCargoSource pkgSrc;
commonArgs = {
inherit src;
strictDeps = true;
@ -26,12 +27,13 @@ let
mainProgram = "webnsupdate";
};
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
in
craneLib.buildPackage (
lib.mergeAttrsList [
commonArgs
{ inherit cargoArtifacts; }
{
cargoArtifacts =
if cargoArtifacts == null then craneLib.buildDepsOnly commonArgs else cargoArtifacts;
}
]
)

View file

@ -44,8 +44,7 @@ in
{ inherit cargoArtifacts; }
];
webnsupdate = pkgs.callPackage ../default.nix {
inherit crane;
pkgSrc = src;
inherit craneLib cargoArtifacts src;
};
in
{