https://github.com/sagikazarmark/go-bin-flake
Nix flake for binary distributions of various Go applications
https://github.com/sagikazarmark/go-bin-flake
Last synced: 7 months ago
JSON representation
Nix flake for binary distributions of various Go applications
- Host: GitHub
- URL: https://github.com/sagikazarmark/go-bin-flake
- Owner: sagikazarmark
- License: mit
- Created: 2022-04-20T20:49:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-25T01:00:03.000Z (over 2 years ago)
- Last Synced: 2025-03-06T18:52:45.880Z (7 months ago)
- Language: Nix
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nix flake for binary distributions of various Go applications
[](https://builtwithnix.org)
Unfortunately, some applications cannot be built with Go 1.18 on darwin ([NixOS/nixpkgs#168984](https://github.com/NixOS/nixpkgs/issues/168984), [NixOS/nixpkgs#169478](https://github.com/NixOS/nixpkgs/issues/169478))
until the [macOS SDK is updated](https://github.com/NixOS/nixpkgs/issues/101229).This flake relies on official binary distributions for these packages.
## Usage
```nix
{
description = "Your go package";inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
gobin.url = "github:sagikazarmark/go-bin-flake";
gobin.inputs.nixpkgs.follows = "nixpkgs";
};outputs = { self, nixpkgs, flake-utils, gobin, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
buildInputs = [ pkgs.go gobin.hugo-bin ];
};
});
}
```Or using overlay:
```nix
{
description = "Your go package";inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
gobin.url = "github:sagikazarmark/go-bin-flake";
gobin.inputs.nixpkgs.follows = "nixpkgs";
};outputs = { self, nixpkgs, flake-utils, gobin, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;overlays = [ gobin.overlay ];
};
in {
devShell = pkgs.mkShell {
buildInputs = [ pkgs.go pkgs.hugo-bin ];
};
});
}
```## License
The project is licensed under the [MIT License](LICENSE).