- use stdenvNoCC instead of pkgs.stdenvNoCC
- always include stdenvNoCC, even if no deps
- use stdenvNoCC.is(Darwin/Linux) instead of stdenv's
refs #4358
refs 003a8815
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
If `archives.[*].wrap_in_directory` is set, it'll create a folder inside
the archive file, usually something like `app_goos_goarch`.
In those cases, the root of the archive is not constant, so we create a
`sourceRootMap` and use it instead.
In cases where the `sourceRoot` is constant, the generated derivation
will be the same.
refs https://github.com/orgs/goreleaser/discussions/4549
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
very, very, very WIP implementation of nixpkgs for GoReleaser.
**Decisions made for this first version:**
- only linux and darwin, arm64, 386 and amd64
- only support pkgs from goreleaser-generated archives
- no support to push into default nixpkgs repository
- no support to automatically add the _maybe_ new pkg to the root
`default.nix`
- the generated nixpkg will be rather verbose, which shouldn't be too
much of an issue as it is autogenerated anyway
**TODOs**:
- [x] macos universal binary support
- [x] custom pkg path (e.g. pkgs/misc/foo/bar/default.nix)
- [x] handle archives with a folder in them
- [x] add more options: postInstall, ??
**Will be handled in future versions**:
- [ ] archives.format=binary support
- [ ] compile from source
- [ ] PR-ing into nixpkgs
- [ ] armv6l-linux & armv7l-linux support
closes#3537
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>