Compare commits
2 commits
5cef18f07e
...
28573ba11f
Author | SHA1 | Date | |
---|---|---|---|
28573ba11f | |||
975068992f |
3 changed files with 14 additions and 13 deletions
|
@ -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' }}
|
||||
|
|
22
default.nix
22
default.nix
|
@ -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;
|
||||
}
|
||||
]
|
||||
)
|
||||
|
|
|
@ -44,8 +44,7 @@ in
|
|||
{ inherit cargoArtifacts; }
|
||||
];
|
||||
webnsupdate = pkgs.callPackage ../default.nix {
|
||||
inherit crane;
|
||||
pkgSrc = src;
|
||||
inherit craneLib cargoArtifacts src;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue