File tree Expand file tree Collapse file tree 3 files changed +35
-14
lines changed Expand file tree Collapse file tree 3 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 2
2
perSystem =
3
3
{ config , lib , ... } :
4
4
{
5
- devShells = lib . concatMapAttrs ( name : package : {
6
- ${ name } = package . passthru . shell ;
7
- } ) config . packages ;
5
+ # devShells = lib.filter (x: x != null) (lib.concatMapAttrs (name: package: {
6
+ # ${name} = package.passthru.shell or null;
7
+ # }) config.packages);
8
+ devShells = lib . pipe ( config . packages ) [
9
+ ( lib . concatMapAttrs
10
+ ( name : package : {
11
+ ${ name } = package . passthru . shell or null ;
12
+ } ) )
13
+ ( lib . filterAttrs ( name : value : value != null ) )
14
+ ] ;
8
15
} ;
9
16
}
17
+
Original file line number Diff line number Diff line change 71
71
) ", accelerated with ${ strings . concatStringsSep ", " suffices } " ;
72
72
73
73
executableSuffix = effectiveStdenv . hostPlatform . extensions . executable ;
74
- mapToPythonPackages = ps : packages : map ( package : ps . ${ package } ) packages ;
75
74
76
75
xcrunHost = runCommand "xcrunHost" { } ''
77
76
mkdir -p $out/bin
@@ -125,14 +124,13 @@ effectiveStdenv.mkDerivation (finalAttrs: {
125
124
filter =
126
125
name : type :
127
126
let
128
- noneOf = builtins . all ( x : ! x ) ;
129
- baseName = baseNameOf name ;
127
+ any = builtins . any ( x : x ) ;
128
+ baseName = builtins . baseNameOf name ;
130
129
in
131
- noneOf [
132
- ( lib . hasSuffix ".nix" name ) # Ignore *.nix files when computing outPaths
133
- ( lib . hasSuffix ".md" name ) # Ignore *.md changes whe computing outPaths
134
- ( lib . hasPrefix "." baseName ) # Skip hidden files and directories
135
- ( baseName == "flake.lock" )
130
+ any [
131
+ ( lib . hasSuffix ".py" name )
132
+ ( baseName == "README.md" )
133
+ ( baseName == "pyproject.toml" )
136
134
] ;
137
135
src = lib . cleanSource ../../. ;
138
136
} ;
Original file line number Diff line number Diff line change 23
23
24
24
buildPythonPackage ( {
25
25
pname = "llama-scripts" ;
26
- src = ../../. ;
27
26
version = "0.0.0" ;
28
27
pyproject = true ;
28
+
29
+ # NOTE: The files filtered out here are not visible in the build sandbox, neither
30
+ # do they affect the output hash. They can be modified without triggering a rebuild.
31
+ src = lib . cleanSourceWith {
32
+ filter =
33
+ name : type :
34
+ let
35
+ any = builtins . any ( x : x ) ;
36
+ baseName = builtins . baseNameOf name ;
37
+ in
38
+ any [
39
+ ( lib . hasSuffix ".py" name )
40
+ ( baseName == "README.md" )
41
+ ( baseName == "pyproject.toml" )
42
+ ] ;
43
+ src = lib . cleanSource ../../. ;
44
+ } ;
29
45
nativeBuildInputs = [ poetry-core ] ;
30
- projectDir = ../../. ;
31
- propagatedBuildInputs = llama-python-deps ;
46
+ dependencies = llama-python-deps ;
32
47
33
48
passthru = {
34
49
shell = mkShell {
You can’t perform that action at this time.
0 commit comments