-
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.
- Loading branch information
1 parent
eb4a115
commit 129042f
Showing
1 changed file
with
34 additions
and
7 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 |
---|---|---|
@@ -1,8 +1,35 @@ | ||
# default.nix | ||
let | ||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; | ||
pkgs = import nixpkgs { config = {}; overlays = []; }; | ||
# allow our nixpkgs import to be overridden if desired | ||
{ pkgs ? import <nixpkgs> {}, fetchFromGitHub, buildGoModule, ... }: | ||
|
||
let | ||
_version = "v0.3.2"; | ||
in | ||
{ | ||
ergo = pkgs.callPackage ./ergo.nix { }; | ||
} | ||
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 ]; | ||
}; | ||
} |