Skip to content

Commit

Permalink
flake: fix missing pname warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Aug 27, 2024
1 parent 90973bc commit 5eaccaf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
21 changes: 11 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
cctl = inputs'.cctl.packages.cctl.override { casper-node = inputs'.csprpkgs.packages.casper-node; };

kairosContractsAttrs = {
pname = "kairos-contracts";
src = lib.cleanSourceWith {
src = lib.fileset.toSource {
root = ./.;
Expand Down Expand Up @@ -87,6 +88,7 @@
};

kairosSessionCodeAttrs = {
pname = "kairos-session-code";
src = lib.cleanSourceWith {
src = lib.fileset.toSource {
root = ./.;
Expand Down Expand Up @@ -136,6 +138,7 @@
'';

kairosNodeAttrs = {
pname = "kairos";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
Expand Down Expand Up @@ -194,45 +197,40 @@

packages = {
kairos-deps = craneLib.buildDepsOnly (kairosNodeAttrs // {
pname = "kairos-deps";
});

kairos = craneLib.buildPackage (kairosNodeAttrs // {
pname = "kairos";
cargoArtifacts = self'.packages.kairos-deps;
});

kairos-tx-no-std = craneLib.buildPackage (kairosNodeAttrs // {
pname = "kairos-tx-no-std";
cargoArtifacts = self'.packages.kairos-deps;
cargoExtraArgs = "-p kairos-tx --no-default-features";
});

kairos-crypto-no-std = craneLib.buildPackage (kairosNodeAttrs // {
pname = "kairos-crypto-no-std";
cargoArtifacts = self'.packages.kairos-deps;
cargoExtraArgs = "-p kairos-crypto --no-default-features --features crypto-casper,tx";
});

default = self'.packages.kairos;

kairos-docs = craneLib.cargoDoc (kairosNodeAttrs // {
pname = "kairos-docs";
cargoArtifacts = self'.packages.kairos-deps;
});

kairos-contracts-deps = craneLib.buildDepsOnly (kairosContractsAttrs // {
pname = "kairos-contracts-deps";
});
kairos-contracts-deps = craneLib.buildDepsOnly kairosContractsAttrs;

kairos-contracts = craneLib.buildPackage (kairosContractsAttrs // {
pname = "kairos-contracts";
cargoArtifacts = self'.packages.kairos-contracts-deps;
});

kairos-session-code-deps = craneLib.buildDepsOnly (kairosSessionCodeAttrs // {
pname = "kairos-session-code-deps";
});
kairos-session-code-deps = craneLib.buildDepsOnly kairosSessionCodeAttrs;

kairos-session-code = craneLib.buildPackage (kairosSessionCodeAttrs // {
pname = "kairos-session-code";
cargoArtifacts = self'.packages.kairos-session-code-deps;
});

Expand All @@ -248,6 +246,7 @@

checks = {
lint = craneLib.cargoClippy (kairosNodeAttrs // {
pname = "kairos-lint";
cargoArtifacts = self'.packages.kairos-deps;
cargoClippyExtraArgs = "--features=all-tests --all-targets -- --deny warnings";
});
Expand Down Expand Up @@ -276,11 +275,13 @@
# };

kairos-contracts-lint = craneLib.cargoClippy (kairosContractsAttrs // {
pname = "kairos-contracts-lint";
cargoArtifacts = self'.packages.kairos-contracts-deps;
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
});

kairos-session-code-lint = craneLib.cargoClippy (kairosSessionCodeAttrs // {
pname = "kairos-session-code-lint";
cargoArtifacts = self'.packages.kairos-session-code-deps;
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
});
Expand Down
6 changes: 2 additions & 4 deletions kairos-prover/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain;

kairosProverAttrs = rec {
pname = "kairos-prover";
src = lib.fileset.toSource {
root = ../.;
fileset = lib.fileset.unions [
Expand Down Expand Up @@ -66,12 +67,9 @@
inputsFrom = [ self'.packages.kairos-prover ];
};
packages = {
kairos-prover-deps = craneLib.buildDepsOnly (kairosProverAttrs // {
pname = "kairos-prover-deps";
});
kairos-prover-deps = craneLib.buildDepsOnly kairosProverAttrs;

kairos-prover = craneLib.buildPackage (kairosProverAttrs // {
pname = "kairos-prover";
cargoArtifacts = self'.packages.kairos-prover-deps;
meta.mainProgram = "kairos-prover-risc0-server";
});
Expand Down

0 comments on commit 5eaccaf

Please sign in to comment.