-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: adds nix derivation for distribution * fixes the version
- Loading branch information
1 parent
7e6733b
commit eb4a115
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ bin/ | |
# Gogland specific files | ||
.idea | ||
*.iml | ||
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nix-build --no-out-link -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# default.nix | ||
let | ||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; | ||
pkgs = import nixpkgs { config = {}; overlays = []; }; | ||
in | ||
{ | ||
ergo = pkgs.callPackage ./ergo.nix { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# allow our nixpkgs import to be overridden if desired | ||
{ pkgs ? import <nixpkgs> {}, fetchFromGitHub, buildGoModule, ... }: | ||
|
||
let | ||
_version = "v0.3.2"; | ||
in | ||
buildGoModule rec { | ||
# name of our derivation | ||
name = "ergo-proxy"; | ||
version = "${_version}"; | ||
|
||
# sources that will be used for our derivation. | ||
src = fetchFromGitHub { | ||
owner = "cristianoliveira"; | ||
repo = "ergo"; | ||
rev = _version; | ||
sha256 = "sha256-C3lJWuRyGuvo33kvj3ktWKYuUZ2yJ8pDBNX7YZn6wNM="; | ||
}; | ||
|
||
modSha256 = "0fagi529m1gf5jrqdlg9vxxq4yz9k9q8h92ch0gahp43kxfbgr4q"; | ||
|
||
vendorHash = "sha256-yXWM59zoZkQPpOouJoUd5KWfpdCBw47wknb+hYy6rh0="; | ||
|
||
ldflags = [ | ||
"-s" "-w" | ||
"-X main.VERSION=${_version}" | ||
]; | ||
|
||
meta = with pkgs.lib; { | ||
description = "Ergo: The reverse proxy agent for local domain management"; | ||
homepage = "https://github.com/cristianoliveira/ergo"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ cristianoliveira ]; | ||
}; | ||
} |