Skip to content

Commit

Permalink
chore: nix default
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira committed Mar 31, 2024
1 parent eb4a115 commit 129042f
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions default.nix
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 ];
};
}

0 comments on commit 129042f

Please sign in to comment.