summary refs log tree commit diff
path: root/pkgs/development/go-modules
Commit message (Collapse)AuthorAge
* 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
|
* buildGoModule: require vendorSha256 to be set in packageszowoq2020-06-17
|
* go-modules: Add in old modsha256 w/ warningColin L Rice2020-05-14
|
* go-modules: Augment builds w/ vendor srcColin L Rice2020-05-14
| | | | | | This is done in response to complaints that the module format is not human readable. The vendor source blob is flat files and should be extremely readable.
* buildGoModule: enable strictDepsJörg Thalheim2020-03-18
| | | | | This will improve cross compiling in the long run. See also https://github.com/NixOS/nixpkgs/pull/82786
* buildGoModule: passthru the modSha256 (#82027)Benjamin Hipple2020-03-11
| | | | | | | | | | | | | | The builder does not technically need the modSha256 of the vendor dir, and even though we pass it the entire vendor dir it makes sense not to risk having an accidental dependency on that variable. However, tools like [nixpkgs-update](https://github.com/ryantm/nixpkgs-update) need to inspect the `modSha256` of a package in order to be able to update them, and since this is a real part of the package (describes info about its dependencies) let's add it to `passthru`. Specifically, this allows us to run a cmd like `nix eval -f . tflint.modSha256` to get the current value, which is how the bot finds it to replace with the new version in the Rust ecosystem.
* buildGoModule: support impure modules (#76532)zimbatm2019-12-28
| | | | | | | | | | | | When modSha256 is null, disable the nix sandbox instead of using a fixed-output derivation. This requires the nix-daemon to have `sandbox = relaxed` set in their config to work properly. Because the output is (hopefully) deterministic based on the inputs, this should give a reproducible output. This is useful for development outside of nixpkgs where re-generating the modSha256 on each mod.sum changes is cumbersome. Don't use this in nixpkgs! This is why null is not the default value.
* dolt: init at 0.12.0 (#75693)Danylo Hlynskyi2019-12-16
| | | | | | | | | | | | | | | | * dolt: init at 0.12.0 * Update pkgs/servers/sql/dolt/default.nix Co-Authored-By: robert seaton <robbpseaton@gmail.com> * fix eval * Update pkgs/servers/sql/dolt/default.nix Co-Authored-By: Wael Nasreddine <wael.nasreddine@gmail.com> * update Go docs as well
* buildGoModule: disable consult the checksum database on buildMario Rodas2019-12-01
| | | | | | | | | | Since Go 1.13, `GOSUMDB` defaults to "sum.golang.org", to consult the checksum database of the main module's go.sum. We already use the default behavior when building `go-modules`, but Go tries to consult the checksum database again when building the module, and fails because since it requires `cacert` and `git` which are not propagated when building the package.
* buildGoModule: remove cached lookup results and tilesMario Rodas2019-10-12
| | | | | | | | | | Since GO 1.13, the go command caches the lookup results and tiles in $GOPATH[1], hence making the module directory non-deterministic. Use the `-f` flag when removing /sumdb, for compatibility with Go 1.12 because in that version does not exists that directory. [1] https://go.googlesource.com/proposal/+/master/design/25530-sumdb.md#command-client
* buildGoModule: support overriding the go-modules derivationBas van Dijk2019-07-28
|
* buildGoModule: add ./ to all sub-packages (#63936)Wael Nasreddine2019-06-29
| | | | | When $subPackages has more than one item, the build was failing because ./ was added only to the first subPackage. This commit adds ./ to all specified subPackages.
* buildGoModule: pre-initialize module cache (#61967)John Children2019-05-24
| | | | | | | | | | | | For some Go projects a go.mod file is included but there are no listed dependencies. When this is encountered the Go toolchain will not create a cache folder for downloaded dependencies which causes buildGoModule to fail. An example of a project like this that is widely used is: https://github.com/golang/protobuf This commit adds a mkdir command to ensure that the directory always exists so it can be copied and prevent the failure.
* buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58071)Wael Nasreddine2019-03-21
| | | cacert already exposes NIX_SSL_CERT_FILE in its setupHook. Fetchers and builders are already setup to use this variable and there's no need to export them manually.
* buildGoModule: Allow pname attribute (#57787)Vladyslav M2019-03-17
|
* buildGoModule: function for packaging Go modulesWael M. Nasreddine2019-03-14
| | | | | | | | | | The function buildGoModule builds Go programs managed with Go modules. It builds a Go module through a two phase build: - An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module. - A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
* buildGoPackage: move it under a different pathWael M. Nasreddine2019-03-13
| | | | | | This change moves buildGoPackage from pkgs/development/go-modules to pkgs/development/go-packages, so we can have buildGoModule at pkgs/development/go-modules.
* go: build each package single-threaded (#53390)Andrew Dunham2019-02-07
| | | | | | | | | | | | | | | | I noticed that I was seeing the Go compiler build things in parallel even when I'd set `-j1 --cores 1`. It appears that the compiler, by default, uses the number of CPUs that are available to perform a build, while nixpkgs parallelizes at the directory level. In order to change the fewest assumptions, this explicitly tells the Go compiler to run single-threaded. The flag's documentation is: ``` -p n the number of programs, such as build commands or test binaries, that can be run in parallel. The default is the number of CPUs available. ``` So this should function as expected. Feedback appreciated!
* buildGoPackage: also support pnameJörg Thalheim2018-12-18
| | | | | | | Following python-modules and stdenv.mkDerivation. Hopefully zero rebuilds. Motivation: https://github.com/NixOS/nixpkgs/pull/52409
* go_1_11: fix cross compilationJörg Thalheim2018-11-24
|
* buildGoPackage: remove build-time dependency on parallel (and perl)Jörg Thalheim2018-11-21
| | | | | | xargs is as good as parallel for our job fixes #50752
* buildGoPackage: re-enable GOCACHEJörg Thalheim2018-10-28
| | | | | | | If projects uses go1.11 modules GOCACHE is required. Also if buildGoPackage is used in a nix-shell setting we don't want to override GOCACHE to allow incremental builds. This should be backported to 18.09
* Allow doCheck config of buildGoPackageArmando Ramirez2018-09-10
|
* Merge master into stagingFrederik Rietdijk2018-07-26
|\
| * buildGoPackage: add shellHook attributeAntoine Eiche2018-07-17
| |
* | goBuildPackage: Add -x to the go build command if NIX_DEBUG >= 1Antoine Eiche2018-07-18
|/ | | | | | The -x go option prints all intermediate commands used by the Go compiler. For instance, this is pretty useful to debug Go LD_FLAGS because the used linker command is printed.
* buildGoPackage: Dont copy sources to $outadisbladis2018-07-11
| | | | Some sources are quite large and they don't seem to offer much value
* buildGoPackage: use a separator when joining extraSrcPaths togetherPiotr Bogdan2018-04-01
|
* buildGoPackage: disable go 1.10 cacheJörg Thalheim2018-02-24
| | | | This disables annoying error messages that the go cache in /homeless-shelter cannot be created.
* buildGoPackage: fill in meta.homepageYegor Timoshenko2017-12-20
|