Initial commit
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
commit
625b53d05e
12 changed files with 369 additions and 0 deletions
47
flake.nix
Normal file
47
flake.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
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;
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue