File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 44 pkgs ,
55} :
66let
7- cargoTOML = builtins . fromTOML ( builtins . readFile ( self + "/Cargo.toml" ) ) ;
7+ root = ../. ;
8+ cargoTOML = fromTOML ( builtins . readFile ( root + "/Cargo.toml" ) ) ;
89 inherit ( cargoTOML . package ) version name ;
910 pname = name ;
1011 gitDate = "${ builtins . substring 0 4 self . lastModifiedDate } -${
1314 gitRev = self . shortRev or self . dirtyShortRev ;
1415 meta = import ./meta.nix { inherit lib ; } ;
1516 craneLib = self . inputs . crane . mkLib pkgs ;
17+ fileset = lib . fileset . unions [
18+ ( root + "/Cargo.toml" )
19+ ( root + "/Cargo.lock" )
20+ ( root + "/src" )
21+ ( root + "/tests" )
22+ ( root + "/docs" )
23+ ] ;
1624 commonArgs = {
1725 nativeBuildInputs = with pkgs ; [
1826 scdoc
1927 installShellFiles
2028 ] ;
2129 inherit version name pname ;
22- src = lib . cleanSourceWith { src = craneLib . path ../. ; } ;
30+ src = lib . fileset . toSource {
31+ inherit root fileset ;
32+ } ;
2333 } ;
2434 cargoArtifacts = craneLib . buildDepsOnly commonArgs ;
2535 cargoClippy = craneLib . cargoClippy ( commonArgs // { inherit cargoArtifacts ; } ) ;
You can’t perform that action at this time.
0 commit comments