Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c313e07
make-derivation: use pname-version as default name if both are present
Synthetica9 Jun 6, 2018
b5d7bb4
treewide: removed name from a few pythonpackages defining pname and v…
Synthetica9 Jun 6, 2018
ef6ece0
treewide: removed name from packages that already defined pname and v…
Synthetica9 Jun 6, 2018
af1b4f4
gnome3: don't re-define lib.versions.majorMinor and implement fetchGn…
Synthetica9 Jun 6, 2018
e3d9978
gnome3: make some refinements to fetchGnomeSource
Synthetica9 Jun 6, 2018
02f45b6
Make fetchGnomeSource availabable as top-level pkg infra
Synthetica9 Jun 6, 2018
0c1d5d1
make-derivation: get position info from version
Synthetica9 Jun 7, 2018
e0d2348
make-derivation: add check that the name is consistent with pname and…
Synthetica9 Jun 7, 2018
6bc5d26
make-derivation: fix for python packages
Synthetica9 Jun 7, 2018
0f5c2ae
fictx: remove `name` from all derivations, add a consistent way to fe…
Synthetica9 Jun 7, 2018
33932e3
mk-python-derivation: re-add version as argument to mkDerivation
Synthetica9 Jun 7, 2018
b03d631
fcitx-unikey: split name into pname and version
Synthetica9 Jun 7, 2018
7cd8034
pip: fix bootstrapped-pip
Synthetica9 Jun 7, 2018
a2d4ae2
fcitx-qt5: fix
Synthetica9 Jun 7, 2018
b6d8df3
fcitx-libpinyin: fix
Synthetica9 Jun 7, 2018
44be91f
fcitx-mozc: fix
Synthetica9 Jun 7, 2018
ee16a1d
mk-python-derivation: try a different fix
Synthetica9 Jun 7, 2018
26adf6f
ibus: fix build
Synthetica9 Jun 8, 2018
f8e3964
pkgs/applications/altcoins: fixup names
Synthetica9 Jun 8, 2018
0786975
pkgs/applications/audio: fixup names
Synthetica9 Jun 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ rec {
# * https://nixos.org/nix/manual/#ssec-derivation
# Explanation about derivations in general
mkDerivation =
{ name ? ""
{ name ? if builtins.hasAttr "pname" attrs && builtins.hasAttr "version" attrs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update "pos" above as well? It is used to find line numbers in traces. I think we need to also look for "version" before name for this to work correctly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that be something like builtins.unsafeGetAttrPos "pname" attrs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but I actually think version would be better because it's more frequently used than pname.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll add it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 0c1d5d1 look good to you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have an assertion for name == "${pname}-${version}" if all of the three are set

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, that would make sense. Adding that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be attrs ? pname && attrs ? version.

then "${attrs.pname}-${attrs.version}"
else ""

# These types of dependencies are all exhaustively documented in
# the "Specifying Dependencies" section of the "Standard
Expand Down