-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from willbush/feauter/consistent-relative-paths
Consistent relative paths to expression file
- Loading branch information
Showing
48 changed files
with
105 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
self: super: { | ||
foo = self._internalCallByNamePackageFile ./../../foo.nix; | ||
bar = self._internalCallByNamePackageFile ./../../foo.nix; | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/manual-definition/base/all-packages.nix → ...tion/base/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
- Attribute `pkgs.foo1` was previously defined in pkgs/by-name/fo/foo1/package.nix, but is now manually defined as `callPackage ... { /* ... */ }` in all-packages.nix. | ||
- Attribute `pkgs.foo1` was previously defined in pkgs/by-name/fo/foo1/package.nix, but is now manually defined as `callPackage ... { /* ... */ }` in pkgs/top-level/all-packages.nix. | ||
Please move the package back and remove the manual `callPackage`. | ||
|
||
- Attribute `pkgs.foo2` was previously defined in pkgs/by-name/fo/foo2/package.nix, but is now manually defined as `callPackage ./without-config.nix { /* ... */ }` in all-packages.nix. | ||
- Attribute `pkgs.foo2` was previously defined in pkgs/by-name/fo/foo2/package.nix, but is now manually defined as `callPackage ./without-config.nix { /* ... */ }` in pkgs/top-level/all-packages.nix. | ||
Please move the package back and remove the manual `callPackage`. | ||
|
||
- Attribute `pkgs.foo3` was previously defined in pkgs/by-name/fo/foo3/package.nix, but is now manually defined as `callPackage ... { ... }` in all-packages.nix. | ||
- Attribute `pkgs.foo3` was previously defined in pkgs/by-name/fo/foo3/package.nix, but is now manually defined as `callPackage ... { ... }` in pkgs/top-level/all-packages.nix. | ||
While the manual `callPackage` is still needed, it's not necessary to move the package files. | ||
|
||
- Attribute `pkgs.foo4` was previously defined in pkgs/by-name/fo/foo4/package.nix, but is now manually defined as `callPackage ./with-config.nix { ... }` in all-packages.nix. | ||
- Attribute `pkgs.foo4` was previously defined in pkgs/by-name/fo/foo4/package.nix, but is now manually defined as `callPackage ./with-config.nix { ... }` in pkgs/top-level/all-packages.nix. | ||
While the manual `callPackage` is still needed, it's not necessary to move the package files. | ||
|
||
This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. |
4 changes: 2 additions & 2 deletions
4
tests/move-to-non-by-name/all-packages.nix → ...n-by-name/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
self: super: { | ||
foo1 = self.callPackage ({ someDrv }: someDrv) { }; | ||
foo2 = self.callPackage ./without-config.nix { }; | ||
foo2 = self.callPackage ./../../without-config.nix { }; | ||
foo3 = self.callPackage ({ someDrv, enableFoo }: someDrv) { | ||
enableFoo = null; | ||
}; | ||
foo4 = self.callPackage ./with-config.nix { | ||
foo4 = self.callPackage ./../../with-config.nix { | ||
enableFoo = null; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
- Attribute `pkgs.new1` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. | ||
Please define it in pkgs/by-name/ne/new1/package.nix instead. | ||
See `pkgs/by-name/README.md` for more details. | ||
Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. | ||
Since the second `callPackage` argument is `{ }`, no manual `callPackage` in pkgs/top-level/all-packages.nix is needed anymore. | ||
|
||
- Attribute `pkgs.new2` is a new top-level package using `pkgs.callPackage ./without-config.nix { /* ... */ }`. | ||
Please define it in pkgs/by-name/ne/new2/package.nix instead. | ||
See `pkgs/by-name/README.md` for more details. | ||
Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. | ||
Since the second `callPackage` argument is `{ }`, no manual `callPackage` in pkgs/top-level/all-packages.nix is needed anymore. | ||
|
||
- Attribute `pkgs.new3` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. | ||
Please define it in pkgs/by-name/ne/new3/package.nix instead. | ||
See `pkgs/by-name/README.md` for more details. | ||
Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in all-packages.nix is still needed. | ||
Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in pkgs/top-level/all-packages.nix is still needed. | ||
|
||
- Attribute `pkgs.new4` is a new top-level package using `pkgs.callPackage ./with-config.nix { /* ... */ }`. | ||
Please define it in pkgs/by-name/ne/new4/package.nix instead. | ||
See `pkgs/by-name/README.md` for more details. | ||
Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in all-packages.nix is still needed. | ||
Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in pkgs/top-level/all-packages.nix is still needed. | ||
|
||
This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. |
4 changes: 2 additions & 2 deletions
4
.../new-package-non-by-name/all-packages.nix → ...n-by-name/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
self: super: { | ||
before = self.callPackage ({ someDrv }: someDrv) { }; | ||
new1 = self.callPackage ({ someDrv }: someDrv) { }; | ||
new2 = self.callPackage ./without-config.nix { }; | ||
new2 = self.callPackage ./../../without-config.nix { }; | ||
new3 = self.callPackage ({ someDrv, enableNew }: someDrv) { | ||
enableNew = null; | ||
}; | ||
new4 = self.callPackage ./with-config.nix { | ||
new4 = self.callPackage ./../../with-config.nix { | ||
enableNew = null; | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tests/non-syntactical-callPackage-by-name/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
self: super: { | ||
|
||
bar = (x: x) self.callPackage ./../by-name/fo/foo/package.nix { someFlag = true; }; | ||
foo = self.bar; | ||
|
||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like | ||
|
||
nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ }; | ||
nonDerivation = callPackage ./../by-name/no/nonDerivation/package.nix { /* ... */ }; | ||
|
||
However, in this PR, the first `callPackage` argument is the wrong path. See the definition in all-packages.nix:2: | ||
However, in this PR, the first `callPackage` argument is the wrong path. See the definition in pkgs/top-level/all-packages.nix:2: | ||
|
||
nonDerivation = callPackage ./someDrv.nix { /* ... */ }; | ||
nonDerivation = callPackage ./../../someDrv.nix { /* ... */ }; | ||
|
||
This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. |
3 changes: 3 additions & 0 deletions
3
tests/override-different-file/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
self: super: { | ||
nonDerivation = self.callPackage ./../../someDrv.nix { }; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/override-empty-arg-gradual/base/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
self: super: { | ||
nonDerivation = self.callPackage ./../by-name/no/nonDerivation/package.nix { }; | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/override-empty-arg-gradual/pkgs/top-level/all-packages.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
self: super: { | ||
nonDerivation = self.callPackage ./../by-name/no/nonDerivation/package.nix { }; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
self: super: { | ||
nonDerivation = self.callPackage ./../by-name/no/nonDerivation/package.nix { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.