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: 2b5ba7f723a4
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1f46aaab1b67
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jun 23, 2019

  1. buildGoPackage: keep string context (#63680)

    In Nix, each string has a context that it carries of where it
    originated. Some functions like filterAttrs modify the context of its
    args when doing comparisons. That is important because we use the
    string context of “name” to get where a derivation was defined. This
    causes some builtins like unsafeGetAttrPos to report incorrectly that
    the string was set in lib/attrsets.nix and reporting that as the
    source file. Using removeAttrs avoids this problem.
    
    Fixes #63679
    matthewbauer authored and kalbasit committed Jun 23, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    bwoodsend Brénainn Woodsend
    Copy the full SHA
    1f46aaa View commit details
Showing with 2 additions and 4 deletions.
  1. +2 −4 pkgs/development/go-packages/generic/default.nix
6 changes: 2 additions & 4 deletions pkgs/development/go-packages/generic/default.nix
Original file line number Diff line number Diff line change
@@ -35,14 +35,12 @@
# IE: programs coupled with the compiler
, allowGoReference ? false

, meta ? {}, ... } @ args':
, meta ? {}, ... } @ args:


with builtins;

let
args = lib.filterAttrs (name: _: name != "extraSrcs") args';

removeReferences = [ ] ++ lib.optional (!allowGoReference) go;

removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}'';
@@ -75,7 +73,7 @@ let
goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs
else extraSrcs;
package = go.stdenv.mkDerivation (
(builtins.removeAttrs args [ "goPackageAliases" "disabled" ]) // {
(builtins.removeAttrs args [ "goPackageAliases" "disabled" "extraSrcs"]) // {

nativeBuildInputs = [ removeReferencesTo go ]
++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs;