47 lines
896 B
Nix
47 lines
896 B
Nix
{
|
|
description = "Reproduce crane include wrong Cargo.toml";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=25.11";
|
|
crane.url = "github:ipetkov/crane";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
crane,
|
|
}:
|
|
let
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
|
|
craneLib = crane.mkLib pkgs;
|
|
|
|
fileset = pkgs.lib.fileset;
|
|
|
|
src = fileset.toSource {
|
|
root = ./.;
|
|
fileset = fileset.unions [
|
|
./Cargo.toml
|
|
./member
|
|
./not-a-member
|
|
];
|
|
};
|
|
|
|
commonArgs = {
|
|
inherit src;
|
|
sourceRoot = "source/not-a-member";
|
|
strictDeps = true;
|
|
};
|
|
|
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
|
|
|
testPackage = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; });
|
|
|
|
in
|
|
{
|
|
|
|
packages.x86_64-linux.default = testPackage;
|
|
|
|
};
|
|
}
|