summary refs log tree commit diff
path: root/pkgs/development/go-modules
Commit message (Collapse)AuthorAge
* buildGo{Module,Package}: move to build-support/gozowoq2022-08-07
|
* Merge master into staging-nextgithub-actions[bot]2022-08-02
|\
| * buildGoModule: add vendorHashajs1242022-08-02
| | | | | | | | | | the _unset hack is kind of ugly, but it needs to default to something and it can't be null, because that already has special meaning
* | Merge master into staging-nextgithub-actions[bot]2022-07-31
|\|
| * buildGoModule: prefer verbose output when NIX_DEBUG setWilliam Carroll2022-07-31
| | | | | | | | | | | | | | > The -v flag causes vendor to print the names of vendored modules and packages > to standard error. The `-v` flag helped me debug a `buildGoModule` derivation yesterday evening.
* | Merge staging-next into staginggithub-actions[bot]2022-07-29
|\|
| * buildGoModule: move setup-hook to gotoolszowoq2022-07-29
| | | | | | | | | | | | the hook is for gotools, doesn't need to live with buildGoModule - also remove duplicate buildGoPackage hook
* | Merge pull request #182665 from Mic92/go-modulesJörg Thalheim2022-07-24
|\ \ | |/ |/| go-modules: don't set trimpath for tests
| * go-(modules|packages): don't set trimpath for testsJörg Thalheim2022-07-24
| |
* | buildGoModules: don't add kalbasit as maintainer to every go packageSandro Jäckel2022-07-20
|/
* Merge pull request #173702 from bdd/go-checkFlagsJörg Thalheim2022-06-28
|\ | | | | go-modules/packages: Run unit tests under subdirs
| * go-modules/packages: Run unit tests under subdirsBerk D. Demir2022-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: Due to the way `buildGoDir` function was repurposed to also run `go test`, if `checkFlags` was defined, `go test` was ran only at the top level directory. Only the first element of `checkFlags` array would get passed to the `go test` command as arguments. Fix: Now the first parameter to `buildGoDir` is handled as the command. If the command is "test" `checkFlags` get passed as arguments along with other build flags like ldflags, tags, etc. Readability: - Iteratively build a flag array in `buildGoDir` instead of single long variable expansion command line. - Bash style: Single line local assignment of positional parameters.
| * Revert "Merge #171177: go-modules/packages: Improve `checkFlags` handling"Vladimír Čunát2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 361139c574ab2a37c46cd705fac90ada130ea139, reversing changes made to 77ee91f1d318a03fa96571656ce8af25a236fbca. This broke tests in some go packages, and at this point I don't want further delays from figuring out what's wrong. This probably won't make it to 22.05. Example failures: https://hydra.nixos.org/build/176551928 https://hydra.nixos.org/build/176546993 but I think there were more among https://hydra.nixos.org/eval/1762178?compare=1762151#tabs-now-fail
| * Merge master into staging-nextgithub-actions[bot]2022-05-15
| |\
| * | go-modules/packages: Improve `checkFlags` handlingBerk D. Demir2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix handling of `checkFlags` derivation attribute when it's a list of two or more elements. - Improve the readability go `buildGoDir` function with flag array building and "test" command conditional. - Bash style: Single line local assignment of positional parameters.
* | | buildGoModule: passing CGO_ENABLED explicitlyNick Cao2022-06-20
| | |
* | | buildGoModule: remove `runVend`zowoq2022-06-08
| |/ |/| | | | | follow up from 8a8c88de70bd7f967cb20ad07583ea9ef12a4a94
* | buildGoModule: allow goproxylinsui2022-05-15
|/
* go: Apply package exclusion equallyManuel Mendez2022-04-09
| | | | | | | | | The exclusion logic was moved out of getGoDirs but only buildPhase was updated causing checkPhase to possibly fail. This happened in golint as it has go files in testdata that are meant as testdata files and not go packages to test which caused the checkPhase to fail. Fixes #167717
* go: Drop unnecessary backslash-escapeManuel Mendez2022-04-04
| | | | | | | | | | | | There's no backslash interpretation going on within single-quote strings which means there's no need to escape the backslash. Since this was going on within single-quote strings the $exclude variable ended up having 2 backslashes (`\\`) instead of the intended single backslash. This meant that the regex that was built up was incorrect. For example prometheus' exclude contents before and after this change are: ✕: \(/_\|examples\|Godeps\|testdata\\|documentation/prometheus-mixin\) ✓: \(/_\|examples\|Godeps\|testdata\|documentation/prometheus-mixin\)
* buildGoModule: fix vendor conditional, set GOPROXY unconditionallyzowoq2022-03-17
| | | | with sandboxing disabled this could still access the network
* go: Bunch of fixes when using excludedPackages and other bitsManuel Mendez2022-03-04
| | | | | | | | | | | | | | | | | | | | | | | | Few things going on in this commit: Do not print "Building subPakage $pkg" message if actually going to skip the package. This was confusing to me when I was trying to figure out how to set excludedPackages and seeing the "Building subpackage $pkg" messages for packages I wanted to skip. Turns out this messages was being printed before checking if we actually wanted to build the package and not necessarily that my excludedPackages was wrong. Make go-packages look a little bit more like go-modules, by adding testdata to the default list of excluded packages. This commit also does some setup outside the buildGoDir function so that we avoid checking `excludedPackages` for every package and cut down the number of grep calls by half since we always want at least one grep for the default excludedPackages, might as well just add to the patterns being checked. Finally, adds documentation for usage of excludedPackages and subPackages. I had to read the implementation to figure out how to correctly use these function arguments since there was no documentation and different uses in the code base. So this commit documents usage of the arguments.
* buildGoModule: remove `runVend`zowoq2022-01-08
| | | | follow up from 8a8c88de70bd7f967cb20ad07583ea9ef12a4a94
* buildGoModule: use `proxyVendor` instead of `runVend`zowoq2022-01-06
|
* go: fix buildGoModule by passing patchFlags to go-modules tooJulien Moutinho2021-12-28
|
* buildGoModule: warn if buildFlagsArray is usedzowoq2021-08-26
|
* buildGo{Module,Package}: warn if buildFlags is usedzowoq2021-08-23
|
* buildGoModule: add proxyVendorzowoq2021-08-06
|
* buildGo{Module,Package}: add `tags` argumentzowoq2021-08-06
| | | | | | Simpler method of setting tags rather than using some combination of buildFlags, buildFlagsArray, preBuild, etc Using `lib.concatStringsSep ","` as space separated tags are deprecated in go.
* Merge pull request #129286 from helsinki-systems/feat/buildGoMod-checkFlagsBen Siraphob2021-07-06
|\
| * buildGoModule: add support for checkFlagsajs1242021-07-05
| |
* | buildGoModule: fix enableParallelBuildingzowoq2021-07-04
|/ | | | | | enableParallelBuilding is unset so NIX_BUILD_CORES is always 1. This copies how enableParallelBuilding is set in buildGoPackage.
* buildGoModule/buildGoPackage: Introduce ldflags argumentSilvan Mosberger2021-06-05
| | | | | | | | | | | | | Previously it was not possible to define multiple ldflags, since only the last definition applies, and there's some quoting issues with `buildFlagsArray`. With the new `ldflags` argument it's possible to do this, e.g. ldflags = drv.ldflags or [] ++ [ "-X main.Version=1.0" ] can now properly append a flag without clearing all previous ldflags.
* buildGoModule: use assert for checking goPackagePath (#113046)zowoq2021-02-15
| | | also remove a `disabled` leftover from 26117ed4b78020252e49fe75f562378063471f71
* buildGo{Module,Package}: remove disabledzowoq2021-01-11
| | | | This doesn't seem to have been used since pkgs/top-level/go-packages.nix was split up.
* buildGoModule: fix cross-compilation with CGO_ENABLED=1Florian Klink2020-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building a go binary that's linking against some .so/.a, while cross-compiling, we need to pass the correct compiler, otherwise `go build` will fail with the not-so helpful error message: ``` gcc_arm64.S: Assembler messages: gcc_arm64.S:28: Error: no such instruction: `stp x29,x30,[sp,' gcc_arm64.S:32: Error: too many memory references for `mov' gcc_arm64.S:34: Error: no such instruction: `stp x19,x20,[sp,' gcc_arm64.S:37: Error: no such instruction: `stp x21,x22,[sp,' gcc_arm64.S:40: Error: no such instruction: `stp x23,x24,[sp,' gcc_arm64.S:43: Error: no such instruction: `stp x25,x26,[sp,' gcc_arm64.S:46: Error: no such instruction: `stp x27,x28,[sp,' gcc_arm64.S:50: Error: too many memory references for `mov' gcc_arm64.S:51: Error: too many memory references for `mov' gcc_arm64.S:52: Error: too many memory references for `mov' gcc_arm64.S:54: Error: no such instruction: `blr x20' gcc_arm64.S:55: Error: no such instruction: `blr x19' gcc_arm64.S:57: Error: no such instruction: `ldp x27,x28,[sp,' gcc_arm64.S:60: Error: no such instruction: `ldp x25,x26,[sp,' gcc_arm64.S:63: Error: no such instruction: `ldp x23,x24,[sp,' gcc_arm64.S:66: Error: no such instruction: `ldp x21,x22,[sp,' gcc_arm64.S:69: Error: no such instruction: `ldp x19,x20,[sp,' gcc_arm64.S:72: Error: no such instruction: `ldp x29,x30,[sp],' ```
* buildGoModule: disallow goPackagePathzowoq2020-12-17
| | | | This is unnecessary with `buildGoModule`, it's usually cruft from `buildGoPackage` conversions.
* buildGo{Package,Module}: set trimpath in GOFLAGSzowoq2020-11-18
| | | | | | | Also drop removeReferencesTo `-trimpath` removes all file system paths from the compiled executable, this should improve reproducibility.
* buildGoModule: copy vendor instead of symlinkingzowoq2020-11-06
| | | | Allow the second phase to modify the contents of the vendor directory.
* buildGoModule: use optionalStringzowoq2020-10-28
|
* treewide: De-inline uses of lib.boolToStringMalte Brandy2020-10-14
| | | | This commit should not change eval results
* buildGo{module,package}: also fixup `$out/{libexec,lib}`Jörg Thalheim2020-08-28
| | | | also suppresses errors if those directories are not present
* buildGoModule: remove modSha256zowoq2020-08-20
|
* buildGoModule: check if vendor exists with deleteVendorzowoq2020-08-14
|
* buildGoModule: update deleteVendor docszowoq2020-08-14
|
* buildGoModule: change doCheck default to truezowoq2020-08-10
|
* go-modules: Add useVend flag to go-modulesColin L Rice2020-07-28
|
* Revert "Group packages by language/builder via dummy maintainer"zowoq2020-07-18
|
* buildGoModule: add nixpkgs-go maintainerzowoq2020-07-17
|
* buildGoModule: remove trailing whitespacezowoq2020-06-28
|