Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1828a5c5ba46
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 28e2277305f8
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 30, 2018

  1. make-derivation: remove selfConsistent check

    version is set in lots of places but might not need to be in a name.
    
    Alternative to #50364.
    matthewbauer authored and FRidh committed Nov 30, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    headius Charles Oliver Nutter
    Copy the full SHA
    28e2277 View commit details
Showing with 1 addition and 8 deletions.
  1. +1 −8 pkgs/stdenv/generic/make-derivation.nix
9 changes: 1 addition & 8 deletions pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
@@ -81,13 +81,6 @@ rec {
, ... } @ attrs:

let
# Check that the name is consistent with pname and version:
selfConsistent = (with attrs; attrs ? "name" ->
(lib.assertMsg (attrs ? "version" -> lib.strings.hasInfix version name)
"version ${version} does not appear in name ${name}" &&
lib.assertMsg (attrs ? "pname" -> lib.strings.hasInfix pname name)
"pname ${pname} does not appear in name ${name}"));

computedName = if name != "" then name else "${attrs.pname}-${attrs.version}";

# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
@@ -188,7 +181,7 @@ rec {
// {
# A hack to make `nix-env -qa` and `nix search` ignore broken packages.
# TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
name = assert selfConsistent && validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString
name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString
# Fixed-output derivations like source tarballs shouldn't get a host
# suffix. But we have some weird ones with run-time deps that are
# just used for their side-affects. Those might as well since the